The first form is fine, but you are trying to address a function
called checkLoading inside an instance of ImageLoader, which does not
exist..
if checkLoading is on the root level, then you would say:
intId = setInterval(_root, "checkLoading", 100 );
The second form is incorrect, no quotes there..
Why not just use the built in onProgress event in ImageLoader?
mike
On Jul 26, 2006, at 4:10 PM, keitai guy wrote:
hi list -
i have some weirdness with setInterval, wondering if someone could
suggest solutions?
code:
var intId:Number;
img = new ImageLoader( imgUrl, tgtMc );
intId = setInterval(img, "checkLoading", 100 ); // doesnt
work
intId = setInterval( "checkLoadingFunc", 100, img); // doesnt
work
trace("setInt=" + intId);
however, all i get in all cases is "undefined" for the intId .
the object is getting created fine...
i also tried setting it within the class itself, still with same
problem.
the function is defined before this code in question, in case its a
"compiler/precedence" issue. but no effect.
have used intervals often before, so maybe there is some weird thing i
never ran afoul of before...
FL8/AS2
thanks!
/dc
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com