Copy link to clipboard
Copied
on 1st frame of stage I have a symbol on the canvas. The symbol has a this.stop(); on first frame of it.
How can I get this to play from code on stage?
this.symbolName.gotoAndPlay(2); //doesn't work
var self = this;
self.symbolName.gotoAndPlay(2) // doesn't work
What am I doing wrong?
Did you actually name your symbol instance "symbolName"?
If you do console.log(self.symbolName) does it display the symbol or undefined?
Do you understand that in a Canvas document gotoAndPlay(2) will actually go to the third frame of a clip?
If your gotoAndPlay code is on the same frame where the clip first appears, it will fail because the clip hasn't fully initialized yet.
Copy link to clipboard
Copied
Did you actually name your symbol instance "symbolName"?
If you do console.log(self.symbolName) does it display the symbol or undefined?
Do you understand that in a Canvas document gotoAndPlay(2) will actually go to the third frame of a clip?
If your gotoAndPlay code is on the same frame where the clip first appears, it will fail because the clip hasn't fully initialized yet.
Copy link to clipboard
Copied
The code was on the same frame as where the clip first appears. I didn't know this was how it worked. Thank you
Find more inspiration, events, and resources on the new Adobe Community
Explore Now