Skip to main content
September 27, 2018
Answered

Targeting a MC on the stage (CreateJS) ?

  • September 27, 2018
  • 1 reply
  • 626 views

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?

    This topic has been closed for replies.
    Correct answer avid_body16B8

    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.

    1 reply

    kglad
    Community Expert
    Community Expert
    September 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?

    September 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?

    kglad
    Community Expert
    Community Expert
    September 27, 2018

    no, that won't work.

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