Solved

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

Posted on 2004-09-16
15
180 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
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.

733 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