where do you define the Dollar var of this line:
As shown in line 9 of the code above, I wrote: console.log ($ (document) .height ());
I did not think, I needed to set the variable $, because jquery is already doing it. Is not it?
If I try to write the line: <script src = "http://code.jquery.com/jquery-1.11.0.min.js"> </ script> within the <head> html file manually, then there is no problem and I get the height of the screen, even without defining the variable $.
Which brings me to the conclusion that, although the line was written in the file, as you can see in the console log, but it still does not start ...
The problem is, if I write the line in the html file manually, when I do publish .fla file, Flash CC erases the line and everything was written by hand. So I thought to write the above code from the first frame of the timeline.
Is there a better way?
And yet - why the above code tweaks error message?
1 person found this helpful
The correct way would be to publish your canvas project once, then open the published html externally and include the jquery lib or any other lib you may want to use.
Now go back to the fla file in Flash Pro, open Publish Settings and uncheck - 'Overwrite HTML' option.
This way, your HTML file does not get overwritten everytime you publish and only the drawing assets and animation gets updated.
PS: This setting was made available in the last release: Flash Pro CC 2014 (126.96.36.199). So make sure to update your Flash Pro if it is not up to date.
Oh, that's a great idea! Thank you!
I am wondering about the same thing. Is this still the proper way to do it using Animate CC? I'm asking because this post is now 2 years old...not sure if anything was changed.