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

Targeting a MC on the stage (CreateJS) ?

Guest
Sep 27, 2018 Sep 27, 2018

Copy link to clipboard

Copied

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?

Views

524

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

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.

Votes

Translate

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

Copy link to clipboard

Copied

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?

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

Copy link to clipboard

Copied

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?

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

Copy link to clipboard

Copied

no, that won't work.

assign CTA's alpha to .01, not 0.  then try your code.

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

Copy link to clipboard

Copied

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.

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