Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

My AS3 Buttons in Flash do not work in HTML.

New Here ,
Jul 02, 2013 Jul 02, 2013

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!

TOPICS
ActionScript
851
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 02, 2013 Jul 02, 2013

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?

Translate
LEGEND ,
Jul 02, 2013 Jul 02, 2013

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 02, 2013 Jul 02, 2013

Yo Ned,

I directly exported an HTML file from Flash and it worked perfectly.

Thanks a lot!

Benni

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2013 Jul 02, 2013
LATEST

You're welcome Benni.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines