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

createjs Tween Alpha issues

Participant ,
Nov 05, 2018 Nov 05, 2018

Hey,

I'm been following a tutorial on lynda to learn html canvas but, I can't figure out what i'm doing wrong since I've gone through the video multiple times and I copied the code exactly the same as they had it.

Anything I hide with the root.segment01.shed.alpha = 0;  or  root.segment01.darken.visible = false;

doesn't come back when attempting to show them with again

createjs.Tween.get(root.segment01.path).to({alpha:1}, 800);  or  root.segment01.darken.visible = true;

Is there something special you need to do get something invisible to become visible again?

The only way i've been able to do it, is make a movie clip have a alpha of 0 in Animate instead of programming it. I feel like that's not how it's supposed to work

904
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

Participant , Nov 07, 2018 Nov 07, 2018

thanks,

but i tried that originally and it didn't work

I had to set the movieclips to alpha 0 or visible false manually  instead of having the javascript do it. It was literally the only way the layers would change alpha or visibility back to show.

Translate
Community Expert ,
Nov 06, 2018 Nov 06, 2018

Hi.

Make sure that the same instance has the alpha with a value bigger than 0 and that the visible property is set to true.

And you can set both properties at the same time with the to function.

createjs.Tween.get(target).to({alpha:1, visible:true}, 1000);

Regards,

JC

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
Participant ,
Nov 07, 2018 Nov 07, 2018
LATEST

thanks,

but i tried that originally and it didn't work

I had to set the movieclips to alpha 0 or visible false manually  instead of having the javascript do it. It was literally the only way the layers would change alpha or visibility back to show.

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