Hello! when I target html5 MouseEvent wont trigger… Here:
class Main extends Sprite
public var button_mc = Assets.getMovieClip("library:maingallery_mc");
public function new()
public function button_mc_listener(event:MouseEvent)
It adds the button_mc properly but nothing happens when I click it What am I doing wrong?
I think it is hard to tell without testing the exact SWF you are using, is it a SimpleButton or a MovieClip?
Try importing openfl.events.* rather than flash.events.*
It is Movieclip, but I’ve also tried Button before I posted about this. Neither of 'em work.
Tried, didn’t work.
Tested it now with
button_mc.visible = false; that worked at least.
New to Haxe&Openfl so I have no idea if
button_mc.nextFrame(); is even supposed to work when targeting HTML5…
It should, but I think the SWF library behaves better when you are animating symbols, rather than having different shapes on multiple keyframes. I’m not sure how your SWF is constructed, but I can say that the SWF library is not perfect, but I’ve used it successfully on multiple complex projects