Any way to have an ActionScript 3 (Flex/AIR) project print to standard output?

后端 未结 4 1736
忘了有多久
忘了有多久 2021-01-12 07:34

Is there any way to have a binary compiled from an ActionScript 3 project print stuff to stdout when executed?

From what I\'ve gathered, people have been go

4条回答
  •  孤城傲影
    2021-01-12 08:17

    Redtamarin seems to be able to do this (even though it's still in its infancy):

    Contents of test.as:

    import avmplus.System;
    import redtamarin.version;
    
    trace( "hello world" );
    trace( "avmplus v" + System.getAvmplusVersion() );
    trace( "redtamarin v" + redtamarin.version );
    

    On the command line:

    $ ./buildEXE.sh test.as 
    
    test.abc, 243 bytes written
    test.exe, 2191963 bytes written
    
    test.abc, 243 bytes written
    test.exe, 2178811 bytes written
    
    $ ./test
    hello world
    avmplus v1.0 cyclone (redshell)
    redtamarin v0.1.0.92
    

提交回复
热议问题