A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] SwapDepth, setTimeout, fade

Threaded View

  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    73

    resolved [RESOLVED] SwapDepth, setTimeout, fade

    What have I done wrong here? I need a movieClip to fade out, pause, then a new movieClip to fade in.

    Code:
    fullPreloader.onLoadComplete = function() {
    		load_01._visible = false;
    		
    		
    		if (j == 1) {
    			target_MC._alpha = 0;
    			var fadeOut1:Tween = new Tween(fullImage_mc1, "_alpha", Linear.easeIn, 100, 0, 0.5, true);
    			fadeOut.onMotionFinished = function() {
    					setTimeout(display, 350);
    					function display() {
    						fullImage_mc2.swapDepths(target_MC);
    						var fadeIn:Tween = new Tween(target_MC, "_alpha", Linear.easeIn, 0, 100, 0.5, true);
    					}
    			}
    		} else {
    			target_MC._alpha = 0;
    			var fadeOut2:Tween = new Tween(fullImage_mc1, "_alpha", Linear.easeIn, 100, 0, 0.5, true);
    			fadeOut.onMotionFinished = function() {
    					setTimeout(display, 350);
    					function display() {
    						 fullImage_mc2.swapDepths(fullImage_mc1);
    						 var fadeIn2:Tween = new Tween(target_MC, "_alpha", Linear.easeIn, 0, 100, 0.5, true);
    					}
    			}
    		}
    What I've tried to do is to set the target_MC alpha to 0 and fade out the current mc. Then when the fadeOut has completed to setTimeOut. After this the mcs will swapDepths and the target_MC should fade up to alpha = 0.

    I've attached the flash and xml files. The images were too large.
    Last edited by Playdoe; 01-19-2010 at 11:59 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center