Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Seek Bar Component Flash CS5

New Here ,
Feb 12, 2013 Feb 12, 2013

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.

TOPICS
ActionScript
2.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 12, 2013 Feb 12, 2013

is video an flvplayback component?

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 12, 2013 Feb 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 12, 2013 Feb 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 12, 2013 Feb 12, 2013

Hi, couldn't quite get everything in two screenshots:

1. FLV & properties:

http://gyazo.com/df0848ed58e3b86c15a9f3ea51cd13c0

2. Seekbar selected & properties

http://gyazo.com/c54da21cfc29727f2ea0a38f5d794926

3. Actionscript in "Actions" layer

http://gyazo.com/92bd65d25dff0c027a04bd3f1b62542a

Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 12, 2013 Feb 12, 2013

is your video loading and playing?

if yes and there are no error messages, post a link to your fla.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 12, 2013 Feb 12, 2013

Yeah it plays fine, my custom play and pause buttons work.

I've uploaded the files here, I'm assuming you needed the relevant images and video aswell?

http://uploadir.com/uploads/89pex8w6/downloads/new

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 12, 2013 Feb 12, 2013

your seekbar works for me.  what doesn't work for you?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 13, 2013 Feb 13, 2013

Hi, the seekbar displays but nothing happens. There is no slider for me to skim through the video etc.

It's as though it is not being referenced in the code.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Feb 13, 2013 Feb 13, 2013
LATEST

Make sure you target Actionscript 3 in your publishing options.

Targeting As2 will not throw an error, but the seekbar component will not be functionable.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines