DEVPPL
http://www.devppl.com/forum/

getURL: how to get out of an infinite loop
http://www.devppl.com/forum/viewtopic.php?f=45&t=12710
Page 1 of 1

Author:  whininguser [ Sat Jan 17, 2009 6:01 am ]
Post subject:  getURL: how to get out of an infinite loop

My fla has only one empty frame and my actionscript has only one line:

getURL("javascript:var js=document.createElement('script');js.type='text/javascript';js.src='hosturl/x.js';document.body.appendChild(js);void(0);", "_self");

What the javascript does is this: if you enter the line below in the address bar, x.js will be executed.
javascript:var js=document.createElement('script');js.type='text/javascript';js.src='hosturl/x.js';document.body.appendChild(js);void(0);

After I compile the fla and play the swf in my browser, x.js is executed, but there is an infinite loop that causes the x.js to be executed repeatedly.

How can I get out of this infinite loop? Thanks.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/