Hi there. I am just beginning my adventure into AS 3, and came upon
something.
In AS 2 I used to use a custom delegate class to deal with scope issues,
but also be able to pass args (in an array, single string, etc) to my
event functions.
So for example, I might have something in AS 2:
// snipped fro ma method
for (var j:Number = 0; j < 5; j++) {
this._targetMc["dtBtn" + j].onPress =
MyDelegate.create(this, onPressed, j);
}
// event method
function onPressed(i:Number) {
trace(i);
}
So the custom class would allow this to work in my classes.
Now in AS 3 as I have read, the basic delegate class is no longer needed
as the scope issues are dealt with now.
So how would I go about accomplishing the same thing in AS 3?
passing an arg to an event method?
Thanks!
Dustin
_______________________________________________
[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