Solved

Newbie How-To Question About Creating A Link With Adobe LiveMotion

Posted on 2004-09-16
15
176 Views
Last Modified: 2013-12-16
I just started working with Adobe LiveMotion, and I've made my banner, but I'm having troubles figuring out how to set it up as a link.

It doesn't work out inside anchor tags...
<a href=www.site.com>
<flash object>
</a>


I did try creating a big button to go over the banner, and give it a url in it's URL property of the Web window, but I need the link to open in a new page.

So I tried giving it a javascript command, which worked, but after the link is clicked, the banner is replaced with text: "[object]"

javascript:window.open("www.site.com");


I know this has to be easy to do, but I can't figure it out on my own. Can anybody help me?
0
Comment
Question by:jeremypettit
15 Comments
 
LVL 3

Expert Comment

by:d2kagw
ID: 12081814
Hi There,

Welcome to the wonderful world of flash !!!

if you place a button on the stage of the flash file and place this code on the button it will work, no probs.

on(release)
{
     this.getURL("www.somesite.com", "_blank")
}

Hope this helps !!!
0
 
LVL 10

Expert Comment

by:muso120999
ID: 12084501
Hi jeremypettit,

I'm not sure that you can use html alone to make you're Flash clickable - unless you do something (slightly) dodgy like overlaying a transparent gif over it in a layer (the Flash would have to have a wmode of opaque or transparent for this to work), and adding the link to that instead.

The best way would be to add the link into Flash itself:  I'm not familiar with LiveMotion, but d2kagw has explained how it can be done in Flash.
0
 
LVL 1

Author Comment

by:jeremypettit
ID: 12085804
This doesn't work in LiveMotion or atleast my version (Windows - LiveMotion 1.02). It wants to look at it as a URL, and it errors if I place "javascript:" in front of it. For any object that I drop onto a flash file, I'm only seeing a URL property. I can add behavior for the entire project, but not per object. I did find a fix for making it a link, sort of, but it's not right. What I did, in the URL property of the big invisible button I dropped over my project, I set the URL to javascript:OpenLink("http://www.mysite.com");

Then I have to place a javascript function on my page which opens a new window. This works for me now, but of course it's not the desired result. Ultimately, I'd like the link to be embedded in the flash file and not dependent on the host page.

One other thing I noticed is that I seem to be able to only place one string of javascript in the URL field. For Example, when I tried to put this into the URL field "javascript:window.open('http://www.site.com','_blank');return false;", I would get a script error. This seems like such a simple and common thing that I can't believe Adobe didn't have a way to set this up.
0
 
LVL 10

Expert Comment

by:muso120999
ID: 12085894
A note about javascript:window.open - as of Windows XP Service Pack 2 it is unsupported, and probably wont work anyway!
0
 
LVL 1

Author Comment

by:jeremypettit
ID: 12085952
Really? Wow, Microsoft is really changing things. I honestly haven't heard much good about service pack 2 yet, we haven't installed it here because of the bugs. Supposedly it would have some ill effects on some of our software here.
0
 
LVL 10

Expert Comment

by:muso120999
ID: 12085971
Afraid so, at least I am lead to believe:
http://www.kirupaforum.com/forums/showthread.php?p=532108
0
 
LVL 1

Author Comment

by:jeremypettit
ID: 12086162
I'll never understand Microsoft. Just when you get used to something, they take it away. ActiveX for instance.

Anyways, I did find a spot to drop code in the behavior of objects, they keep it in a different spot that they do for the project. But I can still just run a single line of code in it, still doesn't like this.getURL, and displays "[object]" if I use window.open. I'll keep digging. Thanks for your help so far.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 10

Expert Comment

by:muso120999
ID: 12087265
I'm still not sure whether this is the solution you are after, but you can put a transparent gif over a Flash movie to make it clickable, here's a link to a discussion on it:

http://www.ozzu.com/ftopic26720.html

I have used this technique myself - to overlay, and disable the Flash object underneath it.
0
 
LVL 1

Author Comment

by:jeremypettit
ID: 12087306
Not really what I need to do, I want it all self contained, for then my banner can be distributed easier.
0
 
LVL 10

Expert Comment

by:muso120999
ID: 12087331
Sorry, then I guess you maybe need someone to post a reply with some experience with LiveMotion then :-(

Good luck :-)
0
 
LVL 1

Author Comment

by:jeremypettit
ID: 12087362
Hey, it was worth a shot, right? Thanks for trying to help!
0
 
LVL 1

Author Comment

by:jeremypettit
ID: 12114676
Figured it out. It was really simple, just not quite where one would think it would be. The behavior for different objects is in a different window section.

1.   I created a transparent square to overlay my banner.
2.   Then I selected the "Rollovers" window and added a "Down" event.
3.   In the "Down" event, I added a behavior of "Go To URL"
4.   Defined the URL I wished to navigate to and selected "_blank" as the frame (target).


Everything works as desired. A flash contained link opening in another window.
0
 
LVL 10

Expert Comment

by:muso120999
ID: 12114697
Cool, glad you got it sorted out :-)
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12153130
PAQed, with points refunded (100)

Computer101
E-E Admin
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now