I trying to make a modification to Lee Brimelow's "Click and Zoom 3D Carousel". What I want to do is make it rotate about every three seconds to the next image (without any mouse interaction). I tried using the timer but didnt really get all that close.

Even just a push in the right direction would be great as I have wasted so much time already. Here is Lee's original code:


Code:
package 
{
   import com.gskinner.motion.GTween;
   import com.leebrimelow.utils.Math2;
   import com.theflashblog.fp10.SimpleZSorter;
   
   import fl.motion.easing.Exponential;
   
   import flash.display.Loader;
   import flash.display.Sprite;
   import flash.events.Event;
   import flash.events.MouseEvent;
   import flash.net.URLLoader;
   import flash.net.URLRequest;

   public class Carousel extends Sprite
   {
      private var container:Sprite;
      private var loader:URLLoader;
      private var anglePer:Number;
            
      public function Carousel()
      {
         init();
         loadXML();
      }
      
      private function loadXML():void
      {
         loader = new URLLoader(new URLRequest("images.xml"));
         loader.addEventListener(Event.COMPLETE, createCarousel);
      }
      
      private function createCarousel(e:Event):void
      {
         var xml:XML = new XML(e.target.data);
         var list:XMLList = xml.image;
         anglePer = (Math.PI*2) / list.length();
         
         for(var i:int=0; i<list.length(); i++)
         {
            var imc:imCon = new imCon();
            imc.buttonMode = true;
            imc.addEventListener(MouseEvent.CLICK, onClick);
            
            var l:Loader = new Loader();
            l.x = -250;
            l.y = -167;
            l.load(new URLRequest(list[i].@src));
            imc.addChild(l);
            imc.scaleX = imc.scaleY = 0.5;
            imc.angle = (i*anglePer) - Math.PI/2;
            imc.x = Math.cos(imc.angle) * 450;
            imc.z = Math.sin(imc.angle) * 450;
            imc.rotationY = 36 * -i;
            container.addChild(imc);
         }
      }
      
      private function onClick(e:MouseEvent):void
      {
         var tw:GTween = new GTween(container, 0.8, {rotationY:Math2.toDeg(e.currentTarget.angle+Math.PI/2), z:100},
                                          {ease:Exponential.easeInOut});
      }
      
      private function init():void
      {
         container = new Sprite();
         container.x = 350;
         container.y = 250;
         container.z = 400;
         addChild(container);
         
         cover.addEventListener(MouseEvent.CLICK, stageClick);
         this.addEventListener(Event.ENTER_FRAME, loop);
      }
      
      private function stageClick(e:MouseEvent):void
      {
         var tw:GTween = new GTween(container, 0.8, {z:400}, {ease:Exponential.easeInOut});
      }
      
      private function loop(e:Event):void
      {
         container.rotationX = mouseY - 250;
         SimpleZSorter.sortClips(container);
      }
   }
}


Thank you

Greg