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

Targeting a MC on the stage (CreateJS) ?

Guest
Sep 27, 2018 Sep 27, 2018

Hi CC folks,

I'm trying to merely change the alpha of a MC on the stage.

this.movieclip.alpha = 1;

I'm using the instance name in the UI for the MC.

Why isn't it referencing?

576
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

LEGEND , Sep 27, 2018 Sep 27, 2018

The movie clip is called questions So I tried this in frame 1 of main timeline

this.questions.alpha = 0.5;

and you can see it works.

Translate
Community Expert ,
Sep 27, 2018 Sep 27, 2018

create a new canvas project

create a movieclip on stage and assign an instance name

use your code.

any problem?

if not, what's the difference between your problematic canvas project and the new one?

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
Guest
Sep 27, 2018 Sep 27, 2018

Not sure I follow. I'm just trying to reference a MC on the stage and it's not working.

Shouldn't...

this.CTA.alpha = .5;

...turn the MC to half alpha? I have a zero alpha MC that I'm trying to make appear but it won't reference it. Should be easy.

Even the console reads:

CTA [MovieClip (name=CTA)]

But the alpha property doesn't go. ?? Do I need to say CTA.name or something?

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 ,
Sep 27, 2018 Sep 27, 2018

no, that won't work.

assign CTA's alpha to .01, not 0.  then try your 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
LEGEND ,
Sep 27, 2018 Sep 27, 2018
LATEST

The movie clip is called questions So I tried this in frame 1 of main timeline

this.questions.alpha = 0.5;

and you can see it works.

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