1 Reply Latest reply on May 5, 2007 11:54 AM by dr_ross

    How to mix AS element creation and direct creation from flash GUI

    antonpav
      Hello,

      i'm pretty new to flash but i have a decent level of c++, when i create a flash doc , i put evrything in a separated Main.as file
      and i create all elements "programaticly" like:
      attachMovie("TextArea", "m_text", 0);
      m_text._x = 10;
      m_text._y = 100;
      m_text.setSize(400,200);
      m_text._visible = false;
      but this is very slow as i have manualy set all the coordinates of all elements , their size etc .
      What i would love is to be able to :
      drop a text area in some frame , resize it and make it nice set all its 'visual propreitys'
      then when i attach the movie from my Main.as it inherit all visual propreitys.

      I'm realy happy of my approch to put evrything in Main.as i want to avoid at any cost going and hiding
      ActionScript all over fla frames, so i just need to solve this and my live will be c++ again :)

      thanks
      sorry if the message is not clear , i'm realy confused with flash "logic" .
        • 1. Re: How to mix AS element creation and direct creation from flash GUI
          dr_ross Level 1
          What you'll be needing is to use a flash JSFL script to do all the donkey work for you.
          Without knowing anymore details about your project i can only sugest making a quick one that you layout the element on the stage, run the custom command that traces out all the code you'd normally be manually generating, then remove the element from the stage.

          You can extend it much further to do every element for you and put all the code on the appropriate frames for you if you can apply some sort of procedure to how your project is laid out.

          Just do File->New->Flash Javascript File, and either use the help or google a tutorial.

          If you get stuck with it give me a shout.