thank you for your reply, I am using OpenFL from Haxelib, which shows last update was on 29th March 2016, so I assume on next release of OpenFL it will be working, or if I use OpenFL from GIT it should be working
Hello. The link I’ve provided to you is the link for all pull requests of swf lib (and not of openfl). There are at least 2 pull requests that can help fix your bug.
I hope these pull requests will be merged soon but you can update the lib by yourself using these pull requests if you need it now.
thank you again for the reply, I tried to use latest lime, openfl and swf from git but my project failed to compile so I went back to the haxelib version, currently I solved it as I stated by calling event.stopPropagation(); however it is really nice to know that this will be fixed in next releases
I was thinking about the one you have commited yesterday and this one. But it seems to only affect currentLabel and not currentFrame, sorry for the confusion. The above linked commit fix the frame number called when you use a label in gotoAndPlay/Stop if I remember correctly.
I may take a look in this bug next time I use swf lib.
I am using OpenFL from Haxelib using FlashDevelop
I also created the swf in Adobe animate CC, I called the Movieclip class as TestMovie, I also gave a label for each frame as test1, test2, test3 etc.
here is my code:
var cc:TestMovie = new TestMovie();
var frm:Int = 3;
cc.gotoAndStop(frm);
addChild(cc);
trace("expected label: test" + frm + " we got:" + cc.currentFrameLabel);
trace("expected frame: " + frm + " we got:" + cc.currentFrame);
the output:
Flash:
Main.hx:28: expected label: test3 we got:null
Main.hx:29: expected frame: 3 we got:0
HTML5:
Main.hx:28: expected label: test3 we got:undefined
Main.hx:29: expected frame: 3 we got:3
Neko:
Main.hx:28: expected label: test3 we got:null
Main.hx:29: expected frame: 3 we got:3
Actually another thing happened, when I added labels to the keyframes, the movieclip always shows the content of frame 1 in all targets, even though I set current frame to 3 in code, and in HTML5 and Neko they reported current frame 3 but display frame 1.