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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:34:32+00:00 2026-06-09T12:34:32+00:00

I have created a custom progressBar by extending from flex’s progressBar. I want to

  • 0

I have created a custom progressBar by extending from flex’s progressBar. I want to insert an gif image in the custom progressBar by using flex’s Image but nothing happen.

Do i need to implement any flex interface? Please advice.

Thank you

package com
{

    import mx.controls.Image;
    import mx.controls.Label;
    import mx.controls.ProgressBar;
    import mx.core.mx_internal;

    use namespace mx_internal;


    public class CustomProgressBar extends ProgressBar
    {
        [Embed("resource/images/running_animated_gif.gif")]
        [Bindable]
        public var runningGif:Class;

        public function CustomProgressBar()
        {
            super();
        }

        override protected function createChildren():void
        {
            super.createChildren();

            var gifImage:Image = new Image();
            gifImage.source = runningGif
            addChild(gifImage);
        }

    }
}
  • 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-09T12:34:33+00:00Added an answer on June 9, 2026 at 12:34 pm

    There are skin properties for ProgressBar. You can apply your custom skin component to it.
    Below example may help you to add skin to your custom progressbar class.

    class Name: – CustomProgressBar.as

    package
    {
        import mx.controls.ProgressBar;
    
        public class CustomProgressBar extends ProgressBar
    
        {
            public function CustomProgressBar()
            {
                super();
                this.setStyle("trackSkin", CustomProgressBarTrackSkin);
            }
        }
    }
    

    In your skinclass you can add image which will get displayed on your progress bar.
    CustomProgressBarTrackSkin.mxml

    <?xml version="1.0" encoding="utf-8"?>
    <s:SparkSkin name="CustomProgressBarSkin"
                 xmlns:fx="http://ns.adobe.com/mxml/2009"
                 xmlns:s="library://ns.adobe.com/flex/spark" >
    
        <fx:Script>
            <![CDATA[
                override protected function initializationComplete():void {
                    useChromeColor = true;
                    super.initializationComplete();
                }
            ]]>
        </fx:Script>
    
        <!-- layer 1: fill -->
        <s:Rect left="2" right="2" top="2" bottom="2" >
            <s:fill>
                <s:BitmapFill source="@Embed('resource/images/running_animated_gif.gif')" fillMode="repeat" />
            </s:fill>
        </s:Rect>
    
        <!-- layer 2: border -->
        <s:Rect left="2" right="2" top="2" bottom="2" >
            <s:stroke>
                <s:LinearGradientStroke rotation="90">
                    <s:GradientEntry color="0xFFFFFF" alpha="0.9" />
                    <s:GradientEntry color="0xFFFFFF" alpha="0.5" />
                </s:LinearGradientStroke>
            </s:stroke>
        </s:Rect>
    
        <!-- layer 3: right edge -->
        <s:Rect right="1" top="2" bottom="2" width="1" >
            <s:fill>
                <s:SolidColor color="0x000000" alpha="0.55" />
            </s:fill>
        </s:Rect>
    
    </s:SparkSkin>
    

    In the same way you can create different class for different skins ex. barSkin etc…

    this may help you…

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

Sidebar

Related Questions

i have created custom components in flex where i have used a button,i want
I have created a custom class from a tutorial online. It works fine, but
I have created custom posts and I want one page in my site to
I have created custom cell in which there are n number of image views.
friends, i have created custom title bar using following titlebar.xml file with code <?xml
I have created a custom control but I can't bind a property to the
I have created a custom attribute that I am using on my class MyClass
I have created a custom tab layout which look like this,I want to make
I have created a custom binding to replace the wsHttpBinding that I was using
I have created a custom activity that I am using in my workflows. Initially

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.