0

I would like to loop my movie 3 times and open a local .html file in flash using action script 3. If I added a button I know how to do that but not just loop and open?

Thanks

Mthappy

1 Answers1

0

For that, you can create a counter in the 1st frame of your movieclip and at the last one you have just to increment it until 3, then you can open your html page (link) using navigateToURL.

1st frame :

// we create our counter var only if it didn't already exist (null)
if(!counter){   

    var counter:int = 0;

}

last frame :

counter ++;

if(counter == 3){

    navigateToURL(new URLRequest('page.html'), '_blank');

}

Hope that can help you.

akmozo
  • 9,829
  • 3
  • 28
  • 44
  • Thats is great it loops but does not open the new HTML when viewed in a browser. The .swf is embedded within the HTML? Any ideas? – mthappy0 Jan 14 '15 at 15:46
  • @mthappy0 I think that you have a security issue, try [this](http://stackoverflow.com/questions/27514896/flash-not-even-requesting-crossdomain-xml/27539471#27539471). – akmozo Jan 14 '15 at 16:07