Is this the correct behavior? if I have a event.COMPLETE on the movie clicp, and then gotoandstop should this fire the complete? or only if I set it to the last frame?
REAL programmers type copy con filename.exe
---------------------------------------
Comments
When a MovieClip object finishes it playing (by reaching its final frame or a frame with stop action), it dispatches an Event.COMPLETE event.
So yes when it finishes as in reaching last frame.
Or you can set stop action using MovieClip:setStopAction(frame) method to launch this event on sub animation
test code is you best friend
gotoAndStop will not fire the event
local mc = MovieClip.new{{1, 10, stage}}
mc:addEventListener(Event.COMPLETE, function() print('complete') end)
mc:gotoAndStop(2)
Likes: Cyberience
https://sites.google.com/site/xraystudiogame
---------------------------------------