views:

18

answers:

1

Hi,

I'd like to add a progress bar to my image. The problem is that the image is in a custom component. In the Application, I make server call to get the pathway to the photo. I set photo1 in the Application. Please find below the custom component:

<mx:Metadata>
    [Event("change", type="mx.events.Event")]
</mx:Metadata>

<mx:Script>
    <![CDATA[
        [Bindable]
        public var photo1:String; 
    ]]>
</mx:Script>

<mx:Accordion id="accordion"
    resizeToContent="true"
    width="100%" 
    buttonMode="true" >


                 <mx:VBox label="Image" 
         width="100%"
         height="319">

                     <mx:Image id="neighborhoodPic1" source="{photo1}"/>   
             </mx:VBox> 

    </mx:Accordion>


    <mx:ControlBar styleName="white" height="40">
    <mx:Button id="flipButton1" x="53" y="65" label="Flip Me" 
        click="dispatchEvent( new Event( Event.CHANGE ) );" />
    </mx:ControlBar>

How can I add a progress bar to neighborhoodPic1? Is it possible to add a progress bar to a custom component?

Thank you!

-Laxmidi

A: 

Yes, this should be close...

<mx:ProgressBar source="neighborhoodPic1" mode="polled" />
Gregor Kiddie
Hi Gregor, Thank you for the help. I actually tried that previously. But, I had mistakenly put the statement in the wrong place. I made the change and it's working. Thanks.
Laxmidi