Closed patrixd closed 8 years ago
This works fine for me:
class TestImage extends Image {
public function new() {
super();
this.addEventListener(UIEvent.CLICK, onClickButton);
}
private function onClickButton(event:UIEvent) {
trace("TestImage::onClickButton");
}
}
and
Toolkit.open(function(root:Root) {
var t:TestImage = new TestImage();
t.resource = "assets/haxeui.png";
t.addEventListener(UIEvent.CLICK, function(e:UIEvent) {
trace("another click");
});
root.addChild(t);
});
I think that @patrixd would have the same problem with #332 . I hope that she can confirm that the last commit works in her code.
Yes @aW4KeNiNG now it works. Thank you so much.
Sorry, totally forgot about this... thank @aW4KeNiNG!
@patrixd - can you close this if you feel its fixed when you get a moment?
Cheers guys!
Hi I'm trying to listen more than one event to an image and only works the first handler of the events listened. What I have to do to make it works?
If I listen the object outside:
onClickButton2 does not work. It should be called fist onClickButton and after onClickButton2. In onClickButton I'm not doing anything that induce this behaivour. Thanks a lot.