Quote Originally Posted by funnysora View Post
While a video is playing, I want to create a randomly pop up message / quiz that needs user to make a selection or hit OK.
When the message / quiz pop up, the video would be stopped at that point in time and after user make the selection or hit OK, the video would resume playing.
Alright. do you want pop-ups to appear at a random intervals?
i would recommend something like this:

___
Actionscript Code:
var myInt:Number = random(*any number 1*) + *any number 2* /*this creates a variable called 'myInt' with a value of *any number 2* + something between 0 and *any number 1* */

var current:Number = 0;

_root.onEnterFrame = function(){
if(current < myInt){
current += 1/12;
}else{
popup();
}
}

function popup():Void{
_root.stop();
duplicateMovieClip(myMc_mc, *any level*, 'popup_mc');
popup_mc.onEnterFrame = function(){
this.onMouseUp = function(){
if(this.okay_btn.rollover == true){
confirm();
}
}
}
}


function confirm():Void{
current = 0 // if you want to repeat the popup only!!
_root.play();
}
____

does this satisfy you? Of course, it might need just a little debugging (i do not have flash at hand right now, so i couldn't check it for mistakes...)

Cheers!

KoenAhn