A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: onMotionFinished problem

  1. #1
    I Like To Flash in Public ;) thebluedragon's Avatar
    Join Date
    Aug 2001
    Location
    London, U.K
    Posts
    194

    onMotionFinished problem

    Hi there I am having a problem

    myTween2.onMotionFinished = function() { never gets called but

    myTween.onMotionFinished = function() { does get called!!

    Im trying to run each tween once the one before it has finished.

    Code:
    import mx.transitions.*;
    import mx.transitions.easing.*;
    
    var myTween = new mx.transitions.Tween(boxmc, "_xscale", mx.transitions.easing.Regular.easeInOut, 0, 7500, 1.5, true)
    
    
    myTween.onMotionFinished = function() {
    	var myTween2 = new mx.transitions.Tween(boxmc, "_yscale", mx.transitions.easing.Regular.easeInOut, 100, 2000, 1, true)
    }
    	
    myTween2.onMotionFinished = function() {
    	trace('i been called');
    	boxmctwo._visible = true;
    	var myTween3 = new mx.transitions.Tween(boxmctwo, "_xscale", mx.transitions.easing.Regular.easeInOut, 0, 7500, 1.5, true)
    }

  2. #2
    Media Developer CJElven's Avatar
    Join Date
    Jan 2002
    Location
    San Antonio, TX
    Posts
    298
    Place myTween2.onMotionFinished INSIDE the braces for myTween.onMotionFinished. So it looks like this:
    Code:
    myTween.onMotionFinished = function () {
    	var myTween2 = new mx.transitions.Tween (boxmc, "_yscale", mx.transitions.easing.Regular.easeInOut, 100, 2000, 1, true);
    	myTween2.onMotionFinished = function () {
    		trace ('i been called');
    		boxmctwo._visible = true;
    		var myTween3 = new mx.transitions.Tween (boxmctwo, "_xscale", mx.transitions.easing.Regular.easeInOut, 0, 7500, 1.5, true);
    	};
    };
    Dragontech Media
    Magic.Fire.Content

  3. #3
    Media Developer CJElven's Avatar
    Join Date
    Jan 2002
    Location
    San Antonio, TX
    Posts
    298
    Sorry about bringing this back. I was searching for something specific, and didn't notice the date attached.
    Dragontech Media
    Magic.Fire.Content

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