Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

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

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
jeremypettit
Asked:
jeremypettit
1 Solution
 
d2kagwCommented:
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
 
muso120999Commented:
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
 
jeremypettitAuthor Commented:
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
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
muso120999Commented:
A note about javascript:window.open - as of Windows XP Service Pack 2 it is unsupported, and probably wont work anyway!
0
 
jeremypettitAuthor Commented:
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
 
muso120999Commented:
Afraid so, at least I am lead to believe:
http://www.kirupaforum.com/forums/showthread.php?p=532108
0
 
jeremypettitAuthor Commented:
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
 
muso120999Commented:
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
 
jeremypettitAuthor Commented:
Not really what I need to do, I want it all self contained, for then my banner can be distributed easier.
0
 
muso120999Commented:
Sorry, then I guess you maybe need someone to post a reply with some experience with LiveMotion then :-(

Good luck :-)
0
 
jeremypettitAuthor Commented:
Hey, it was worth a shot, right? Thanks for trying to help!
0
 
jeremypettitAuthor Commented:
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
 
muso120999Commented:
Cool, glad you got it sorted out :-)
0
 
Computer101Commented:
PAQed, with points refunded (100)

Computer101
E-E Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now