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) {;

And for the stop button:

on (release) {

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!


About Marguerite Halley

Marguerite has been working in digital content and design for universities and nonprofits through her entire career. As a digital content strategist at Washington University in St. Louis and a usability/content strategy consultant for nonprofits, she’s a champion for the user and an advocate for clear, engaging content on the web.

Posted on 05/04/2011, in Flash, making it work. Bookmark the permalink. 1 Comment.

  1. Gotta thank you for this. Spent an hour looking for a solution that worked. Plugged in your AS and *BOOM* I’m up and running. Thanks!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: