Actionscript 3.0 Play and pause add effect.
Posted
by Jordan Pagaduan
on Stack Overflow
See other posts from Stack Overflow
or by Jordan Pagaduan
Published on 2010-05-19T22:47:01Z
Indexed on
2010/05/19
22:50 UTC
Read the original article
Hit count: 233
as3
|actionscript-3
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
© Stack Overflow or respective owner