Get reference to last child in a Tile : Tile « Container « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Container » TileScreenshots 
Get reference to last child in a Tile
Get reference to last child in a Tile
         

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        
        private function moveToTheBeginning(  ):void
        {
            var lastChildIndex:int = tileOfLabels.numChildren;

            var child:DisplayObject = tileOfLabels.getChildAt(lastChildIndex);

            tileOfLabels.setChildIndex(child,0);
        }
      
    </mx:Script>
    <mx:Tile id="tileOfLabels">
        <mx:Label text="1"/>
        <mx:Label text="2"/>
        <mx:Label text="3"/>
        <mx:Label text="4"/>
        <mx:Label text="5"/>
        <mx:Label text="6"/>
    </mx:Tile>
    <mx:Button label="Move" click="moveToTheBeginning(  )"/>
</mx:Application>

   
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Create horizontal Tile containerCreate horizontal Tile container
2.Use Tile control's tileWidth to specify the width of the tilesUse Tile control's tileWidth to specify the width of the tiles
3.Retrieve last child index in a Tile, child indices are zero-basedRetrieve last child index in a Tile, child indices are zero-based
4.Remove item from TileRemove item from Tile
5.Tile DemoTile Demo
6.A Tile Container with draggable childrenA Tile Container with draggable children
7.Override layout to use TileLayoutOverride layout to use TileLayout
8.Create the horizontal Tile containerCreate the horizontal Tile container
9.Using Tile control's tileWidth property to specify the width of the tilesUsing Tile control's tileWidth property to specify the width of the tiles
w___w___w___.__ja__v___a___2_s___._c___o_m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.