Copy link to clipboard
Copied
If any one can help!, I have 2 frames, first frame has a this.stop(); and I want to go to the second frame afer x seconds (11), but only if I havent already gone to the second frame by hovering a button object.
So srated with var _frame1 = "f1"; and tried to updated that with_frame1 = "f2"; on mouseover so the if statement wouldn't run the code for the second time.
var _frame1 = "f1";
if(_frame1 == "f1") {
var t=setTimeout(function(){
console.log(this, _this);
_this.gotoAndPlay("frame2_play");
}, 11500);
}
this.ball_ani_3.ball_graphic_outer_frame1.ball_graphic_text.hotspot_outer.hotspot.addEventListener("mouseover", ballMouseOver3.bind(this));
function ballMouseOver1()
{
//play
var t=setTimeout(function(){
console.log(this, _this);
_this.gotoAndPlay("frame2_play");
}, 1000);
//set frame position
_frame1 = "f2"
}
there are a few problems with your code. try:
Copy link to clipboard
Copied
there are a few problems with your code. try:
Copy link to clipboard
Copied
Thanks this work perfectly.
Copy link to clipboard
Copied
you're welcome.