Category Archives: Flash

Making your own controls for flv playback

The skins that come with the FLVPlayback Component are workable, but sometimes you want something a little more attractive. If you’re wanting to make your video and your soundslides component look consistent, you can use some simple ActionScript (2) to control your video.

1) Put the FLVPlayback component on the stage. Give the file path as you usually would, but tell the component that you don’t want any skins.

2) Give the component an instance name (in this example, we’re using the name: myVideo). You can name it whatever you want, as long as you use the same name (case sensitive) and you don’t repeat names within the project.

3) Just make a play and stop button like you usually would (or use the play and stop buttons from your soundslides) and then put this code on them:

For the play button:

on (release) {
_root.myVideo.play();
}

And for the stop button:

on (release) {
_root.myVideo.stop();
}

4) Go ahead and try it out!

HOW IT WORKS    When the user clicks on the button, the player/browser is told to look for the instance name of the component in the root folder in your library (_root). Then the play or stop action is associated with only the objects with that instance name.

Have fun!

Advertisements