ekessler Posted May 8, 2012 Share Posted May 8, 2012 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 More sharing options...
Carl Posted May 8, 2012 Share Posted May 8, 2012 if you use a duration of 0 that should work fine: TweenMax.allTo(helpArray, 0, {autoAlpha:0}); Link to comment Share on other sites More sharing options...
ekessler Posted May 8, 2012 Author Share Posted May 8, 2012 thanks I guess I was under the impression that the time value can't be zero. Link to comment Share on other sites More sharing options...
ekessler Posted May 10, 2012 Author Share Posted May 10, 2012 Even with the time set to 0 it still flashes. http://www.rpd611.com/dikduk/dikduk%20game%20with%20text%20file.html Any ideas? Link to comment Share on other sites More sharing options...
Carl Posted May 10, 2012 Share Posted May 10, 2012 Hi. it is difficult to diagnose the problem without seeing how your file is built. Please create a very simple example that demonstrates the problem and attach a zip here. thanks. Link to comment Share on other sites More sharing options...
ekessler Posted May 10, 2012 Author Share Posted May 10, 2012 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 More sharing options...
ekessler Posted June 3, 2012 Author Share Posted June 3, 2012 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 More sharing options...
Carl Posted June 4, 2012 Share Posted June 4, 2012 yes that sounds like a likely culprit. Link to comment Share on other sites More sharing options...
coti Posted June 8, 2014 Share Posted June 8, 2014 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now