3 Replies Latest reply on Feb 12, 2008 9:24 AM by 2chez

    3D Rotation Slideshow

    2chez
      var nofItems:Number;
      var centerx:Number = Stage.width/2-50;
      var centery:Number = Stage.height/2;
      var speed = 0.01;
      var xl = new XML();
      xl.ignoreWhite=true;
      xl.onLoad=function(){
      var xdata= this.firstChild;
      nofItems = xdata.childNodes.length;
      _global.radiusx =nofItems*20;
      _global.radiusy = 60;
      _global.scl = nofItems*8
      for (var i = 0 ; i < nofItems ; i++){
      f = _root.attachMovie("itm","itm"+i,i);
      f.angle = i * ((Math.PI*2)/nofItems);
      f.omg=xdata.childNodes .attributes.path;
      f.txth=xdata.childNodes
      .attributes.title;
      f.onEnterFrame = mover;
      f.lod.loadMovie("images/"+xdata.childNodes .attributes.path);
      f.lods.loadMovie("images/"+xdata.childNodes
      .attributes.path);
      f.onRelease=function(){
      this._parent.you.hod.loadMovie("images/"+this.omg);
      this._parent.txt_hold.txt.text=this.txth;
      }

      }
      }
      function mover(){
      this._x = Math.cos(this.angle)*radiusx+centerx;
      this._y = Math.sin(this.angle)*radiusy+centery;
      var s = this._y/(centery+radiusy);
      this._alpha = s * 100;
      this._xscale = this._yscale = s*scl;
      this._parent.you.swapDepths(1000);
      this.swapDepths(Math.round(this._xscale)+100);
      this.angle+=this._parent.speed;
      }
      this.onMouseMove=function(){
      speed = (this._xmouse-centerx)/5000;
      }
      xl.load("gallery.xml");




      This is my code for a 3D rotation slide show. I bought this code off another programmer and I can't figure out how to do one last modification. I placed it on my site but it plays in the center x and y. I want it to play center but closer to the top. How do I modify this code to do so. Thanks for you assistance! :o)