7 Replies Latest reply on Jun 6, 2011 1:20 PM by Maxime Chupin

    SWFLoader and progress bar

    Maxime Chupin



      I try to understand how ProgressBar runs.

      I read http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7d8c.html#WS2d b454920e96a9e51e63e3d11c0bf63b33-7f99

      but this does not help.

      Indeed, I have a List and a SWFLoader which loads what it is choosen in the list:


      <?xml version="1.0" encoding="utf-8" ?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               public var selectedListItem:Object;
          <fx:Model id="anim">
          <state label="Anguinéa" data="animations/flex-ang.swf"/>
          <state label="Mouvement rétrograde" data="animations/flex-astro.swf"/>
          <state label="Bielle de Bérard" data="animations/FLEX-ber.swf"/>
        <s:Panel title="Lot d'animations"
             width="300"  x="600" y="50">
          <s:VGroup left="10" right="10" top="10" bottom="10">
            <s:Label text="Selectionner une animation"/>
            <s:Label text="Actuellement '{selectedListItem.data}'"/>
            <mx:List id="source" width="100%" color="blue"
                 change="selectedListItem = List(event.currentTarget).selectedItem"/>
        <s:Panel x="30" y="50" width="510" height="580">
            <mx:ProgressBar width="200" source="animation" mode="polled"/>
          <mx:SWFLoader id="animation" source="{selectedListItem.data}" autoLoad="true"/>


      But I do not understand what I have to write in the source tag of the progress bar.

      Can someone explain to me?