[Tweener] Very quick question... (AS2)

Niklas Hallgren niklas at widecircle.se
Mon Jan 26 07:17:54 PST 2009


Hello!

Well – where do you run the preload function the very 1st time?

 

Do you actually have this with preload(); outside of your function??

 

function preload() {
   var newListener = new Object();
   
   newListener.onLoadComplete = function(evt) {
      trace("HERE");

      preload();
   }

 

   preloader_mc.addEventListener("onLoadComplete", newListener);
 

   preloader_mc.loadMovie(movie.swf, preloader_mc);
}

 

preload();

 

The way I see it right now it seems like you never actually run preload();
for the first time...

 

 

Niklas

WideCircle

www.widecircle.se <http://www.widecircle.se> 

073-255 86 25

 

 

 

-----Ursprungligt meddelande-----
Från: tweener-bounces at lists.caurinauebi.com
[mailto:tweener-bounces at lists.caurinauebi.com] För Graeme Blackwood
Skickat: den 26 januari 2009 13:30
Till: tweener at lists.caurinauebi.com
Ämne: [Tweener] Very quick question... (AS2)

 

Hi all,

 

This is may be really lame I know, but I can't work out why this isn't doing
what it is told.  All I want is to load an external swf, listen to it coming
in, and when it is complete, loop round and load it again, forever.
Actually I will be adding code to load the next file in the sequence, but
this snippet is essentially what is not working.  I cannot even get the
trace("HERE"); to work...

 

Any ideas?

 

 

function preload() {
   var newListener = new Object();
   
   newListener.onLoadComplete = function(evt) {
      trace("HERE");

      preload();
   }

 

   preloader_mc.addEventListener("onLoadComplete", newListener);
 

   preloader_mc.loadMovie(movie.swf, preloader_mc);
}

 

Many thanks!

 

Graeme



__________ Information från ESET NOD32 Antivirus, version av
virussignaturdatabas 3800 (20090126) __________

Meddelandet har kontrollerats av ESET NOD32 Antivirus.

http://www.esetscandinavia.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20090126/aa6b10c8/attachment.htm>


More information about the Tweener mailing list