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

gotoandplay action on button - propety access not defined

New Here ,
Jun 13, 2023 Jun 13, 2023

Hello,

I used to play with Adobe Flash since Action Script 2.0 (looong time ago) and now I'm doing an interactive video with Animate 23.0.2.

I did a Button and called his istance "TRADIZIONALE_inst".
When i try to insert an action (gotoAndStop) and play the movie the debug tell something similar:
"property not defined TRADIZIONALE_inst".

This is the code in the action panel:

TRADIZIONALE_inst.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_3);
function fl_ClickToGoToAndStopAtFrame_3(event:MouseEvent):void
{
gotoAndStop(5);
}


Can you help me please?

153
Translate
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 ,
Jun 13, 2023 Jun 13, 2023

is your project an html5/canvas project?

Translate
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 ,
Jun 13, 2023 Jun 13, 2023

Hello kglad, no, Action Script 3.0

 

Translate
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 ,
Jun 13, 2023 Jun 13, 2023

then there's no TRADIZIONALE_inst existing when your problematic code executes.

Translate
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 ,
Jun 13, 2023 Jun 13, 2023

I think i found the error.
I've placed the button at frame 750 where the script start.
Placing button at frame 1 there are no problems.

Translate
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 ,
Jun 13, 2023 Jun 13, 2023
LATEST

ok.

Translate
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