• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

actionscript

New Here ,
Nov 26, 2021 Nov 26, 2021

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();

}

Views

174

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 26, 2021 Nov 26, 2021

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)

Votes

Translate

Translate
Community Expert ,
Nov 26, 2021 Nov 26, 2021

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 26, 2021 Nov 26, 2021

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 04, 2021 Dec 04, 2021

Copy link to clipboard

Copied

LATEST

is that supposed to be

 

root.muur1.Einstein.visible=false;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines