6 Replies Latest reply on Sep 27, 2009 10:19 AM by sfbell09

    Click event on Button causes components to shift right.

    sfbell09

      I have a pretty basic photo viewer app. When I click on the 'next' button all the components shift to the right a small, but noticeable amount. When I click the 'previous' button the app does not drift either way immediately. If I click previous twice and then next once it has a cummulative effect of moving the components left 1 space. I have never seen this happen before. Any thoughts?

      < mx:Application >

      <mx:HBox>

      <mx:VBox>

      <mx:Button id="prvBt"  click="prevGroup();"

        upSkin="@Embed(source='prev.png')"

            overSkin="@Embed(source='prev_over.png')"

                    downSkin="@Embed(source='prev.png')"

        icon="@Embed(source='prev.png')" >

      </mx:Button>

      <mx:TileList width="120" id="photoList"  height="475" >

      <mx:itemRenderer>

      <mx:Component>

      <mx:Image

      horizontalAlign="center"

      verticalAlign="center"

      source="{data.filename}"

      toolTip="{data.name}"

      width="100"

      height="150" />

      </mx:Component>

      </mx:itemRenderer>

      </mx:TileList>

      <mx:Button id="nxtBt" click="nextGroup();"

      upSkin="@Embed(source='next.png')"

          overSkin="@Embed(source='next_over.png')"

              downSkin="@Embed(source='next.png')"

              icon="@Embed(source='next.png')" >

      </mx:Button>

      </mx:VBox>

      <mx:VBox>

      <mx:ProgressBar id="progressBar" source="{image}" visible="false" />

      <mx:Image width="640" height="474" id="image" source="{photoList.selectedItem.filename}"

      horizontalAlign="center" verticalAlign="center"

      open="progressBar.visible=true" complete="progressBar.visible=false" />

      </mx:VBox>

      </mx:HBox>

      </mx:Application>