How to change the color of a ProgressBar component via AS3?

I created and added a progressbar component to the stage with actionscript 3.0.  However, I can not find a color property that I can use to change the color of the progressbar.  I am adding two progressbar components, whose color I would like to be different in order to distinguish between the two.  Can anyone provide any assistance
Who is Participating?
tflockConnect With a Mentor Author Commented:
OK, so you first have to create a new ProgressBarSkin in flash.  Just drag a prograssbar component over to the stage and in the library go into the ProgressBarSkins folder and duplicate the Progressbar_BarSkins movie symbo by right clicking on it.  Rename it to "MySkin."  Then change the color of the movie symbol to whatever you wish.  When done set the style of your progressbar as follows:

var myProgressBar:ProgressBar = new ProgressBar();
myProgressBar.setStyle("barSkin", MySkin);
tflockAuthor Commented:
OK, I think I am on the right track with the setStyle method.  I have created a ProgressBarSkin, but have yet to figure out the syntax to use it with the setStyle method.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.