• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ActionScript is not playing the movieclip on click

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

TOPICS
ActionScript

Views

201

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
community guidelines

correct answers 1 Correct answer

Explorer , Aug 18, 2020 Aug 18, 2020

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

Votes

Translate

Translate
Explorer ,
Aug 18, 2020 Aug 18, 2020

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Community Expert ,
Aug 18, 2020 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

Votes

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

Copy link to clipboard

Copied

LATEST

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

Votes

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
community guidelines