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 1958046
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T07:57:47+00:00 2026-05-17T07:57:47+00:00

I wanna set a custom skin on my progressBar, but it’s not working out

  • 0

I wanna set a custom skin on my progressBar, but it’s not working out the way I want it to. My skin has 3 different colors on it (green, yellow, red) and green should show until it’s about 50%, then I want the yellow to appear after green and the red at 90% after green and yellow. So at 100% they should all show.

The problem is that the ProgressBar only sets the width of my skin so all colors are showing at all times. But if I use the indeterminateSkin but dont set indeterminate to true that doesn’t happend.

How can I make a skin that doesn’t just change width? Atm I’m just using a MovieClip for a skin.

  • 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-05-17T07:57:48+00:00Added an answer on May 17, 2026 at 7:57 am

    I’ve done this in the past using programmatic skins. You need to create your own versions of ProgressBarSkin and ProgressBarMaskSkin and optionally ProgressBarTrackSkin. In your ProgressBarSkin, you can override the updateDisplayList method like so:

        override protected function updateDisplayList(w:Number, h:Number):void {
            super.updateDisplayList(w, h);
            graphics.clear();
    
            var fullWidth:int = w;
            if (parent != null && (parent as UIComponent).mask != null)
                fullWidth = (parent as UIComponent).mask.width;
    
            var matrix:Matrix = new Matrix();
            matrix.createGradientBox(fullWidth, h);
            var colors:Array = [0xd00000, 0xf0d000, 0x00ff00];
    
            this.graphics.lineStyle();
            this.graphics.beginGradientFill(GradientType.LINEAR, colors, [1,1,1], [0,128,255], matrix); 
            this.graphics.drawRoundRect(2, 2, w - 4, h - 4, h - 4); 
        }
    

    And in your ProgressBarMaskSkin do this:

        override protected function updateDisplayList(w:Number, h:Number):void {
            super.updateDisplayList(w, h);
            graphics.clear();
    
            this.drawRoundRect(2, 2, w - 4, h - 4, (h - 4) / 2, 0xffffff, 1); 
        }
    

    Then you assign your skin classes to your progress bar and you are set. Hope that helps.

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

Sidebar

Related Questions

I want to get print out invoice but also wanna set margins and page
I wanna make a databinding in a custom class. But it seems different from
I have a Class CButtonCreate without get & set Methode. But i wanna use
I want to set System.Web.Security.Membership.HashAlgorithmType (or thru web.config) to a custom Cryptography class I
Since i dont want to change openx coding and i wanna to set the
I wanna a function to detect whether VIM has enabled 'set nu' feature. How
I wanna set up a way in which users can place a marker on
I wanna set My Scene Background but I don't know how! I had read
I have a dropdownlist with values -1,1,2 and text A,B,C i wanna set B
I wanna build a gallery, but the my problem is how to load the

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.