Copy link to clipboard
Copied
Hello everyone i am new to adobe animate.
I have a symbol named Einstein with frame 1 standing frame 5 90 degrees going to right.
I want to write actionscript when i click on Einstein it must play to frame 5 and stop there.
how can i stop it from playing the frame's automicaly and just play when i click on the symbol and stop at frame 5?
i have this now:
root.muur1.Einstein.addEventListener("click", openeinstein);
function openeinstein()
{
this.Einstein.play();
}
start a loop (eg, enterframe if you were using actionscript) and repeatedly check the current frame until the end frame is reached.
because you're NOT using actionscript and you are using javascript, use a ticker loop, EaselJS v1.0.0 API Documentation : Ticker (createjs.com)
Copy link to clipboard
Copied
start a loop (eg, enterframe if you were using actionscript) and repeatedly check the current frame until the end frame is reached.
because you're NOT using actionscript and you are using javascript, use a ticker loop, EaselJS v1.0.0 API Documentation : Ticker (createjs.com)
Copy link to clipboard
Copied
thank you..
and to disapear can i use this?
root.muur1.Einstein.addEventListener("click", openeinstein);
function openeinstein()
{
root.Einstein.visible= false;
}
because this is not working i get this error:
3escaperoom basis (1).js?1637939759562:81014
Uncaught TypeError: Cannot set properties of undefined (setting 'visible')
at openeinstein (http://127.0.0.1:8090/escaperoom%20basis%20(:8090/1).js?1637939759562:81014:24)
at lib.einstein.b._dispatchEvent (createjs.min.js:12)
at lib.Einsteinkader.b.dispatchEvent (createjs.min.js:12)
at lib.Stage.b._dispatchMouseEvent (createjs.min.js:13)
at lib.Stage.b._handlePointerUp (createjs.min.js:13)
at lib.Stage.b._handleMouseUp (createjs.min.js:13)
at f (createjs.min.js:13)
Copy link to clipboard
Copied
is that supposed to be
root.muur1.Einstein.visible=false;