Advertisement

07.21.2004 at 05:25PM PDT, ID: 21067092
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.0

FLASH MX Actionscript - Rotating Picture Gallery

Asked by eazy123 in Macromedia Flash

Tags: , , ,

Hi there ppls, i have obtained the following actionscript, it all works nicely...what happens basically there are numerous pictures that rotate in a 3d gallery....the rotation occurs horizontal, however I need it to rotate vertical here is the code:

walls = new array();
rad = Math.PI/180;
// number of items
max = 6;
// width of items
width = 50;
rat = width/100;
radius = (width*max)/Math.PI;
astep = -360/max;
dist = radius*2+50;
for (i=0; i<max; i++) {
      walls[i] = new Object();
      walls[i].y = 0;
      walls[i].x1 = Math.sin(astep*i*rad)*radius+Math.sin((astep*i+90)*rad)*width/2;
      walls[i].z1 = Math.cos(astep*i*rad)*radius+Math.cos((astep*i+90)*rad)*width/2;
      walls[i].x2 = Math.sin(astep*i*rad)*radius+Math.sin((astep*i-90)*rad)*width/2;
      walls[i].z2 = Math.cos(astep*i*rad)*radius+Math.cos((astep*i-90)*rad)*width/2;
}
//
function clicked (n) {
      _root.menu._xscale = _root.menu._yscale=20;
      _root.menu._x = 50;
      _root.menu._y = 200;
      _root.menu.gotoAndStop(2);
      _root.name_section = "section::" add n
}
function menuback () {
      _root.menu._xscale = _root.menu._yscale=100;
      _root.menu._x = 160;
      _root.menu._y = 120;
      _root.menu.gotoAndStop(1);
      _root.name_section = "main"
}
//
function Redraw (ya) {
      xa = 0;
      var cosYangle = Math.cos(ya*rad);
      var sinYangle = Math.sin(ya*rad);
      var cosXangle = Math.cos(xa*rad);
      var sinXangle = Math.sin(xa*rad);
      // rotation
      for (i=0; i<max; i++) {
            x = walls[i].x1;
            z = walls[i].z1;
            y = walls[i].y1;
            var tempz = (z*cosYangle)-(x*sinYangle);
            var tx = (z*sinYangle)+(x*cosYangle);
            var tz = (y*sinXangle)+(tempz*cosXangle);
            var ty = (y*cosXangle)-(tempz*sinXangle);
            var zratio = dist/(tz+dist);
            walls[i].sx1 = +tx*zratio;
            walls[i].sy1 = -ty*zratio;
            walls[i].size1 = 50*zratio;
            x = walls[i].x2;
            z = walls[i].z2;
            y = walls[i].y2;
            var tempz = (z*cosYangle)-(x*sinYangle);
            var tx = (z*sinYangle)+(x*cosYangle);
            var tz = (y*sinXangle)+(tempz*cosXangle);
            var ty = (y*cosXangle)-(tempz*sinXangle);
            var zratio = dist/(tz+dist);
            walls[i].sx2 = +tx*zratio;
            walls[i].sy2 = +ty*zratio;
            walls[i].size2 = 50*zratio;
      }
      // visualisation
      for (i=0; i<max; i++) {
            name = "sh" add i;
            _root.menu.ins.attachMovie("shape", name, i+1);
            _root.menu.ins[name].pic.gotoAndStop(i%7);
            _root.menu.ins[name].pic.name = i;
            _root.menu.ins[name].n = i;
            if (walls[i].size1<walls[i].size2) {
                  ratio = int((walls[i].size1/walls[i].size2)*1000);
                  _root.menu.ins[name]._x = walls[i].sx2/(r+1);
                  _root.menu.ins[name]._y = -walls[i].sy2/(r+1);
                  _root.menu.ins[name]._yscale = walls[i].size2/(r+1);
                  _root.menu.ins[name]._xscale = (walls[i].sx1-walls[i].sx2)/(r+1);
                  _root.menu.ins[name].pic._xscale = -100;
            } else {
                  ratio = int((walls[i].size2/walls[i].size1)*1000);
                  _root.menu.ins[name]._x = walls[i].sx1/(r+1);
                  _root.menu.ins[name]._y = -walls[i].sy1/(r+1);
                  _root.menu.ins[name]._yscale = walls[i].size1/(r+1);
                  _root.menu.ins[name]._xscale = (walls[i].sx2-walls[i].sx1)/(r+1);
            }
            _root.menu.ins[name]._alpha = 50;
            _root.menu.ins[name].gotoAndStop(1000-ratio);
      }
}
stop ();
Start Free Trial
[+][-]07.22.2004 at 01:19AM PDT, ID: 11610112

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2004 at 07:33AM PDT, ID: 11612674

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.22.2004 at 08:59AM PDT, ID: 11613579

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.26.2004 at 05:26PM PDT, ID: 11642702

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.27.2004 at 01:21AM PDT, ID: 11644258

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Macromedia Flash
Tags: flash, rotating, gallery, actionscript
Sign Up Now!
Solution Provided By: Rob2010
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.27.2004 at 04:39PM PDT, ID: 11652063

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.27.2004 at 06:23PM PDT, ID: 11652529

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44