Skip navigation
Currently Being Moderated

Error exporting as JS

May 15, 2012 12:46 PM

Hi everyone,

 

I'm getting this error message trying to export Flash project into JS

 

The following JavaScript error(s) occurred:

 

At line 77 of file "/Users/luis/Library/Application Support/Adobe/Flash CS6/en_US/Configuration/CreateJS/jsfl/Matrix2D.jsfl":

TypeError: str has no properties

 

 

Help!

 
Replies
  • Currently Being Moderated
    Jul 24, 2012 7:32 PM   in reply to Luis Solivan

    I am getting the same error!  Were you able to resolve it?  Can anybody offer advice?

     

    I am trying, for the first time, to output an older fla movie currently using Actionscript 1.  Using Mac.

     

    thanks,
    Geoff

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 24, 2012 10:09 PM   in reply to Luis Solivan

    Hello,

     

    Did the FLA you were trying to convert have ActionScript? If yes, then Toolkit for CreateJS does not support conversion of Action Script code to HTML5 equivalents (JavaScript). There are a couple of workarounds you could use:

     

    Embed Javascript Code within Action Script comment blocks for components that have been designed using ActionScript in your FLA.

    Or convert the entire FLA to HTML5, explicitly identify ActionScript components, and find their JavaScript equivalent codes from http://www.createjs.com/Docs/EaselJS/

     

    Hope this helps. Please let me know if you have any more questions.

     

    Regards,

    Suhas Yogin

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 24, 2012 10:11 PM   in reply to Luis Solivan

    That's a pity.  At any rate, I have now watched the video by Grant Skinner (http://www.adobe.com/devnet/createjs/articles/using-flash-pro-toolkit- createjs.html), and I see that the Actionscript is ignored, so it's not that. 

     

    Please let us know if you find what the error is about.'

     

    Cheers,
    Geoff

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 24, 2012 10:12 PM   in reply to Suhas Yogin

    Thansk Suhas, but because the AS is ignored, I don't think that is causing the error?  Thanks for the link!

     

    Geoff

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 24, 2012 10:17 PM   in reply to GmR

    Hello,

     

    I am looking in to this and will get back to you soon as I have answer.

     

    Thank you for your patience,

    Suhas Yogin

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 24, 2012 10:19 PM   in reply to Suhas Yogin

    Much appreciated!

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 25, 2012 3:05 AM   in reply to Luis Solivan

    Hi Luis and Geoff,

    Can you please download and insatll the latest CreateJS Toolkit available at http://www.adobe.com/devnet/createjs.html

    I hope the latest Toolkit (V 1.0.0) version will resolve your issue. If not, can you please share the problematic file(s) and snap shot of your Toolkit for CreateJS panel?

     

    Thanks!

    Mohan

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 1, 2012 9:24 PM   in reply to Mohanaraj CS

    Mohan, I already have V.1.0.0 installed, but will download, install and try again.

     

    Thanks,
    Geoff

     

    PS>  OK, have just downloaded and installed, and noticed the current version is 0.3.20.  Is this later than v 1.0.0?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 1, 2012 11:21 PM   in reply to GmR

    Mohan, I used the download link on the right, and reinstalled v 1.0.0  - Same error, but managed to get rid of it by hiding some problem layers.  Generally working fine!

     

    thanks agian,
    Geoff

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 1, 2012 11:46 PM   in reply to GmR

    Hi Geoff,

    V.1.0.0 is the latest Toolkit version and please download it from http://www.adobe.com/devnet/createjs.html page as shown in the screen shot.

    CreateJSToolKit.png

     

    If this is not working for you then please share the problematic files and the screen shot of your Toolkit for CreateJS panel.

     

    Thanks!

    Mohan

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 1, 2012 11:49 PM   in reply to Mohanaraj CS

    Thanks Mohan... yes I now have it working. (see my previous email).

     

    regards,

    Geoff

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 10, 2012 12:11 PM   in reply to GmR

    Started a new, related thread.

     

    http://forums.adobe.com/thread/1063704

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 10, 2012 2:35 PM   in reply to Mohanaraj CS

    Is there something special about 'Line 77' in JavasScript?

    I've just been asked about CreateJS producing

     

              At line 77 of file "TextInst.jsfl":

              TypeError: str has no properties

     

    Line 77 errors seem to crop up in a variety of  "xxxx.jsfl" files

     

    The current cure appears to be going through the .fla deleting code/layers until the problem goes away.

     

    Is there a better/simpler solution?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 10, 2012 2:59 PM   in reply to optics42

    Can you tell us something about the layer that you delete that makes the problem go away? In my case it was classic text with emboldened type that was cauing the error. If it's the same for you then that would probably be very helpful info for the people maintaining CreateJS.

     

    The jsfl file is masked so we can't easily help ourselves.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 10, 2012 4:16 PM   in reply to dtexus

    In this case we tracked it down to a text box (Classic/Static text), part bold, part regular.

     

    Splitting the text off into 2 separate boxes produced the same error.

     

    Deleting the box with the regular text removed the error message.

    Creating a new text box and retyping the regular text allowed an HTML/js output.

     

    Fortunately the .fla only contained 3 layers and 9 frame sets, so it's only taken 3 hours to locate.

     

    ...there's still the 'Syntax error in line 7..." of the .js file to deal with (an error at line 7 occurs with every . fla that is 'converted') and then a chunk of concatenated code further on and then there's the looping...

     

    Can we keep Flash please??

     

    BTW. Any suggestionas to how the looping can be fixed?

    There's probably a good reason why the now converted .js contains multiple blocks commencing with

               (lib.somethingOrOther= function(mode,startPosition,loop) {

                  this.initialize(mode,startPosition,loop,{},true);

    We've tried adding  p.loop = false; and loop = false; neither affect the looping...

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 11, 2012 6:03 AM   in reply to optics42

    I could not turn off looping either. That method and property seem to have no effect. I've resorted to removing all frame based animation and just relying on the toolkit to export assets to canvas, and then doing all my interactivity and animation in the JS. Those blocks you mention are modules with closure. They encapsulate thing like layers, buttons and scenes. They give us a nice scene graph for managing the elements on the canvas. It really is pretty cool, it's just not fully baked yet.

     

    We'll see if we get any kind of response now that we've isolated the type of elements that trigger the error. I'm worried because I suspect Adobe has all their Flash/Canvas experts working on a product that is targeted for generating Canvas animations from the get go and the CreateJS toolkit for Flash will never be more than it is now (it seems inevitable).

     

    As for fixing the bold text, I don't see an obvious or easy way to mix regular and bold text using the EaselJS API, nor do I see a way to use multiple colors. Worse, there is no easy way to do it in the Canvas specification (which I'm sure is the reason support for text in the toolkit is so poor right now. Exporting the text as shapes creates ridiculously big JS files so tha toption is out. We can always create the text in HTML and lay it over the Canvas but I'm trying to achieve the ability for my Flash person to make changes to the SWF version but generate a file that I can just re-export to update the Canvas version. I'm using grunt.js to run the exported JS against a bunch of regex expressions and fix the things that don't work, but I'm stumped by this text problem.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 11, 2012 8:20 AM   in reply to dtexus

    Many thanks for your detailed reply. No light at the end of the tunnel, then?

     

    I'm thoroughly depressed by the whole fiasco (as it seems to me) for dropping Flash.

     

    This a.m. I came across an "Adobe Evangelist's" anim demo for CreateJS...the demo depended on embedding /* js strings */ to run..

     

    So I now have to learn js  to insert js code into a Flash-to-JS converter?..it's bonkers...

     

    ...particularly as, from what you say, js won't reproduce the Flash anyway.

     

    I will persevere but I feel, by comparison, Sysiphus had it easy...

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 28, 2012 10:42 AM   in reply to dtexus

    Update on looping...clips suggestion not tested

     

    From. ta11us,   25-Sep-2012 09:04  

    "If you want to stop the main timeline looping there's a checkbox in the toolkit publish settings.

    If you want to stop individual clips then you can use js

    /* js

    stop();

    */

    see http://www.adobe.com/devnet/createjs/articles/using-flash-pro-toolkit- createjs.html for more info"

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (1)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points