Highlighted

ActionScript is not playing the movieclip on click

Explorer ,
Aug 18, 2020

Copy link to clipboard

Copied

Hi all,

I am sure I am doing something extremely silly, but I am unable to spot what it is...

I have created the following code in my main scene where there are no animations:

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

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

function MouseClickBasePlate() {
	this.basePlateMC.play();
}

basePlateBT is the name of the transparent rectangle

Capture.JPG

This should trigger the function called "MouseClickBasePlate". I copied and pasted it every single time in the code where I needed it.

The function should play a MovieClip called "basePlateMC"

Capture.JPG

 

The MovieClip has several 'stops' because I need to roll out and also play other parts during other interactions, but nothing happens...

Capture.JPG

 

I am completely lost here... 

I would be very grateful if you could help 🙂

Thanks in advance.

Because of the transparency of the button.... 1% solved the problem....

TOPICS
ActionScript

Views

38

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

ActionScript is not playing the movieclip on click

Explorer ,
Aug 18, 2020

Copy link to clipboard

Copied

Hi all,

I am sure I am doing something extremely silly, but I am unable to spot what it is...

I have created the following code in my main scene where there are no animations:

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

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

function MouseClickBasePlate() {
	this.basePlateMC.play();
}

basePlateBT is the name of the transparent rectangle

Capture.JPG

This should trigger the function called "MouseClickBasePlate". I copied and pasted it every single time in the code where I needed it.

The function should play a MovieClip called "basePlateMC"

Capture.JPG

 

The MovieClip has several 'stops' because I need to roll out and also play other parts during other interactions, but nothing happens...

Capture.JPG

 

I am completely lost here... 

I would be very grateful if you could help 🙂

Thanks in advance.

Because of the transparency of the button.... 1% solved the problem....

TOPICS
ActionScript

Views

39

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
Aug 18, 2020 0
Explorer ,
Aug 18, 2020

Copy link to clipboard

Copied

Because of the transparency of the button.... 1% solved the problem....

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...
Aug 18, 2020 0
Adobe Community Professional ,
Aug 18, 2020

Copy link to clipboard

Copied

Hi.

 

I'm glad you figured it out.

 

Another way of setting up an invisible button is to place a vector shape, bitmap or symbol instance in the Hit frame of a Button symbol and leave the other frames empty.

 

Regards,

JC

__________________________________________
HTML5, JSFL, and AS3 samples: http://bit.ly/2mJgDoG

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...
Aug 18, 2020 1
Explorer ,
Aug 18, 2020

Copy link to clipboard

Copied

Thanks 🙂 I have more issues though... I think I will create a new topic 😄

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...
Aug 18, 2020 0