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!
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
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
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
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.
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
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?
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.
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...
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.
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...
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"
North America
Europe, Middle East and Africa
Asia Pacific