I have 2 movies (swf) which have to run from a single file.
Both of them have separate preloaders.
I load the first movie and stop it while it plays. For playing the second movie, i am using a timer. Timer has to run till it expires to move to the second movie.
This is the code.
var today:Date = new Date();
var currentTime = today.getTime();
var targetTime = currentTime + 20000;
this.onEnterFrame = function()
{
//Determines how much time is left. Note: Leaves time in milliseconds
var timeLeft = targetTime - currentTime;
if(timeLeft<0)
{
gotoAndPlay(3);
}
}
It gives a warning - Scene 1, Layer 'Actions', Frame 2, Line 15 Warning: 1090: Migration issue: The onEnterFrame is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( 'enterFrame', callback_handler).
How to handle it?