We write the following code in the first (0) frame:
var s=this
S.stop ()
My favorite shorthand: Unable to move out of the binding event! and jquery can be directly. Unbind ("event name")
S.btn.on ("MouseDown",function (e) { S.btn.removeeventlistener ("MouseDown") Console.log ("FRAME0 MouseDown") s.btn.gotoandstop (1)}
Try to write a little bit more: unable to move out of the binding event
S.btn.on ("MouseDown", Frame0click)function Frame0click (e) { S.btn.removeeventlistener ( "MouseDown", Frame0click) Console.log ("FRAME0 MouseDown") s.gotoandstop (1)}
No way to write all: successfully move out of bound events
S.btn.addeventlistener ("MouseDown", Frame0click)function Frame0click (e) { S.btn.removeeventlistener ("MouseDown", Frame0click) Console.log ("FRAME0 MouseDown") s.gotoandstop (1)}
Still don't give up. Simplified: Unable to remove bound event
S.addeventlistener ("MouseDown",function(e) { S.btn.removeeventlistener ("MouseDown") Console.log ("FRAME0 MouseDown") S.gotoandstop (1)})
Try it out: Successfully move out of bound events
S.btn.addeventlistener ("MouseDown",function Frame0click (e) { S.btn.removeeventlistener ( "MouseDown", Frame0click) Console.log ("FRAME0 MouseDown") s.gotoandstop (1)} )
In the end, I did not forget, I introduced jquery in the page, write in Flash: successfully moved out of the binding event
$ (s). Btn.on ("MouseDown",function(e) { $ (s). Btn.unbind ("MouseDown") Console.log ( "FRAME0 MouseDown") s.gotoandstop (1)})
On the mobile side, you need to add a sentence to the page
Createjs. Touch.enable (stage);
Then MouseDown will be able to start the Touchstart effect!
Createjs move out bound event in FLASH CC. CANVAS