Skip to main content
AlexPromTrad
Inspiring
August 18, 2020
Answered

ActionScript is not playing the movieclip on click

  • August 18, 2020
  • 2 replies
  • 355 views

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

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"

 

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

 

I am completely lost here... 

I would be very grateful if you could help 🙂

Thanks in advance.

This topic has been closed for replies.
Correct answer AlexPromTrad

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

2 replies

JoãoCésar17023019
Community Expert
Community Expert
August 18, 2020

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

AlexPromTrad
Inspiring
August 18, 2020

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

AlexPromTrad
AlexPromTradAuthorCorrect answer
Inspiring
August 18, 2020

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