On Sun, Aug 17, 2008 at 4:53 PM, Juan Pablo Califano <
[EMAIL PROTECTED]> wrote:

>  However, in this scenario you're loading an swf
> into an empty MovieClip (which extends ObservableClip, if I didn't get you
> wrong). That means that when the swf is loaded, your "stager" empty
> MovieClip has lost all of its properties and is just a plain regular
> MovieClip, so you won't be able to dispatch events from it (since it's not
> anymore an ObservableClip). Or maybe I missing something here...
>
> Cheers
> Juan Pablo Califano
>
>
Exactly, and that is why I wasn't able to trigger events from the Movie that
is being loaded. But I am curios to see if Steven has another approach that
would require less code and would provide the same result. Although the
current example (from Juan) seems to be a decent amount of code, i might
seem a lot in one post but its not that much if you take away the
implementation.

-h



>
> 2008/8/17, Steven Sacks <[EMAIL PROTECTED]>:
> >
> > Wow.  That's a crazy amount of code for something so simple.
> >
> > Here's what I use:
> >
> > -------------------------------------------
> > import mx.events.EventDispatcher;
> >
> > class net.stevensacks.utils.ObservableClip extends MovieClip
> > {
> >        public var addEventListener:Function;
> >        public var removeEventListener:Function;
> >        private var dispatchEvent:Function;
> >
> >        function ObservableClip()
> >        {
> >                EventDispatcher.initialize(this);
> >        }
> > }
> > -------------------------------------------
> >
> > Just have your MovieClip classes extend ObservableClip instead of
> MovieClip
> > and you can addEventListener and dispatchEvent simply and easily.
> >
> > :)
> > _______________________________________________
> > Flashcoders mailing list
> > [email protected]
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
...helmut
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to