17 Replies Latest reply on Feb 22, 2010 10:10 AM by lilizblacklb

    SwapDepths with 3d carousel

    lilizblacklb

      I did the 3d carousel tutorial from gotoandlearn.com and I manage to create a background color that will load once you click an image with a movie clip called dim . However this movieclip dim keeps appearing atop my icons. I tried Swapdepths to change the orders but its not working.

       

      Am I missing something?

       


      Code

       

      import mx.utils.Delegate;
      import mx.transitions.Tween;
      import mx.transitions.easing.*;

      var numOfItems:Number;
      var radiusX:Number = 300;
      var radiusY:Number = 75;
      var centerX:Number = Stage.width / 2;
      var centerY:Number = Stage.height / 2;
      var speed:Number = 0.05;
      var perspective:Number = 130;
      var home:MovieClip = this;
      theText._alpha = 0;

      var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
      tooltip._alpha = 0;

      var dim:MovieClip = this.attachMovie("dim","dim",10000);
      dim._alpha = 0;

      var xml:XML = new XML();
      xml.ignoreWhite = true;

      xml.onLoad = function()
      {
         var nodes = this.firstChild.childNodes;
         numOfItems = nodes.length;
         for(var i=0;i<numOfItems;i++)
         {
            var t = home.attachMovie("item","item"+i,i+1);
            t.angle = i * ((Math.PI*2)/numOfItems);
            t.onEnterFrame = mover;
            t.toolText = nodes[i].attributes.tooltip;
            t.content = nodes[i].attributes.content;
            t.icon.inner.loadMovie(nodes[i].attributes.image);
            t.r.inner.loadMovie(nodes[i].attributes.image);
            t.icon.onRollOver = over;
            t.icon.onRollOut = out;
            t.icon.onRelease = released;
         }
      }

      function over()
      {
         //BONUS Section
        
         home.tooltip.tipText.text = this._parent.toolText;
         home.tooltip._x = this._parent._x;
         home.tooltip._y = this._parent._y - this._parent._height/2;
         home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
         home.tooltip._alpha = 100;
      }

      function out()
      {
         delete home.tooltip.onEnterFrame;
         home.tooltip._alpha = 0;
      }

      function released()
      {
         //BONUS Section
         var sou:Sound = new Sound();
         sou.attachSound("sdown");
         sou.start();
        
         var dim:MovieClip = this.attachMovie("dim","dim",10000);
         dim._alpha =80
        
         home.dim.swapDepths(100);

         home.tooltip._alpha = 0;
         for(var i=0;i<numOfItems;i++)
         {
            var t:MovieClip = home["item"+i];
            t.xPos = t._x;
            t.yPos = t._y;
            t.theScale = t._xscale;
            delete t.icon.onRollOver;
            delete t.icon.onRollOut;
            delete t.icon.onRelease;
            delete t.onEnterFrame;
            if(t != this._parent)
            {
               var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
               var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
               var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
            }
            else
            {
               var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
               var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
               var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,200,1,true);
               var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,320,1,true);
               var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
               theText.text = t.content;
               var s:Object = this;
               tw.onMotionStopped = function()
               {
                  s.onRelease = unReleased;
               }
            }
         }
      }
      function unReleased()
      {
         //BONUS Section
         var sou:Sound = new Sound();
         sou.attachSound("sdown");
         sou.start();
        
         delete this.onRelease;
         var dim:MovieClip = this.attachMovie("dim","dim",10000);
         dim._alpha =0
        
         var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
         for(var i=0;i<numOfItems;i++)
         {
            var t:MovieClip = home["item"+i];
            if(t != this._parent)
            {
               var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
               var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
               var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
            }
            else
            {
               var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
               var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
               var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
               var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
               tw.onMotionStopped = function()
               {
                  for(var i=0;i<numOfItems;i++)
                  {
                     var t:MovieClip = home["item"+i];
                     t.icon.onRollOver = Delegate.create(t.icon,over);
                     t.icon.onRollOut = Delegate.create(t.icon,out);
                     t.icon.onRelease = Delegate.create(t.icon,released);
                     t.onEnterFrame = mover;
                    
                  }
               }
            }
         }
      }


      function moveTip()
      {
         home.tooltip._x = this._parent._x;
         home.tooltip._y = this._parent._y - this._parent._height/2;
      }

      xml.load("icons.xml");

      function mover()
      {
         this._x = Math.cos(this.angle) * radiusX + centerX;
         this._y = Math.sin(this.angle) * radiusY + centerY;
         var s = (this._y - perspective) /(centerY+radiusY-perspective);
         this._xscale = this._yscale = s*100;
         this.angle += this._parent.speed;
         this.swapDepths(Math.round(this._xscale) + 100);
      }

      this.onMouseMove = function()
      {
         speed = (this._xmouse-centerX)/7500;
      }

        • 1. Re: SwapDepths with 3d carousel
          kglad Adobe Community Professional & MVP

          what movieclip depths are you trying to change?

          • 2. Re: SwapDepths with 3d carousel
            lilizblacklb Level 1

            on funtion released

            I want the var dim to be behind the var t:Movieclip =home. in the preview the movie clip dim with the alpha of 80 appears on top the var t that has the carousel images.

             

            function released()
            {
               //BONUS Section
               var sou:Sound = new Sound();
               sou.attachSound("sdown");
               sou.start();
              
              var dim:MovieClip = this.attachMovie("dim","dim",10000);
               dim._alpha =80
              
               home.dim.swapDepths(100);


               home.tooltip._alpha = 0;
               for(var i=0;i<numOfItems;i++)
               {
                  var t:MovieClip = home["item"+i];
                  t.xPos = t._x;
                  t.yPos = t._y;
                  t.theScale = t._xscale;

                  delete t.icon.onRollOver;
                  delete t.icon.onRollOut;
                  delete t.icon.onRelease;
                  delete t.onEnterFrame;
                  if(t != this._parent)
                  {
                     var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
                     var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
                     var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
                  }
                  else
                  {
                     var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
                     var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
                     var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,200,1,true);
                     var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,320,1,true);
                     var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
                     theText.text = t.content;
                     var s:Object = this;
                     tw.onMotionStopped = function()
                     {
                        s.onRelease = unReleased;
                     }
                  }
               }
            }

             

            P.s: I shrank the code to the funtion released

            • 3. Re: SwapDepths with 3d carousel
              Ned Murphy Adobe Community Professional & MVP

              Try: home.swapDepths(dim);


              • 4. Re: SwapDepths with 3d carousel
                kglad Adobe Community Professional & MVP

                dim is a child of home.  you're not going to position dim behind home unless you change that.

                 

                try:

                 


                 

                function released()
                {
                   //BONUS Section
                   var sou:Sound = new Sound();
                   sou.attachSound("sdown");
                   sou.start();
                  
                 
                var dim:MovieClip = this._parent.attachMovie("dim","dim",10000);
                   dim._alpha =80
                  
                  dim.swapDepths(this.getDepth())


                   home.tooltip._alpha = 0;
                   for(var i=0;i<numOfItems;i++)
                   {
                      var t:MovieClip = home["item"+i];
                      t.xPos = t._x;
                      t.yPos = t._y;
                      t.theScale = t._xscale;

                      delete t.icon.onRollOver;
                      delete t.icon.onRollOut;
                      delete t.icon.onRelease;
                      delete t.onEnterFrame;
                      if(t != this._parent)
                      {
                         var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
                         var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
                         var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
                      }
                      else
                      {
                         var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
                         var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
                         var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,200,1,true);
                         var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,320,1,true);
                         var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
                         theText.text = t.content;
                         var s:Object = this;
                         tw.onMotionStopped = function()
                         {
                            s.onRelease = unReleased;
                         }
                      }
                   }
                }

                 

                P.s: I shrank the code to the funtion released

                • 5. Re: SwapDepths with 3d carousel
                  lilizblacklb Level 1

                  kglad wrote:

                   

                  dim is a child of home.  you're not going to position dim behind home unless you change that.

                   

                  try:

                   


                   

                  function released()
                  {
                     //BONUS Section
                     var sou:Sound = new Sound();
                     sou.attachSound("sdown");
                     sou.start();
                    
                   
                  var dim:MovieClip = this._parent.attachMovie("dim","dim",10000);
                     dim._alpha =80
                    
                    dim.swapDepths(this.getDepth())

                    

                   

                  I tried and it did sent it back but as i click on the icon to return to the carousel spining images the var dim does not dissappear as it should on function unreleased and keeps overlapping

                  • 6. Re: SwapDepths with 3d carousel
                    lilizblacklb Level 1

                    Ned Murphy wrote:

                     

                    Try: home.swapDepths(dim);


                    Tried. Nothing.

                    • 7. Re: SwapDepths with 3d carousel
                      kglad Adobe Community Professional & MVP

                      i don't understand your last message.

                      • 8. Re: SwapDepths with 3d carousel
                        lilizblacklb Level 1

                        kglad wrote:

                         

                        i don't understand your last message.

                        In this code when you click an image it zooms in to the left, a dynamic text appear with an information. The reason i am doing the dim movie is to work as a background only when click and this animation comes forth. I want the dim movieclip to appear behind the image and the text (you code did send it back as i wanted). However when you click the image on the left it should restore back to the carousel position and the dim movie i added should diaapear. Before applying your code it did dissapear but in function released () it was on top of everything when i apply the code it did sent it back but when the function unreleased is trigger to restore to the carousel the dim movie clip is not dissapearing to an alpha of 0.

                        • 9. Re: SwapDepths with 3d carousel
                          kglad Adobe Community Professional & MVP

                          change the first part of your released() and unreleased() functions to:

                           

                           

                          var dim:MovieClip;

                          function released()
                          {
                             //BONUS Section
                             var sou:Sound = new Sound();
                             sou.attachSound("sdown");
                             sou.start();
                           

                          if(!dim){
                            dim = this._parent.attachMovie("dim","dim",10000);

                          }
                             dim._alpha =80
                            dim.swapDepths(this.getDepth())

                          /////////////////////////////////////////////


                          function unReleased()
                          {
                             //BONUS Section
                             var sou:Sound = new Sound();
                             sou.attachSound("sdown");
                             sou.start();
                           
                             delete this.onRelease;

                          if(!dim){
                             var dim:MovieClip = this.attachMovie("dim","dim",10000);

                          }
                             dim._alpha =0;

                          dim.swapDepths(100000);
                            

                          1 person found this helpful
                          • 10. Re: SwapDepths with 3d carousel
                            lilizblacklb Level 1

                            kglad wrote:

                             

                            change the first part of your released() and unreleased() functions to:

                             

                             

                            var dim:MovieClip;

                            function released()
                            {
                               //BONUS Section
                               var sou:Sound = new Sound();
                               sou.attachSound("sdown");
                               sou.start();
                             

                            if(!dim){
                              dim = this._parent.attachMovie("dim","dim",10000);

                            }
                               dim._alpha =80
                              dim.swapDepths(this.getDepth())

                            /////////////////////////////////////////////


                            function unReleased()
                            {
                               //BONUS Section
                               var sou:Sound = new Sound();
                               sou.attachSound("sdown");
                               sou.start();
                             
                               delete this.onRelease;

                            if(!dim){
                               var dim:MovieClip = this.attachMovie("dim","dim",10000);

                            }
                               dim._alpha =0;

                            dim.swapDepths(100000);
                              

                            the code did something but now the dynamic text that appears when the image zoom to the left appear to be active even in unreleased and does not allow clicking in the other images. i tried

                             

                            delete this.onRelease;
                            theText.text = t.content;

                             

                            but didnt worked. theText is the instance name. Its like its overlapping with the carousel. you can see the text field in the mouse icon when you slide it in where the text is supposed to be when the info of the images is open.

                            • 11. Re: SwapDepths with 3d carousel
                              kglad Adobe Community Professional & MVP

                              none of the code i showed has any impact on theText.  recheck your code to see if you inadvertantly removed a tween of theText.  if you can't find where you did that, copy and paste your current code.

                              • 12. Re: SwapDepths with 3d carousel
                                lilizblacklb Level 1

                                Im really having a hard time figuring out how to incorporate my ideas throught actionscript.

                                 

                                I manage to fix the text lapping by moving the content up and away the area the images rotate. (A very cheap way to do it so i dont have to fight with codes) but it is bothering me when acessing the menu

                                 

                                I know this is off topic but can you add buttons inside the information on specific images in this carousel?

                                 

                                I used this tutorial as an example for the carousel

                                 

                                http://www.gotoandlearn.com/play?id=33

                                 

                                I want for every image to have a button below the image that directs them to another label or frame of the fla file.

                                 

                                I tried using a movie clip that i incorporated to the carousel via action script but in the code that same movie clip link will appear in all picture with the same direction to a frame or label. I want them to be different.

                                 

                                Im not that advance in actionscript but im trying to learn all i can.

                                 

                                I am appreciating any help.

                                 

                                This is what ive done so far

                                 

                                http://previewquadrangle.ilovedogsinc.com/index2.html

                                • 13. Re: SwapDepths with 3d carousel
                                  kglad Adobe Community Professional & MVP

                                  you can add buttons to each carousel image but you can't add mouse handlers to the parent image and expect the child buttons to respond to the mouse:  the parent image will interecept the mouse events you intend for the child buttons.

                                   

                                  however, you can define mouse handlers for your images' child buttons and create a button that will respond to the mouse when the mouse is not over another child button.

                                  • 14. Re: SwapDepths with 3d carousel
                                    lilizblacklb Level 1

                                    kglad wrote:

                                     

                                    you can add buttons to each carousel image but you can't add mouse handlers to the parent image and expect the child buttons to respond to the mouse:  the parent image will interecept the mouse events you intend for the child buttons.

                                     

                                    however, you can define mouse handlers for your images' child buttons and create a button that will respond to the mouse when the mouse is not over another child button.

                                    You lost me on the last sentence.

                                     

                                    To add buttons to each carousel image I have to do it via xml and define the var to appear with each image via actionscript? Thats how you define the content of each image. The buttons will only be shown when an image is clicked and will dissapear once they restore back to the carousel. I did manage to add this button to it but as you said the parent image intercepts and all images show the same button.

                                     

                                    What i dont catch and cant exactly do is defining mouse handlers like you said on last sentences. Im sorry Im not very proficient in actionscript to do this moused event to the child buttons and to respond to the mouse.

                                    • 15. Re: SwapDepths with 3d carousel
                                      kglad Adobe Community Professional & MVP

                                      remove the mouse handler for the parent and add a mouse handler for your child button.  once you have that working, you can add the rest of the coding.

                                      • 16. Re: SwapDepths with 3d carousel
                                        lilizblacklb Level 1

                                        when load the carousel it had mouse handlers but in function released i have this

                                         

                                        home.tooltip._alpha = 0;
                                            for(var i=0;i<numOfItems;i++)
                                            {
                                                var t:MovieClip = home["item"+i];
                                                t.xPos = t._x;
                                                t.yPos = t._y;
                                                t.theScale = t._xscale;
                                                delete t.icon.onRollOver;
                                                delete t.icon.onRollOut;
                                                delete t.icon.onRelease;
                                                delete t.onEnterFrame;
                                             

                                         

                                        So that when the image is click the rollover of the tooltip. If i delete this in funtion released and in on load function, it breaks most of the work regarding the dim, zoom in of the image and the text field with content.

                                         

                                        in function unreleased i also have this:

                                         

                                        var t:MovieClip = home["item"+i];
                                                            t.icon.onRollOver = Delegate.create(t.icon,over);
                                                            t.icon.onRollOut = Delegate.create(t.icon,out);
                                                            t.icon.onRelease = Delegate.create(t.icon,released);
                                                            t.onEnterFrame = mover;

                                         

                                        So it restores back to the on load movie.

                                         

                                        This is the whole code so far without removing any handlers for those button

                                         

                                         

                                        import mx.utils.Delegate;
                                        import mx.transitions.Tween;
                                        import mx.transitions.easing.*;

                                        var numOfItems:Number;
                                        var radiusX:Number = 300;
                                        var radiusY:Number = 75;
                                        var centerX:Number = Stage.width / 2;
                                        var centerY:Number = Stage.height / 2;

                                        var speed:Number = 0.05;
                                        var perspective:Number = 130;
                                        var home:MovieClip = this;

                                        var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",1000);
                                        tooltip._alpha = 0;

                                        var dim:MovieClip = this.attachMovie("dim","dim",10000);
                                        dim._alpha = 0;

                                        var button:MovieClip = this.attachMovie("button","button",100);
                                        button._alpha = 0;

                                        var xml:XML = new XML();
                                        xml.ignoreWhite = true;

                                        xml.onLoad = function()
                                        {
                                            var nodes = this.firstChild.childNodes;
                                            numOfItems = nodes.length;
                                            for(var i=0;i<numOfItems;i++)
                                            {
                                                var t = home.attachMovie("item","item"+i,i+1);
                                                t.angle = i * ((Math.PI*2)/numOfItems);
                                                t.onEnterFrame = mover;
                                                t.toolText = nodes[i].attributes.tooltip;
                                                t.content = nodes[i].attributes.content;
                                                t.icon.inner.loadMovie(nodes[i].attributes.image);
                                                t.r.inner.loadMovie(nodes[i].attributes.image);
                                                t.icon.onRollOver = over;
                                                t.icon.onRollOut = out;
                                                t.icon.onRelease = released;
                                            }
                                        }

                                        function over()
                                        {
                                            //BONUS Section
                                           
                                            home.tooltip.tipText.text = this._parent.toolText;
                                            home.tooltip._x = this._parent._x;
                                            home.tooltip._y = this._parent._y - this._parent._height/2;
                                            home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
                                            home.tooltip._alpha = 100;
                                        }

                                        function out()
                                        {
                                            delete home.tooltip.onEnterFrame;
                                            home.tooltip._alpha = 0;
                                        }

                                        function released()
                                        {


                                            if(!dim){
                                          dim = this._parent.attachMovie("dim","dim",10000);
                                        }
                                           dim._alpha =80
                                          dim.swapDepths(this.getDepth())
                                           
                                         
                                        var button:MovieClip = this.attachMovie("button","button",100);
                                        button._alpha = 100;

                                            home.tooltip._alpha = 0;
                                            for(var i=0;i<numOfItems;i++)
                                            {
                                                var t:MovieClip = home["item"+i];
                                                t.xPos = t._x;
                                                t.yPos = t._y;
                                                t.theScale = t._xscale;
                                                delete t.icon.onRollOver;
                                                delete t.icon.onRollOut;
                                                delete t.icon.onRelease;
                                                delete t.onEnterFrame;
                                                if(t != this._parent)
                                                {
                                                    var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
                                                    var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
                                                    var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
                                                }
                                                else
                                                {

                                                    var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,150,1,true);
                                                    var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,150,1,true);
                                                    var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,150,1,true);
                                                    var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,280,1,true);
                                                    var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
                                                    theText.text = t.content;
                                                    var s:Object = this;
                                                    tw.onMotionStopped = function()
                                                    {
                                                        s.onRelease = unReleased;
                                                    }
                                                }
                                            }
                                        }
                                        function unReleased()
                                        {
                                           
                                            delete this.onRelease;
                                            if(!dim){
                                           var dim:MovieClip = this.attachMovie("dim","dim",10000);
                                        }
                                           dim._alpha =0;
                                            dim.swapDepths(100000);
                                           
                                            var button:MovieClip = this.attachMovie("button","button",100);
                                            button._alpha = 0;

                                            delete this.onRelease;
                                            var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
                                           
                                            for(var i=0;i<numOfItems;i++)
                                            {
                                                var t:MovieClip = home["item"+i];
                                                if(t != this._parent)
                                                {
                                                    var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
                                                    var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
                                                    var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
                                                }
                                                else
                                                {
                                                    var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
                                                    var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
                                                    var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
                                                    var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
                                                    tw.onMotionStopped = function()
                                                    {
                                                        for(var i=0;i<numOfItems;i++)
                                                        {
                                                            var t:MovieClip = home["item"+i];
                                                            t.icon.onRollOver = Delegate.create(t.icon,over);
                                                            t.icon.onRollOut = Delegate.create(t.icon,out);
                                                            t.icon.onRelease = Delegate.create(t.icon,released);
                                                            t.onEnterFrame = mover;
                                                           
                                                        }
                                                    }
                                                }
                                            }
                                        }


                                        function moveTip()
                                        {
                                            home.tooltip._x = this._parent._x;
                                            home.tooltip._y = this._parent._y - this._parent._height/2;
                                        }

                                        xml.load("icons.xml");

                                        function mover()
                                        {
                                            this._x = Math.cos(this.angle) * radiusX + centerX;
                                            this._y = Math.sin(this.angle) * radiusY + centerY;
                                            var s = (this._y - perspective) /(centerY+radiusY-perspective);
                                            this._xscale = this._yscale = s*100;
                                            this.angle += this._parent.speed;
                                            this.swapDepths(Math.round(this._xscale) + 100);

                                        }

                                        this.onMouseMove = function()
                                        {
                                            speed = (this._xmouse-centerX)/10000;
                                           
                                        }

                                         

                                        P.s: Do you accept donations?

                                        • 17. Re: SwapDepths with 3d carousel
                                          lilizblacklb Level 1

                                          I manage to add the button and interact with a urlref in the xml with an example over gotoandlearn forum. However this example seems to work with urls specified in the xml of each icon content. My intention is to load another movie clip of fla inside my project. I really don't know if its possible to specified paths to each icon content when in the as code the icon is called depending on the xml. I mean I already have the button done but all I need is how to make it work with a movieclip with the project.   Since the icons are not specified in the fla file since it connects to the xml I really don't know how to do it or link them to their respective content.

                                           

                                          This is the example used

                                           

                                          http://www.oddsmaker.com/downloads/carousel3.zip