Skip to main content
Participant
February 16, 2009
Question

Creating external links with action script 03

  • February 16, 2009
  • 2 replies
  • 410 views
Hi,

I'm new to Action Script 03 and flash in general and would appreciate any help i can get.

I've created a flash movie using Flash cs3 and actionscript03. I linked the movie to a page in my website using this code type:

var request:URLRequest = new URLRequest(" http://www.adobe.com");
navigateToURL(request, "_blank");

When i test it in flash and click on the movie, i see that several windows of the linked page begin to open at the same time and it happens even when i don't click on the movie.

question 1: what is the right code to use for flash movies linking pages in dreamweaver cs3?

question 2: what code can i use in order to not have a new window pop up...i prefer to have the page open in the same window.

Thanks in advance for any help.


This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
February 16, 2009
there's no button handler code shown so it's not clear what you expect. in addition, movieclips don't cause the cursor to respond to a link unless the buttonMode property of the movieclip is enabled.
kglad
Community Expert
Community Expert
February 16, 2009
1. your code is correct. it should only execute once, if you want one window open, though.

2. use "_self" instead of "_blank" to open the url in the same window.
birdy2076Author
Participant
February 16, 2009
Hi thanks for responding. I've tried that but more windows keep opening everytime i test the movie, without even clicking on it. And now it doesn't seem to be linking to anything...the cursor doesn't change to a hand when i point it on the movie. I really don't know what the problem is.

Perhaps this info will help?? : the movie is converted to movieclip and i've given the instance a name.

Should i convert it into a button instead? Please help if you can. Thanks!