There are button, picture box, text, link etc. in the dialog.
If I put everything in another layer with new movieClip, it seems I have to change all the x and y for each control in the movieClip when the dialog is popup. e.g.
import fl.video.*;
videoPlayer.autoRewind = false;
videoPlayer.addEventListener(fl.video.VideoEvent.PAUSED_STATE_ENTERED,showText);
videoPlayer.addEventListener(fl.video.VideoEvent.STOPPED_STATE_ENTERED,showText);
function showText(event:fl.video.VideoEvent):void {
//move each control
textWindow.x = 275;
textWindow.y = 200;
btn_1.x = 255;
btn_1.y = 200;
btn_2.x = 235;
btn_2.y = 200;
................................
}
textWindow.resumeButton.addEventListener(MouseEvent.MOUSE_UP,playVideo);
function playVideo(event:MouseEvent):void {
textWindow.y = -500;
videoPlayer.play();
}