Hi all I video playing using the FLVPlayback component. I know I can use one of multiple skins provided by adobe but I need to make my own simple play and pause buttons. I also need to do this within a class.
What I have is the FLVPlayback component called vid which fetches the video from an XML file and works fine. I also have a button called btn_play and the following code in the class file:
...
btn_play.addEventListener (MouseEvent.CLICK, playvid);
...
public function playvid (e:Event) {
}
...
Im not sure what code to use to make the video actually play. Also will need one for pause too. Finally if you have any idea how I can assign keyboard entry to these buttons or just the video i.e. pressing p on the keyboard makes it play etc id be grateful 🙂
you can control the FLVPlayback component though your class using this info here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/video/FLVPlayback.html. Your play button code would look something like this:
To listen for keyboard events first attach a listener to the stage:
Then when you catch the KeyBoardEvent you can perform actions based on the key code.