You can also use the Loader.name property to identify the image you're
loading.

To get a nicely encapsulated solution, you might want to consider
instantiating a new Loader object for each image. I would use weak
references (addEventListener("event", method, false, 0, true)). This way,
when the calling function is complete, there will be no references to the
Loader once the load method dispatches an event, and it will be marked for
garbage collection.

On 8/27/07, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote:
>
> Of course!
>
> I can't believe it was that simple. I guess I wasn't used subclassing
> native
> classes so much.
>
> Thanks a lot Muzak. Troy, thanks for your reply too, I think what Muzak
> said
> was what I was looking for.
>
> Best regards,
> Dimitrios
>
>
>
> ----- Original Message -----
> From: "Muzak" <[EMAIL PROTECTED]>
> To: <flashcoders@chattyfig.figleaf.com>
> Sent: Saturday, August 25, 2007 1:56 AM
> Subject: Re: [Flashcoders] AS3 Events, Delegates and passing parameters
>
>
> > Create a custom class, extending Loader, that has an .id property.
> >
> > regards,
> > Muzak
> >
> > ----- Original Message -----
> > From: "Dimitrios Bendilas" <[EMAIL PROTECTED]>
> > To: <flashcoders@chattyfig.figleaf.com>
> > Sent: Friday, August 24, 2007 9:42 PM
> > Subject: [Flashcoders] AS3 Events, Delegates and passing parameters
> >
> >
> >> Hello everyone,
> >>
> >> I am just starting working with AS3 after many years working with AS1
> and
> >> AS2.
> >>
> >> I am trying to rebuild a Game/App development framework I had built in
> >> AS2 into AS3
> >> and I want to make sure I get it right from scratch.
> >>
> >> All these years I had been working with Delegates and specifically a
> >> custom Delegate class I had writen
> >> which allowed the user to pass extra parameters.
> >>
> >> Now for my new framework, I want to use the new extended event model of
> >> AS3, with addEventListener
> >> and subclassed Event objects. The problem is that I cannot find a
> >> solution that does not uses a Delegate object.
> >> I know that in AS3 callbacks are now executed with the proper scope, so
> >> this does not require a delegate as before,
> >> but I still haven't figured out how to pass parameters.
> >>
> >> Specifically, I cannot do this in situations like the following:
> >> Thank you,
> >>
> >> Dimitrios
> >
> >
> > _______________________________________________
> > 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
>
_______________________________________________
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