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

On 10/6/06, Daniel Forslund|Lists <[EMAIL PROTECTED]> wrote:

Hi all!

I have a (hopefully not too ignorant) question relating to movieclips
created on the fly.
Basically, I have a preloader class that is generic and reusable.
It's called from whatever object that does dynamic loading of content
and then in turn invokes a movieclip from a passed symbol name(can be
anything, as long as a basic movieclip structure is followed). It all
works great.

However, when the loading is done I want the dynamically created mc
to play an "outro" animation that is preanimated in the movieclip (as
opposed to animated via AS, that would be easy ;) ). My problem is
finding a way for the preloader class instance to tell when the
movieclip reaches a certain frame or frame label (and is done with
the outro). I can't find a suitable event to hook into? I guess I was
looking for something like "mc.onframelabel" to hook a function to, I
guess that was naive. :)

Can I in some way create a hook myself, or do I have to create a
watcher object that checks each frame where the playhead is in my
dynamic loader movieclip? Would certainly work, but it's not very
elegant. My goal is to keep the preloader movieclip code-free.

Anyway, I hope I managed to describe the problem. Apologies for any
ignorance and any terms/keywords used out of context. I'm pretty new
to more advanced actionscript, but have many moons of general coding
experience. :)

Many thanks in advance,
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




--

: : ) Scott
_______________________________________________
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

Reply via email to