View Full Version : [AS3] Video Component???
skubeedoo777
06-06-2009, 07:01 PM
:confused:I'm trying to make a play button from the components work. I watched a tutorial on this, but in the tut, they dragged a play button component to the stage and that was it...doesn't work that way. With the flvplayer on stage, how do you drag a play button component onto the stage and get it to work????
as3_novice
06-08-2009, 01:59 AM
You have to assign the play button and flvplayback component an instance name and then add an eventlistener to the play button. Make sure your set your "skin" to "none" and your video source via the Component Inspector. The code below will work assuming your play button is called "play_btn" and your flvplayback component is called "player".
play_btn.addEventListener(MouseEvent.MOUSE_DOWN, playVideo);
function playVideo(e:MouseEvent):void
{
player.play();
}
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.