Menu

using as2lib+mtsac+asdt+flashout+Eclipse

Help
d~l
2005-04-04
2013-04-17
  • d~l

    d~l - 2005-04-04

    I came across as2lib only recently ..

    I am interested in the discussion on compiling as2lib with MSATC.

    But taking this a step further, could as2lib be used in an Eclipse IDE environment with an adaption of this baseline tutorial ..

    "Towards Open Source Flash Development"

    http://www.actionscript.com/index.php/fw/1/towards-open-source-flash-development/

    This requires the download of MTASC, Eclipse, ASDT (ActionScript Development Tool) and Flashout as detailed in the tutorial.

    And also access to Macromedia Core Classes (which can be obtained from a demo installation of Flash MX).

    ...

    After getting the examples to work as in the tutorial (not using as2lib in initial tests), I thought I might try as2lib in this IDE. 

    Here are the steps I took ..

    Install as2lib into c:\as2lib\  .. for easier access.

    In Eclipse, setup new ActionScript2 Project (following the same steps as in the tutorial to setup Flash_OS_prj example).  There should now be two ActionScript2 Project files seen in Eclipse navigator window.

    Flash_OS_prj .. and now ..

    as2lib_prj
        deploy
        src
        as2lib_prj.flashout

    right click on src folder

    Import  -> File system  -> browse to c:\as2lib\  -> select c:\as2lib\src folder to import into the Eclipse project.

    After importing, File system should look like this:-

    From directory c:\as2lib\src

    + [ ] src

    tick box in src .. then Finish ..

    the full as2lib directory structure under src should then be seen in Eclipse Navigator

    src > org > as2lib > etc.

    _________________

    ensure that Flashout.as is located in as2lib_prj/src/ directory in Navigator (as in earlier example Flash_OS_prj).

    ensure that as2lib_prj.flashout is located in as2lib_prj (i.e. at same level as src and deploy directories)

    create a test.as file .. and here I took as a test.as file some ActionScript class  from the as2lib Introduction.pdf downloaded from as2lib site.  Chapter 2 page 6, Output Handling.

    _________________

    import org.as2lib.env.event.EventInfo;
    import org.as2lib.env.event.OutHandler;
    import org.as2lib.env.event.OutInfo;
    import org.as2lib.env.event.OutConfig:
    import org.as2lib.env.event.BasicClass;
    import mx.controls.Alert;

    class test.org.as2lib.env.out.handler.UIAlertHandler
    extends BasicClass implements OutHandler {

    public function write (info:OutInfo):Void {
    Alert.show(info.getMessage(),
    getClass().getName());
    }
    }
    _______________

    Then I clicked on as2lib_prj.flashout

    and in the Eclipse Flashout window clicked on ::: COMPILE :::

    ____________________

    compiling .......      starts

    but I get an error .......

    c:/eclipse/workspace/as2lib_prj/src/test.as:8: characters 37-38 : parse error Unexpected :

    ____________________

    Can anyone progress beyond this point to compare notes in running as2lib in Eclipse?

     
    • d~l

      d~l - 2005-04-04

      Sorry .. that should be MTASC above ..

      http://www.mtasc.org

       
    • d~l

      d~l - 2005-04-04

      One more step taken .. found a typo error ..
      in test.as .. I had placed a colon instead of semi-colon here ..

      import org.as2lib.env.event.OutConfig;

      but in a fresh compile of corrected test.as ..

      now these classes are not found in the src file system

      type error class not found: org.as2lib.env.event.BasicClass

      can anyone suggest a more representative test file (test.as) to go into this Eclipse IDE environment to test the as2lib classes?

       
    • Simon Wacker

      Simon Wacker - 2005-04-05

      The downloadable version of the as2lib is not mtasc compatible. The compatible version is only in the cvs. We are planning a release rather soon, so you can either wait till we release a mtasc compatible downloadable as2lib-0.1-final.zip or just check out the cvs repository. Here is how it works: http://sourceforge.net/cvs/?group_id=94206. Module name is 'main'.
      With the cvs version you can of course use the as2lib with eclipse etc. as in the "Towards Open Source Flash Development" article.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.