Need help with action script

  • haskell
  • Novice
  • Novice
  • haskell
  • Posts: 28

Post 3+ Months Ago

This is script for a carousel with one graphic, duplicated 10 times. I need to have three different graphics, it doesn't matter what order their in. I think it has something to do with the red colord part of the script, only I don't fully understand all of this part. Can I please get some instruction on how to add two more seperate graphics, and what exactly the red colord script means. Thanks






var numOfBalls:Number = 10;
var radiusX:Number = 250;
var radiusY:Number = 75;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.05;

for(var i=0;i<numOfBalls;i++)
{
var t = this.attachMovie("ball","b"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfBalls);
t.onEnterFrame = mover;
}

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._xscale = this._yscale = s*100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
}

this.onMouseMove = function()
{
speed = (this._xmouse-centerX)/1500;
}
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

do you care if the new ones show up in order? IE ball 1 is red, ball 2 is blue, ball 3 is green, ball 4 is red... or do you want them to be random?
  • haskell
  • Novice
  • Novice
  • haskell
  • Posts: 28

Post 3+ Months Ago

Hey, no it doesn't matter what order their in. Thanks.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 9 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.