Skip to main content
Participant
February 12, 2013
Question

Seek Bar Component Flash CS5

  • February 12, 2013
  • 1 reply
  • 2712 views

Hi, I've been trying to use the seek bar component in Flash CS5.

I've managed to use create my own play and pause buttons using the following code:

playbtn.addEventListener(MouseEvent.CLICK, fl_ClickToPlayVideo);

function fl_ClickToPlayVideo(event:MouseEvent):void

{

          // Replace video_instance_name with the instance name of the video component

          video.play();

}

pausebtn.addEventListener(MouseEvent.CLICK, fl_ClickToPauseVideo);

function fl_ClickToPauseVideo(event:MouseEvent):void

{

          // Replace video_instance_name with the instance name of the video component

          video.pause();

}

I've dragged the SeekBar component onto the stage and given it an instance name of "mySeekBar".

I have then referenced this in the Actionscript as follows:

video.seekBar = mySeekBar;

However, the seek bar doesn't work. It displays but there is no slider etc.

Can anyone help me out as I have very little knowledge of Actionscript!

Thanks.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
February 12, 2013

is video an flvplayback component?

if yes, you need to use a skin that does not already have a seekbar.

aiden94Author
Participant
February 12, 2013

Hi, thanks for the reply. Yes, "video" is an flvplayback component.

I have the skin set to "none" because I obviously don't want any controls.

Do I need to set a skin?

Thanks.

kglad
Community Expert
Community Expert
February 12, 2013

no skin is needed. 

everything should work as expected if you've done what you explained.

attach two screenshots.  one showing the timeline, the flvplayback component (selected) and the properties panel.  the other showing the timeline, the seekbar (selected) and the properties panel and the actionsc panel showing your actionscript.