A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F8] Tween Class with Array

  1. #1
    Senior Member
    Join Date
    Sep 2007
    Location
    UK
    Posts
    194

    [F8] Tween Class with Array

    OK, I have an array of Movieclip names, all on the stage with 0% alpha.

    I am trying to run a tween on the Movieclips using the script below but it is simply not working. I am sure it is my syntax somewhere but I am running on empty now trying to figure it out.

    Any help would be greatly welcome!

    Mike

    PHP Code:
    stop();
    var 
    clipArray:Array = new Array("section1""section2""section3""section4""section5");
    import mx.transitions.Tween;
    var 
    fadeIn:Tween = new Tween(clipArray[1], "_alpha"mx.transitions.easing.None.easeNone0100100false);
    fadeIn.onMotionFinished = function() {
        
    trace("Function Finished");
        
    play();
    }; 

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Try removing the quotes from around the sections in the array.
    Code:
    stop();
    var clipArray:Array = new Array(section1, section2, section3, section4, section5);
    import mx.transitions.Tween;
    var fadeIn:Tween = new Tween(clipArray[1], "_alpha", mx.transitions.easing.None.easeNone, 0, 100, 100, false);
    fadeIn.onMotionFinished = function() {
    	trace("Function Finished");
    	play();
    };

  3. #3
    Senior Member
    Join Date
    Sep 2007
    Location
    UK
    Posts
    194
    Thanks dawsonk, I knew it was something simple but no amount of coffee was helping me see it!

    Cheers

    Mike

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