Hello,
I'm trying to migrate a simple actionscript 2.0 app to 3.0 and I'm having some problems finding equivelents of the onEnterFrame methods and the angle property in as 3.0.
In this section, I need to have the t movieClip variable onEnterFrame method call the mover function:
In this section, I need to find an as 3.0 equivelent to the this.angle property:
Any ideas?
Thanks,
Eric
I'm trying to migrate a simple actionscript 2.0 app to 3.0 and I'm having some problems finding equivelents of the onEnterFrame methods and the angle property in as 3.0.
In this section, I need to have the t movieClip variable onEnterFrame method call the mover function:
Code:
for(var i:Number = 0; i < numberOfItems; i++)
{
var t = attachMovie("icon", "icon"+i, i+1);
t.angle = i * ((Math.PI*2)/numberOfItems);
t.onEnterFrame = mover;
}
In this section, I need to find an as 3.0 equivelent to the this.angle property:
Code:
function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s:Number = this._y/(centerX + radiusY);
trace("**** angle: " + this.angle);
this._xscale = this._yscale = s * 100;
this.angle += this._parent.speed;
trace( "this: " + this);
this.swapDepths(Math.round(this._xscale) + 100);
}
Any ideas?
Thanks,
Eric