On 6 okt 2006, at 19.15, slangeberg wrote:
My problem is finding a way for the preloader class instance to
tell when
the
movieclip reaches a certain frame or frame label
Actually, I prefer to set things up in an event-based model. I
don't have
the code in front of me, but if you look at the EventDispatcher
class, you
can have whatever movie is doing the loading to add listeners to
that which
was loaded:
myClip.addEventListener( "complete", Delegate.create( this,
onComplete ) );
and inside of myClip, you'll need to:
this.dispatchEvent( {type:"complete", target:this} );
Unfortunately this behavior is not built into MovieClip... Just some
ideas...
Scott
Thanks for the suggestions everyone!
I ended up setting up my own event handler without using listener
functionality. It tags movieclips with an ID, which is passed to a
central content manager, which in turn passes it to the correct class
instance. Very simple and efficient with few lines of code. Perhaps
not very elegant, but it works. :-)
Cheers,
Dan
_______________________________________________
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