Hey im kinda new to Flash.

I have a FLVPlayback Component and i want to disable the option to scrubb through the video.
does anyone know how to do that? (googling didn't do much of an help)

Recommended Answers

All 4 Replies

What do you mean by 'scrub through'?
If you mean that you want to remove the fast forward/rewind controls, or the bar which shows the current progress through the movie, you can simply use an alternative skin for your FLVPlayback component.

Assuming you're creating your instance of the FLVPlayback component on the stage from within the Flash IDE, the easiest way to do this would be to select the instance of the component on the stage and open up the component inspector window by selecting 'Window->Component Inspector' in the main menu or by pressing Alt + F7.

In the 'Parameters' tab of the component inspector window, click on the 'skin' property and then select the magnifying glass, this will bring up a dialog which will allow you to select a different skin for your component, so you could choose one of the more basic skins which has only the play/pause button and the mute button (with no progress bar, volume control or FF/RW buttons).

Alternatively, you could select 'none', so your FLVPlayback component will have no controls on it. If you set the autoplay property to true, your movie will play from start to finish as soon as it has loaded, but the user would have no way to control the playback, so you'd have to control/monitor playback via actionscript if you wanted to allow the video to be played again.

Otherwise, if you really want to you could have a go at creating your own skin and using that. Offhand, it's been a while since I did any serious flash development, so I can't remember too many of the details with regard to reskinning the FLVPlayback component, but you should be able to find tutorials online which covers this.
I seem to recall it wasn't particularly difficult to do when I tried, but I can't remember the exact process. It was a long while ago now! (back when Flash 8 was new!)

Anyway, I hope that is of some use.
Cheers for now,
Jas.

Thank you i knew of this possibility.
but what i want is a skin with the progress bar showing but disabling the option to go forward in the clip. its possible via forward\rewind buttons + via the progress bar and i want both disabled.
That's why i don't think creating my own skin is the right choice. i think i should implement the FLVPlayback Component but i just wanted to know if there is a faster way like an property i can set to false :)

Well, here's a link to the Adobe documentation for the FLVPlayback component:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/video/FLVPlayback.html

I can't test this because I haven't got any of the AS3 components (I use the flex SDK rather than the Flash IDE nowadays), but according to the documentation there is a member of the FLVPlayback component class called seekBar. So you could try setting the 'enabled' property of seekBar to false.
e.g.

myFLVComponent.seekBar.enabled=false;

Do the same for the forwardButton and the backButton members to disable the ffwd and rewind buttons.

Like I said, I can't test it, but it might work!

Otherwise if that doesn't work, the Pro editions of Flash ship with the source .fla's for all of the FLVPlayback component skins. So you could grab a copy of the .fla for the skin you're using and edit it to remove the hitstate for the seekBar (it'll probably be a long, thin, purple, pink or blue overlay over the top of the seekBar, or perhaps a small square or rectangle over the slider).
Again, you can do the same for the forwardButton and the backButton. Then all you do is re-publish the skin and use it.

To help you to find the source .fla's there's a post towards the bottom of this page that might help:
http://www.kirupa.com/forum/showthread.php?t=287148

Otherwise, simply use a skin that doesn't include the forward/back buttons or the bar, or use the 'no skin' option and perhaps create some controls of your own to go into your swf to control the playback and display the progress through the video!
Other than that, I'm pretty much out of ideas!

Cheers for now,
Jas.

Disabling the seek bar would have worked but it would have removed the seek bar but i still wanted the seek bar to show so that didn't do good.

And i tried modifing a skin by deleting the hit state but for some reason that didn't work.

But i solved the problem in the end so thank you all for your help :)

For future googlers:
Eventully i used a NetStream object instead of FLVPlayback and just didn't add a listener to scurbbing the seek bar.
this Tutorial was of great help:
http://www.thetechlabs.com/tech-tutorials/audionvideo/how-to-build-a-as3-videoplayer/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.