Highlighted

Button inside a movie clip - HTML5

Community Beginner ,
Apr 14, 2020

Copy link to clipboard

Copied

Hello guys!
I have this code below in button within 1 movie clip:

this.opcao_1.addEventListener("click", fl_ClickToGoToAndPlayFromFrame_11.bind(this));

function fl_ClickToGoToAndPlayFromFrame_11()
{
	this.gotoAndPlay(150);

When I test the film, the button does not advance to the frame.
Could someone help me?

Views

161

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Button inside a movie clip - HTML5

Community Beginner ,
Apr 14, 2020

Copy link to clipboard

Copied

Hello guys!
I have this code below in button within 1 movie clip:

this.opcao_1.addEventListener("click", fl_ClickToGoToAndPlayFromFrame_11.bind(this));

function fl_ClickToGoToAndPlayFromFrame_11()
{
	this.gotoAndPlay(150);

When I test the film, the button does not advance to the frame.
Could someone help me?

Views

162

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 14, 2020 0
Adobe Community Professional ,
Apr 14, 2020

Copy link to clipboard

Copied

You need to give your movieclip an instance name.

here is an example.


/* Click to Go to Frame and Play
Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and continues playback from that frame.
Can be used on the main timeline or on movie clip timelines.

Instructions:
1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.
2.Frame numbers in EaselJS start at 0 instead of 1
*/

this.ball.addEventListener("click", fl_ClickToGoToAndPlayFromFrame.bind(this));

function fl_ClickToGoToAndPlayFromFrame()
{
this.gotoAndPlay(150);
}

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 14, 2020 0