This is AS 2 code I found on the web. Can someone please add comments to it for me explaining what it does, because I have no idea and I want to write something in AS 3 that uses this code (I know it works, because the flash file does exactly what I want it to do, I just need to make adjustments to it).
numOfBalls:Number = 10; //number of Icons it creates
var radiusX:Number = 250; //radius of circle
var radiusY:Number = 75; //radius of circle
var centerX:Number = Stage.width / 2; //center of circle
var centerY:Number = Stage.height / 2; //center of circle
var speed:Number = 0.05; // speed of rotation
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;
}
i. To read or interpret (ambiguous, obscure, or illegible matter). See synonyms at solve.
ii. To convert from a code or cipher to plain text; decode.
WiKi wrote:DES Cipher is a block cipher (a form of shared secret encryption) that was selected by the National Bureau of Standards as an official Federal Information Processing Standard (FIPS) for the United States in 1976 and which has subsequently enjoyed widespread use internationally.
which part of the code in particular is confusing to you?
Most people would sooner die than think; in fact, they do so - Bertrand Russel
The problem is the way functions are written in AS3 vs AS2
What that function does is take the current object, icon I take it, and assigns a new x and y value to it based on a math calculation.
Also sets a rotation and scale to it which is odd. I don't see why it needs it.
Right at the end it does a layer depth adjustment based on the xScale of the object with 100 added to it which would make it current xScale + 100% which makes no sense at all.
Mail the original file to me at maxxis2112 at that gmail place .com