3 Replies Latest reply on Jun 25, 2008 11:52 AM by SiHoop

    Translating from Flex to AS3

    SiHoop Level 1
      As a Flash developer, one of the hardest tasks for me to understand in Flex is how to automate and control the creation of what used to be movie clips. For example, suppose I have a simple movie-clip-like structure that I want to replicate (see below). How could I do this (not as a new class, I'm still having trouble with those) within a <mx:Script> so that I can reproduce lots of new buttons (i.e. Video 1... Video n) using a for-next loop and then how can I control their visibility on stage.

      The only way I know how to do this in Flex is to copy-paste lots of times and that seems to be an incredibly stupid thing to do!

      Thanks for you interest.

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
      <mx:HBox width="100%">
      <mx:VBox height="100%">
      <mx:CheckBox id="videoCheckbox1"/>
      </mx:VBox>
      <mx:VBox height="100%" width="168">
      <mx:TextArea text="Video 1" editable="false" styleName="panelCell" width="125" height="30"/>
      </mx:VBox>
      </mx:HBox>
      </mx:Application>