Jump to content
Search Community

autoAlpha

ekessler test
Moderator Tag

Recommended Posts

This seems like a simple question. What is the code to make autoAlpha set to 0 when the movie plays. I have an array of objects called helpArray. When I use this it flashes at the beginning of the movie.

TweenMax.allTo(helpArray,.01,{autoAlpha:0});

 

Should I be using helpArray.visible = false ?

 

Thanks.

Link to comment
Share on other sites

Thank you so much for your help. I do not have the time to put a file together today. If you need one I will do it on Sunday. The problem only happens in the browser--not when I test it in flash. In the mean time this is the code that I have used regarding these assets:

 

 

 


var helpArray:Array = [help_mc,helpBar_mc,help_btn1,help_btn2,help_btn3,help_btn4,help_btn5,help_btn6,help_btn7,help_btn8,help_btn9,help_btn10,shadow_mc,help_close_btn];
TweenMax.allTo(helpArray, 0,{autoAlpha:0});

function hideHelpClose_btn ():void{
var tlHelp:TimelineLite = new TimelineLite
tlHelp.insert(TweenMax.to(help_close_btn, 0,{autoAlpha:0}));
tlHelp.append(TweenMax.to(help_close_btn, 2,{autoAlpha:1, ease:Expo.easeOut, delay:1.5}));
}


help_close_btn.addEventListener(MouseEvent.CLICK, helpClose_fn);
function helpClose_fn(event:MouseEvent):void {
TweenMax.allTo(helpArray, 1.5,{autoAlpha:0});
TweenMax.allTo([answer_btn,helpMain_btn,back_btn], 1.5,{autoAlpha:1});
}


help_btn1.addEventListener(MouseEvent.CLICK, helpMove_fn1); 
function helpMove_fn1(event:MouseEvent):void {
hideHelpClose_btn ();
TweenMax.to(help_mc,1,{x:helpMove * 0, ease:Expo.easeOut});
}


 

Please let me know if you will need me to make a file.

thanks again.

Link to comment
Share on other sites

  • 4 weeks later...

I have some other things going on, so I have not worked on this project in while.

 

I think I figured out the problem. The program first loads an external file and then the alpha was set to zero. I moved the alpha to top of the code and it stopped flashing. I guess in the split second it took to load, the alpha was set to 1 and therefore flashed.

 

Does this make sense?

Link to comment
Share on other sites

  • 2 years later...

thy this way

 

immediateRender:true

 

tl.append( TweenMax.fromTo(large_alb_siena, 1, {alpha:0}, {alpha:1, onComplete:tl.pause, immediateRender:true, onStart:updateCurrentSection }) ) ;
 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...