Or you could use another Delegate class. There is the Proxy class I
believe (can't remember who did it) and the one I use the most is the
one on dynamicflash.com
http://dynamicflash.com/2005/05/delegate-version-101/
You can pass parameters in the Delegate call
myButton.onRelease = Delegate.create(this, myFunction, param1, param2, ...);
Merrill, Jason wrote:
In this case the delegate will send to the btnRollOver
function only the parameters of the event onRollOver.
You will have to find another way to solve this problem...
maybe extend the MovieClip class, or maybe it could be better
to not use the delegate.
Actually, you can do it this way:
import mx.utils.Delegate
var myDel:Object = myButton.onRelease = Delegate.create(this,
myFunction);
myDel.myVariable = "Hello World";
function myFunction()
{
trace(arguments.caller.myVariable)
}
Jason Merrill
Bank of America
GT&O Learning & Leadership Development
eTools & Multimedia Team
_______________________________________________
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