0 Replies Latest reply on May 7, 2008 2:03 AM by KristijanS

    SWC and .as Binding

    KristijanS
      Hello,

      im currently developing a flex / flash project for my university diploma thesis. as you probably can imagine, the journey you have to undertake to reach your goal can be a quite hard one :) From basic setup errors, to strange error messages to really wired things like making things work as a "whole".

      so here is my question:

      im designing UI stuff i need for my project in flash cs3 as instances in the library. those instances use buttons, textfields and so on, and are associated to actionscript 3 classes, which handle dynamic data operations, appearances etc.

      for example i got a TextTool instance with a button and a textfield associated to TextTool.as which handels button event and textfield inputs. so far so good.
      im developing in eclipse with the flex 3 sdk and actionscript 3.0. to use that library instance there i simply export the library symbol to a swc file, add it to the flex codebase and instanciate it from actionscript, i.e.

      var tTool : TextTool = new TextTool();

      with text tool being the swc component and its injected actionscript 3.0 class file. now i dont like the fact, that i have to edit the source of the TextTool library symbol actionscript file and go back to flash and re-export it to swc again to make the changes. espacially when i dont want to change anything about the look of the swc UI stuff like the button position or the textfield handling.

      is there a way to somehow bind the swc file to actionscript 3.0 file dynamically? lets say i put the linkage entry of the movieclip symbol in the library to com.texttool without such a class file existing, and then in eclipse create an actionscript 3.0 file in the package com with the name texttool and kind of bind it to the swc file? the problem there is, that i cant access instance names of the button or the textfield i assigned in flash. is it possible to somehow export the symbol to swc and then assign a as3 file to it on compile time which handles its inner components so i dont need to go back to flash and re-export if i want to change code and behaiviors?


      sorry for the long post, i hope someone can help me there.

      cheers.