I have a website, and basically I want to use flash to automatically redirect the web site to another with as soon as its load. But it keeps rapidfiring, and has even crashed my computer at one point. How can I set this to only only send the user once.
addEventListener(Event.ENTER_FRAME, fl_EnterFrameHandler);
function fl_EnterFrameHandler(event:Event):void
{
//navigateToURL(new URLRequest("http://www.levittproperties.com/sitebuildercontent/sitebuilderfiles/homepage.swf"), "_self");
trace("Entered frame");
}
The '//' is just incase you try in your flash. I don't want you to crash too. The 'trace' is sufficient to see what I'm talking about.
Try to do as Garry Wong said. But if you must use the ENTER_FRAME
for some reasons , so use it only once , like this:
addEventListener(Event.ENTER_FRAME, fl_EnterFrameHandler);
function fl_EnterFrameHandler(event:Event):void
{
removeEventListener(Event.ENTER_FRAME, fl_EnterFrameHandler);
navigateToURL(new URLRequest("http://www.levittproperties.com/sitebuildercontent/sitebuilderfiles/homepage.swf"), "_self");
}