Actionscript 3.0 Play and pause add effect.
- by Jordan Pagaduan
layer 1 -- an embeded video
layer 2 -- an invisible button
**Here is my code in layer 3**
stop();
var vid:Boolean = true;
function vid_event(event:MouseEvent) {
if (vid) {
stop();
event.target.gotoAndStop('pause');
vid = false;
} else {
play();
event.target.gotoAndStop('play');
vid = true;
}
}
vid_btn.addEventListener(MouseEvent.CLICK,vid_event);
I already get the play and pause fuction (that's all i need). I just want to add an image to show when the video still not playing in and pause. If the video played the image will disappear and if pause the image will appear.
Thank You