Copy link to clipboard
Copied
Hello!
I would like to start by saying this place has been very good to me in the past
several years. Thanks.
I have run into an issue, like many who are moving away from AS3 and into Java etc.
I have this code on a project
stop();
setTimeout(timedFunctionLoopB1B,6900);
function timedFunctionLoopB1B() {
gotoAndStop("5");
}
Of course the project is in AS3.
I can not seem to find out how to duplicate the effect in Java script.
it's a simple....'Do not go to this frame for this many seconds' bit of code.
Not attached to any button functions or anything.
See It's just that Adobe Animate gives me unique questions for Java I can not ask someone who does not use
Adobe Animate.
Thanks in advance for any help.
I could not even find a simple code snippet for this in the code library.
It's JavaScript, which is a bit different tJava, but it's quite like ActionScript. This would do the same thing as your example:
this.stop();
var self = this;
setTimeout(timedFunctionLoopB1B,6900);
function timedFunctionLoopB1B() {
self.gotoAndStop("5");
}
'self' is just a variable to store the current level, so that when you say gotoAndStop() it knows what thing it is that you want to change.
Copy link to clipboard
Copied
It's JavaScript, which is a bit different tJava, but it's quite like ActionScript. This would do the same thing as your example:
this.stop();
var self = this;
setTimeout(timedFunctionLoopB1B,6900);
function timedFunctionLoopB1B() {
self.gotoAndStop("5");
}
'self' is just a variable to store the current level, so that when you say gotoAndStop() it knows what thing it is that you want to change.
Copy link to clipboard
Copied
As always this place comes through!
Thank you very much it works great.
This one was bugging me.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now