Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8551429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:11:38+00:00 2026-06-11T14:11:38+00:00

I am creating a custom video player in Flex 4. I need to create

  • 0

I am creating a custom video player in Flex 4.

I need to create a custom seek bar such that it has three layers, same as the youtube video player has. First layer is the background, second layer is the download progress and the third layer is the elapsed video. The seek bar would be click able as well.

How can I create such component in Flex 4.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T14:11:39+00:00Added an answer on June 11, 2026 at 2:11 pm

    Unfortunately, I do not believe the built in ScrubBar class has this functionality so you would be better off building it on your own (rather than adding it to that class).

    To do this, I would create a new MXML component based on Group. Within that component, you need four things: three Rects for your bars/background and an ellipse (or another rect or whatever you want) for the playhead. Layer them on top of each other. Set the background rect to be 100% height and width, the other two to just be 100% height.

    Now, what you want to do is create an section and write some AS3 to handle the changes. Note that this is how I personally would do it, but not necessarily how you must do it. For instance, I know most people would frown upon the use of getters-setters, but I think this is the perfect opportunity for it.

    private var _progress:Number; //0-1
    private var _download:Number; //0-1
    
    public function set progress(value:Number):void{
        this._progress = value;
        this.progressBar.percentWidth = value * 100;
        this.playhead.x = value * this.width - this.playhead.width / 2;
        this.dispatchEvent(new Event(Event.PROGRESS)); //this line is optional and you would be better suited creating your own VideoEvent class to handle events across the entire player rather than using the built in events.
    }
    
    public function get progress():Number{
        return this._progress;
    }
    
    public function set download(value:Number):void{
        this._download = value;
        this.downloadBar.percentWidth = value * 100;
    }
    
    public function get download():Number{
        return this._download;
    }
    

    Obviously, that is just the basics. You could go much further into it and add more functionality. For instance, there is no functionality for scrubbing the playhead or clicking on the progress bar to seek. Both are relatively easy to implement, however, just make sure you dispatch events so that you can know from other classes when these things happen.

    Now, from your Video Controls class, you’ll need to tie the progress and download properties of your scrubbar class to your VideoDisplay or NetStream events. To do this, you would simply add eventListeners to whichever you use that listen for Progress and buffer changes (Unsure what you would use for VideoDisplay, but for NetStream you have to listen for NetStatus.STATUS to get buffer and other goodies and you have to create a Timer to listen for the progress, unfortunately). In each respective function, you simply set the proper property to the value your VideoDisplay or NetStream object gives you (In NetStream’s case, ns.time for current time and ns.bytesLoaded for download).

    I only skimmed over what you need to do, but this should hopefully give you enough of an idea to start work on this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Core video experts, I'm creating a custom video player for .mov files. I have
I am creating a custom video player in a C# form. At present the
I have been creating a custom video player for the web. On some machines
Jython is great for creating custom data structures on need basis, but how to
I am creating custom Swing components and want to provide a UI that looks
I need to implement creating custom gesture(like Gesture Builder in Android ) in my
I'm creating custom control and because I need to do lot's of binding inside
I'm creating custom control that contain multiple parts. Inside template creation I'm subscribing for
while creating custom item renderers which interfaces we need to implement? Thank in advance.
I am creating custom images that I later convert to an image pyramid for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.