Copy link to clipboard
Copied
Hey there,
I created an SWF with 5 Buttons. I used the following code:.
mybutton1.addEventListener(MouseEvent.CLICK,f);
function f(e:Event){
navigateToURL(new URLRequest("http://www.myurl1.com"));
}
mybutton2.addEventListener(MouseEvent.CLICK,f2);
function f2(e:Event){
navigateToURL(new URLRequest("http://www.myurl2.com"));
}
mybutton3.addEventListener(MouseEvent.CLICK,f3);
function f3(e:Event){
navigateToURL(new URLRequest("http://www.myurl3.com"));
}
mybutton4.addEventListener(MouseEvent.CLICK,f4);
function f4(e:Event){
navigateToURL(new URLRequest("http://www.myurl4.com"));
}
mybutton5.addEventListener(MouseEvent.CLICK,f5);
function f5(e:Event){
navigateToURL(new URLRequest("http://www.myurl5.com"));
}
It works perfectly fine when I export the SWF from Flash.
When embedding the SWF in an HTML file nothing happens. The buttons don't work, no error message, nothing.
Help anyone?
Thanks!
The code looks fine so that is not the problem. It might be your embedding code for the web page. Have you tried letting Flash publish an html page and then tested that page, or are you relying on something else to create the embedding code?
Copy link to clipboard
Copied
The code looks fine so that is not the problem. It might be your embedding code for the web page. Have you tried letting Flash publish an html page and then tested that page, or are you relying on something else to create the embedding code?
Copy link to clipboard
Copied
Yo Ned,
I directly exported an HTML file from Flash and it worked perfectly.
Thanks a lot!
Benni
Copy link to clipboard
Copied
You're welcome Benni.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more