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? */
});
Have something to add?