4 Replies Latest reply on Aug 4, 2009 10:17 AM by thepixelsmith

    tweening problems using action script

    Mouadib

      im using an tutorial as a base

       

      http://www.tutorialized.com/view/tutorial/Create-a-sliding-content-in-flash/45318

       

      the thing is im using the code and just make smal changes but still not working propperly

      i get one button to work thats all please have a look you who knows this far more better than me.

       

      also tried to add the project not acepting any files such crap why have it i start wonder

      i put it on my webserver instead http://mouadib.no-ip.org/Ne_Mesis/projectX/recources/src/slide.rar. source 

                                                     http://mouadib.no-ip.org/Ne_Mesis/projectX/recources/src/3bildmeny1_3.html how it works

       

                                                                                                                                                                                          //Thanx Alot

       

       

      //file downloaded from www.RiaCodes.com

      import caurina.transitions.*;


      var hongkongX : Number = 0;
      var londonX : Number = -962;
      var parisX : Number = -1924;


      var buttons : Array = [hongkong_btn,london_btn,paris_btn];

      for (var i:int = 0; i< buttons.length ; i++){
      buttons[i].addEventListener(MouseEvent.CLICK,navigate);
      buttons[i].buttonMode = true;
      }

      function navigate(event:MouseEvent):void{
      switch (event.target){
        case (hongkong_btn) : setTween(hongkongX);
        break;
       
        case (london_btn) : setTween(londonX);
        break;
       
        case (paris_btn)  : setTween(parisX);
        break;
       
      }
      }

       

      function setTween(tweenX:Number):void{
      Tweener.addTween(content_mc, {x:tweenX, time:1, transition:"easeInOutCubic"});
      }