all groups > flash actionscript > april 2007 >
You're in the

flash actionscript

group:

linking a .fla to a URL...



linking a .fla to a URL... r_tist
4/30/2007 9:10:43 PM
flash actionscript: Hi,

I'm trying to accurately add a hyperlink in my .fla so it will link to a URL.
I'm very rusty with Flash, especially ActionScript 2.0.
I've tried the getURL action and that didn't really work, so I used onRelease
and that seems better. However, my file isn't working everytime, and it seems
like I have to double click for the link to work.
Let me describe my file a bit so you can better advise me.
It's a multi-layered .fla with about 200 frames (say) and I figured to get it
to react like a button, I put a layer at the top and created a box over the
section I'd like to link (gave it an alpha of 1% so it's completely
transparent)...then I went to the last frame and added the same keyframe. Mind
you, I converted the box graphic to a button. I think this is where I'm getting
confused. The action is on the first frame so it does it know to "flow"
throughout the timeline??
I hope this makes sense...I need to do something very simple and it could be
the way my file is set up that's hindering me.

thank you
Re: linking a .fla to a URL... Chris McLaughlin
5/1/2007 3:31:48 AM
Hi,

I just finished a program with a link in which I used the getURL method:

on(press){
getUrl("http:\\www.mn.com", _blank):
}

no problems. I wonder if it has anything to do with your button. First is it
a button? If so, you wouldn't need to worry about transparency. you can leave,
the first 3 (visible) states blank (as in a key frame followed by two blank
frames) and create a "rectangle" on the 4th hit state to receive the click.

The rectangle is not visible and can be made large enough to ensure that your
button responds.

Good luck.
AddThis Social Bookmark Button