Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
is video an flvplayback component?
if yes, you need to use a skin that does not already have a seekbar.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
is your video loading and playing?
if yes and there are no error messages, post a link to your fla.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
your seekbar works for me. what doesn't work for you?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more