Skip to main content
AlexPromTrad
Inspiring
August 18, 2020
Answered

gotoAndPlay on rollout

  • August 18, 2020
  • 1 reply
  • 253 views

Hello all 🙂

I have this code, which is supposed to play animation from frame 2 (HTML 5 Canvas) whenever the mouse hovers or a click is done to the button. This seems to be working.

The rollout should play the same MovieClip from another frame (8), but when I rollout nothing happens.

I am really lost again here... If anyone could shed some lights I would truly appreciate it.

Thanks in advance 🙂

 

 

 

 

/* Interactivity Starts here */
var frequency = 3;
stage.enableMouseOver(frequency);

//BasePlate
this.basePlateBT.addEventListener("click", MouseClickBasePlate.bind(this));

function MouseClickBasePlate() {
	this.basePlateMC.gotoAndPlay(1);
}

this.basePlateBT.addEventListener("mouseover", MouseOverBasePlate.bind(this));

function MouseOverBasePlate() {
	this.basePlateMC.gotoAndPlay(1);
}
this.bellyBT.addEventListener("mouseout", MouseOutBasePlate.bind(this));

function MouseOutBasePlate() {
	this.basePlateMC.gotoAndPlay(7);
}

 

 

The screenshot below shows where the stops are in the MovieClip

 

 

This topic has been closed for replies.
Correct answer AlexPromTrad

Of course it doesn't work... I have been working for hours on this document... I noticed only now when reading my post...

Sorry!

The name of the instance was wrong

1 reply

AlexPromTrad
AlexPromTradAuthorCorrect answer
Inspiring
August 18, 2020

Of course it doesn't work... I have been working for hours on this document... I noticed only now when reading my post...

Sorry!

The name of the instance was wrong