Copy link to clipboard
Copied
from noob in this field (flash animator trying to learn some js).
hi all.)))
for the learning purposes: how i can change/modifiy codepen/jsfiddle examples, to work from inside animate cc? i mean, almost every such example use html+css+js file, but animate cc produce his own files, that i don't want to modify, for many reasons, so "getelementbyid" is not a solution here. this may be "stage" with "addchild"(am i right?), but what if i need to put some example inside container (movieclip) on timeline? createjs makes his own limitations and code snippets is for sure not enough here...(((
i edit the published files all the time. i'm not sure why you're reluctant to do that.
you can use any plain text editor. i use sublime text.
Copy link to clipboard
Copied
i edit the published files all the time. i'm not sure why you're reluctant to do that.
you can use any plain text editor. i use sublime text.
Copy link to clipboard
Copied
wow. maestro answered me! yay! (for real, your help in this forum is priceless).
but still... if i want to implement some code in my *.fla, (for example - particle system in my regular frame by frame animation), i need to completely rewrite the code, and fight for a weeks only for one dot, that is missing? i can edit html, and change canvas id, but if i need to make two different animations in one canvas? what can i do, i'm just animator... any possible solution will be more, than appreciated.)
Copy link to clipboard
Copied
arthurb65311981 wrote
any possible solution will be more, than appreciated.
Any possible solution to what? All you've presented so far is stream-of-consciousness rambling.
If you want to know how CreateJS code looks inside Animate, search these forums. There are even a couple of threads on particle systems.
Copy link to clipboard
Copied
ok, real question:
what i need to write in my actions panel instead of:
var canvas = document.getElementById('mycanvas');
var context = canvas.getContext('2d');
to get results, if i don't use "id" (or use default id of *fla file) in adobe animate?
Copy link to clipboard
Copied
The global variable "canvas" automatically points to the canvas element.
You shouldn't ever need to get the 2d context unless you're doing pixel-level operations. You're supposed to let the CreateJS API handle all the low-level details for you.
Copy link to clipboard
Copied
thank you.)
Copy link to clipboard
Copied
i don't have an easy-to-implement answer.
there are some things that i find are easier to do using animate. but there are other things easier to implement outside animate.
i usually do whatever can be done easily in animate and then do the rest in a text editor.
a particle emitter i would think would be easier to do inside animate.
Copy link to clipboard
Copied
if you don't have an answer, nobody don't..)
well thanks a lot, will try something different.