• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

URL on Movie Clip with AS3

Hi all,

Quick question. How the ^&*# do I put a link in a movie clip in AS3? (I just have a logo in a movie clip that I want to link to the homepage). In AS2 you could just put a transparent box on top of your movie and put the URL there, but it doesn't seem to work anymore? Do I have to do it in a keyframe instead? And does anyone happen to know the AS3 code for this?



Senior Member
Think could be to do with layers

Change the transparent box to a movieclip, like you woudl a graphic or symbol and put this action script on that clip

onClipEvent (load) {this.swapDepths(500)

This may or may not work.

Thanks for your help Charles, but unfortunately I couldn't get it to work that way.

I got it working somehow by using the below code, putting it in the frame and referring to the movieclip instead.

[FONT=Times New Roman][FONT=Times New Roman][SIZE=3]var [/SIZE][/FONT][URL="url:String"][FONT=Times New Roman][SIZE=3][COLOR=#0000ff]url:String[/COLOR][/SIZE][/FONT][/URL][FONT=Times New Roman][SIZE=3] = "[/SIZE][/FONT][URL="http://www.blahblah.com/"][FONT=Times New Roman][SIZE=3][COLOR=#0000ff]http://www.blahblah.com[/COLOR][/SIZE][/FONT][/URL][SIZE=3][FONT=Times New Roman]"[/FONT][/SIZE][/FONT][FONT=Times New Roman][SIZE=3][FONT=Times New Roman]var req:URLRequest = new URLRequest(url)[/FONT][/SIZE][/FONT][FONT=Times New Roman][SIZE=3][FONT=Times New Roman]navigateToURL (req)[/FONT][/SIZE][/FONT]


Junior Member
Can you not just use a behaviour? Like onMouseOut or similar?
Do behavious even work in AS3?

I havent played around with Flash for a long time.