My AS3 Buttons in Flash do not work in HTML.
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!
