• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

getelementbyid, html, container and createjs - how one can struggle?)

Explorer ,
Apr 02, 2017 Apr 02, 2017

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...(((

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 03, 2017 Apr 03, 2017

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.

Votes

Translate

Translate
Community Expert ,
Apr 03, 2017 Apr 03, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 03, 2017 Apr 03, 2017

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.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 03, 2017 Apr 03, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 03, 2017 Apr 03, 2017

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 03, 2017 Apr 03, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 03, 2017 Apr 03, 2017

Copy link to clipboard

Copied

LATEST

thank you.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 03, 2017 Apr 03, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 03, 2017 Apr 03, 2017

Copy link to clipboard

Copied

if you don't have an answer, nobody don't..)

well thanks a lot, will try something different.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines