In flex, I am handling event like this,
myImage.addEventListener(MouseEvent.CLICK, redoOperation);
Now, I want to pass some value to redoOperation. (function redoOperation(myId:String)) How can I pass String to it?
In flex, I am handling event like this,
myImage.addEventListener(MouseEvent.CLICK, redoOperation);
Now, I want to pass some value to redoOperation. (function redoOperation(myId:String)) How can I pass String to it?
I would use an anonymous function and pass the parameter in that way. This is similar to how you would do it in JavaScript.
myImage.addEventListener(MouseEvent.CLICK, function(e:Event):void { redoOperation(myId); });