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

ANCC output HTML can set the ID, And then use getElementById to find it?

Enthusiast ,
Jun 30, 2018 Jun 30, 2018

I'm a novice in code.are learning.

I find that many of them are made with getElementById.

So I was wondering if I could set the ID for the movie clip.

978
Translate
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 , Jul 01, 2018 Jul 01, 2018

again:

hide the mouse:

this.cursor='none';  (assuming you enabled mouseover and there's something on stage even if it has an alpha of 1)

hide over movieclip (eg mc)

this.mc.cursor='none' (assuming you enabled mouseover)

Translate
Community Expert ,
Jun 30, 2018 Jun 30, 2018

in animate you can create elements and assign id's. those will work like you expect.

and you can assiign an id of a movieclip in animate, but it's not going to work like you expect and i'm not even sure that makes any sense.

Translate
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
Enthusiast ,
Jun 30, 2018 Jun 30, 2018

I want to know how the allocation ID is done.

Like I want to hide the mouse.

I found the div ID is animation_container.

That's why I wrote

document.getElementById("animation_container").style.cursor = "none";

But if I want to hide the mouse in the movie clip.

I don't know how to set an ID for a movie clip and find it

Translate
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 ,
Jul 01, 2018 Jul 01, 2018

again:

hide the mouse:

this.cursor='none';  (assuming you enabled mouseover and there's something on stage even if it has an alpha of 1)

hide over movieclip (eg mc)

this.mc.cursor='none' (assuming you enabled mouseover)

Translate
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
Enthusiast ,
Jul 01, 2018 Jul 01, 2018

I used the code, but I didn't implement it.

Translate
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 ,
Jul 02, 2018 Jul 02, 2018

did you enable mouseover?

Translate
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
Enthusiast ,
Jul 02, 2018 Jul 02, 2018

stage.enableMouseOver(10);
this.button1.addEventListener('mouseover',hide.bind(this));

function hide(e)
{
this.button2.cursor='none'; 
}

this.on("tick", fn)
function fn()
{
drag(this.aa)
}
function drag(display)
{
display.x = window.stage.mouseX;
display.y = window.stage.mouseY;
}

Translate
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 ,
Jul 02, 2018 Jul 02, 2018

after mousing move button1, do you see the cursor when over button2?

Translate
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
Enthusiast ,
Jul 02, 2018 Jul 02, 2018

Thank you, it's done.

I don't know why sometimes I get stuck,

I put the Stage.enablemouseover (10) to 100, a lot better.

Translate
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 ,
Jul 02, 2018 Jul 02, 2018

you're welcome.

Translate
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 ,
Jul 02, 2018 Jul 02, 2018

chenjil43641795  wrote

I put the Stage.enablemouseover (10) to 100, a lot better.

That tells it to check the mouse position 100 times per second. That's probably faster than your monitor's refresh rate. Any faster than your movie's frame rate is a waste of CPU cycles.

Translate
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
Enthusiast ,
Jul 02, 2018 Jul 02, 2018

thank you very much for your explanation and let me understand the meaning of the code.

Because I am not a person of English speaking country. It's hard to understand what the code means.

Be able to get an explanation, thank you very much

Translate
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 ,
Jul 02, 2018 Jul 02, 2018

The official docs say the maximum is 50.

Translate
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
Enthusiast ,
Jul 02, 2018 Jul 02, 2018

I see.I've changed it to 50.

In fact, compared with the production of the Code.

I'd rather know, ANCC's way of writing.

I know a lot of need to write JS and Easeljs code,

But how to convert to ANCC available code, I don't know.

I don't know if ANCC has any help files, such as AS3 or w3cschool can query how to write and can check the API for something.

Now my approach is to look up the code for JS and Easeljs,

And try to test whether it works in ANCC.

Even if the effect is achieved, I do not know how to write, why write this.

It bothers me, because I have to rely on a lot of people, always come here to ask, my study progress is very slow.

The people around me are animators, and they don't even know how to write "Stop."Because their job is to draw.

If there is time to learn, they are more likely to practise painting rather than code.

There is no learning code environment, there is no query to the file, let me very troubled.

Translate
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 ,
Jul 03, 2018 Jul 03, 2018
Translate
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
Enthusiast ,
Jul 03, 2018 Jul 03, 2018
LATEST

Although I have read, but I do not know how to achieve.

I didn't understand it at first.

Like the first page.

stage = new createjs.Stage("demoCanvas");

An is not valid,

displayObject.addEventListener("click", handleClick);

Displayobject Error..

Even the simplest.

Ancc in front of the need to add "this".

I don't even know how to get here.

I want to know, how to become ANCC code?

Translate
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