Flash CC working (fl.outputPanel.save() ... not)
  • madmattmadmatt June 2013

    Hi, just wanted to confirm (not that Dave would need it since he partecipated in the Flash CC beta) that xJSFL installs and works in Adobe Flash CC (OSX).

    Unfortunately, I can't say the same is true for some of the standard jsfl functions I used to use (like, fl.outputPanel.save()) :( 

    That is, they work, but they either execute before the output panel is filled with text, or they execute with an old instance of it ... the result is that if I have a jsfl file that does stuff (compile a fla, for example) and outputs stuff to the output panel, when the save method is called I get an empty file. If at that point I run a execute a separate jsfl file that saves the output panel I get the text in the file ... weird and really annoying

  • DaveDave June 2013

    Yeah, it does! Took a bit of fiddling but I can confirm it's now all good (not that everything's been tested *note to self: learn Jasmine and get some automated testing going)

    Weirdly the CS6 install is currently on the blink though. I must have broken something, and CS6's lack of errors don't help.

    Not such good news about the output panel. If you can reproduce a test case, I'll see what I can do about getting a bug raised - I know with the CC Adobe are looking to do much more frequent releases and patches as they are needed.


  • madmattmadmatt June 2013

    Hi Dave, well it looks like even the guys at Adobe could use some more unit testing ... but maybe it is one of the weird ones that depends on os/hardware combinations.

    System data:

    Hardware Overview:
      Software:  OS X 10.8.4 (12E55)
      Model Name:iMac - 27-inch, Late 2009
      Model Identifier: iMac11,1
      Processor Name: Intel Core i7
      Processor Speed: 2.8 GHz
      Number of Processors: 1
      Total Number of Cores: 4
      L2 Cache (per Core): 256 KB
      L3 Cache: 8 MB
      Memory: 32 GB
      Processor Interconnect Speed: 4.8 GT/s
      Boot ROM Version: IM111.0034.B02

    Adobe data: Adobe Flash professional CC Version


    Test case:


    MAC:tmp me$ cd /tmp/
    MAC:tmp me$ rm output.txt
    MAC:tmp me$ cat t.jsfl
    fl.trace("Test Output");
    fl.outputPanel.save( "file:////tmp/output.txt", false, true );
    MAC:tmp me$ open t.jsfl
    MAC:tmp me$ ls -la output.txt
    -rw-r--r--  1 me  wheel  0 Jun 20 09:15 output.txt
    MAC:tmp me$ more output.txt
    MAC:tmp me$ cat t1.jsfl
    fl.outputPanel.save( "file:////tmp/output.txt", false, true );
    MAC:tmp me$ open t1.jsfl
    MAC:tmp me$ ls -la output.txt
    -rw-r--r--  1 me  wheel  12 Jun 20 09:15 output.txt
    MAC:tmp me$ more output.txt
    Test Output
    MAC:tmp me$


    I did temporarily solve the issue by splitting my original jsfl in two, one that does whatever needs doing, the other that collects the log output but ...

  • DaveDave June 2013

    A better option of course, would be to output directly to a file rather than tracing, then saving the output.

    function Log(uri)
    var file = new File(uri, '');

    this.log = function(message)
    file.write(message + '\n', true);

    this.show = function()

    var log = new Log('c:/temp/log.txt');
  • madmattmadmatt June 2013

    If I were using only traces .. yes ... unfortunately I also use Table.print and Output.inspect to log errors and accessory info ...


  • DaveDave June 2013

    Both those functions return the output they trace, so just add methods for inspection and tables to your Log class, then log the return values to file along with the traces :)

    P.S. You can use the shorthand "inspect()" if you're not already

  • madmattmadmatt June 2013

    ... silly me .. will do. Thanks

  • DaveDave June 2013

    Don't worry - I wrote it, so it's easy for me!

  • madmattmadmatt June 2013

    Hi Dave, just an update .. I had no problems implementing your suggestions (I actually created a class to be able to use it in any script).

    Unfortunately I am having the same issue with the Error output panel, and unless Adobe added it to Flash CC I think there's no way to access that content from jsfl.

    Browsing the adobe docs I noticed that the Output Panel "save to file" option in the Flash IDE has been removed (they say it's deprecated but ...) .. maybe that has something to do with the fact that the panel content isn't available to the current jsfl instance ....


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with OpenID Sign In with Google Sign In with Twitter

Sign In Apply for Membership