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

How to open one pop-up and close the other?

Participant ,
Mar 26, 2020 Mar 26, 2020

Copy link to clipboard

Copied

Hi,

I'm making a simple infographics and I'd like pop-up boxes to open and close as the user mouse overs different parts of that infographics. Something similar to a toggle function in Java Script just that here we are not showing/hiding element but playing it.

 

I have recorded a video and have attached it to this post. Hopefully everything is well explained.

 

I'm also copy-pasting the code:

 

 

var _this = this;
/*
Mousing over the specified symbol instance executes a function.
'3' is the number of the times event should be triggered.
*/
stage.enableMouseOver(3);
_this.buttonBlue.on('mouseover', function(){
/*
Play a Movie Clip/Video or the current timeline.
Plays the specified movie clip or video.
*/
_this.popupBlue.play();
/* what code to add here to make sure the currently open pop up is closed? */
});


var _this = this;
/*
Mousing over the specified symbol instance executes a function.
'3' is the number of the times event should be triggered.
*/
stage.enableMouseOver(3);
_this.buttonRed.on('mouseover', function(){
/*
Play a Movie Clip/Video or the current timeline.
Plays the specified movie clip or video.
*/
_this.popupRed.play();
/* what code to add here to make sure the currently open pop up is closed? */
});


var _this = this;
/*
Mousing over the specified symbol instance executes a function.
'3' is the number of the times event should be triggered.
*/
stage.enableMouseOver(3);
_this.buttonYelow.on('mouseover', function(){
/*
Play a Movie Clip/Video or the current timeline.
Plays the specified movie clip or video.
*/
_this.popupYellow.play();
/* what code to add here to make sure the currently open pop up is closed? */
});

 

 

Views

189

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
no replies

Have something to add?

Join the conversation