:: Catégories

  • actionscript 3
  • Air
  • Flash
  • Flex
  • molehill
  • Non classé
  • papervision
  • Web

:: Derniers articles.

  • Nouveau Android Flash Game : Kick The Ducks !
  • Démo – Client FTP en Flex
  • Démo Molehill – particules
  • [TUTO] AS3 + APPARAT / TDSI, accélérez vos projets !
  • [FIXED] SecurityError: fileWriteResource
  • [Tutorial] Techniques d’optimisations en AS3
  • [Tutorial] Un client FTP en AS3 sous RoboLegs + SwfStudio – partie 2
  • [Tutorial] Un client FTP en AS3 sous RoboLegs + SwfStudio – partie 1

:: Tags

  • 3d actionscript3 ACTUce android as3 client code demo ducks Flash Flex flexunit framework ftp game jeux kick molehill optimisations particules robotlegs swfStudio tests unitaires the

:: Sites Exoa

  • Home
  • actionscript 3
  • Air
  • Flash
  • Flex
  • molehill
  • Non classé
  • papervision
  • Web

exoa labs

[TUTORIAL] FLEX – Ajouter dynamiquement des tabs dans un TabNavigator

Aucun commentaire - mar 1st, 2010 - Flex, actionscript 3
  1.  
  2. <mx:Panel title="TabNavigator Container Example" height="90%" width="90%"
  3. paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
  4.  
  5. <mx:TabNavigator id="tn" width="100%" height="100%"/>
  6.  
  7. <mx:Label width="100%" color="blue"
  8. text="Programmatically add Tab buttons"/>
  9.  
  10. <mx:HBox>
  11. <mx:Button label="Add A Tab" click="addTab()"/>
  12. <mx:Button label="Remove A Tab" click="removeTab()"/>
  13. </mx:HBox>
  14.  
  15. </mx:Panel>
  16.  
  1.  
  2. <mx:Script>
  3. <![CDATA[
  4. import mx.controls.Button;
  5. import mx.controls.Label;
  6. import mx.containers.VBox;
  7.  
  8. public var numChild:Number = 0;
  9.  
  10. public function addTab():void {
  11. var newVBox:VBox = new VBox();
  12. var newLabel:Label = new Label();
  13.  
  14. numChild = tn.numChildren + 1;
  15.  
  16. newVBox.label = "Panel " + numChild;
  17.  
  18. newLabel.text = "TabNavigator container panel " +
  19. numChild;
  20.  
  21. newVBox.addChild(newLabel);
  22.  
  23. tn.addChild(newVBox);
  24. }
  25.  
  26. public function removeTab():void {
  27. if(tn.numChildren > 0){
  28. numChild --;
  29.  
  30. tn.removeChildAt(numChild);
  31. }
  32. }
  33. ]]>
  34. </mx:Script>
  35.  

    Commenter




      WORKS

    • Travaux

      PRODUCTS

    • ZenBook
    • E-ZEN Galery
    • FlashConf
    • EXOA MP3-Player

      SERVICES

    • Application Facebook
    • Advergame
    • Site Web
    • Référencement
    • Hébergement
    • Graphisme
    • Bannières & Animations
    • Application Flash

      EXOA

    • Contact
    • A propos
    • CGV
    • Mentions Légales

    © 2012 exoa labs, SIRET :517 668 349 00015 · Tél : 06.25.59.18.68 · contact@exoa.fr