ummm correct me if im wrong but onRelease you are passed an event object
that contains the target of the event?
so:
funciton addChild( txt:String ):Void
{
// make new mc, with a text field and set the txt
myNewMc.onRelease = Delegate( this, onMenuRelease );
{
function onMenuRelease( event:Object):Void
{
event.target.myPropertyOfmyNewMc = somevalue;
}
I could be wrong however...
Mike
On 09/06/06, Jeff Jonez <[EMAIL PROTECTED]> wrote:
This is exactly what I was looking for, cheers Mark and Morten!
> > myNewMc.onRelease = Delegate( this, onMenuRelease, myNewMc );
Previously, I kept a reference to my class in mc variable, which
wasn't so bad codewise... not sure if there are other side effects to
doing that.
Re: Matt
> can you not add your children in a loop?
The children or menu items are added and removed dynamically by
calling add/remove child ( and then I animate them on and off) from
some other class that wants to use the menu
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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