[Golist] Problem with repeater object on a HydroTween item

Stuart McNeill stuart.mcneill at itworkforce.co.uk
Thu Sep 11 05:51:38 PDT 2008


Whoops! Forget to include my code;

I am animating a simple box shape back and forth along the x axis (see
my document class below), but on the cycle 2 it jumps back to 0 before
animating. Does anyone know why this is or how to correct it?

My objective is to animate it in a figure of 8 path - any suggestions on
how to achieve this would be most welcome.


Document class;


package {

    import org.goasap.GoEngine;
    import org.goasap.managers.*;
    import org.goasap.PlayableBase;
    import org.goasap.items.GoItem;
    import org.goasap.events.GoEvent;
    import com.hydrotik.go.HydroTween;
    import fl.motion.easing.*;
    import flash.display.MovieClip;
   
    import com.hydrotik.go.HydroSequence;
    import org.goasap.utils.customadvance.OnDurationComplete;


    public class Harmonic_motion extends MovieClip {
       
        private var testBox:Box;
       
   
        public function Harmonic_motion():void
        {
           
            createBox();
           
            moveBox();
           

        }
       
       
        private function createBox():void
        {
           
            testBox = new Box();
            testBox.x = 30;
            testBox.y = 100;
           
            addChild(testBox);
           
        }

           
        //    Function: moves box

        private function moveBox():void
        {
           

            /*
           
            var seq1:HydroSequence = new HydroSequence(
           
                {target:testBox, scaleX:3, scaleY:3, duration:1.6, 
repeater:new LinearGoRepeater(Repeater.INFINITE, true)}
           
                //{target:testBox, scaleY:1.6, duration:4 }
               
            );

            seq1.start();
           
            */
           

            HydroTween.go(testBox, {x:450}, 2, 0, null, null, null, 
null, null, null, {cycles:Repeater.INFINITE, reverse:true});
           
            //    HydroTween.go(testBox, {y:70}, 2, 0, null, null, null, 
null, null, null, {cycles:Repeater.INFINITE, reverse:true});
           
           
            trace ("moveBox called!");

        }
       
       
    }
   

}



-- 

Stuart

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://goasap.org/pipermail/golist_goasap.org/attachments/20080911/133b626c/attachment.html 


More information about the GoList mailing list