First off, I am a beginner, so this may sound like a silly question. Can anyone explain to me how to embed this into an existing FLA file as a movie clip?
import mx.utils.Delegate;
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 = 65;
var home:MovieClip = this;
var tooltip:MovieClip = this.attachMovie(“tooltip”,“tooltip”,10000);
tooltip._alpha = 0;
var tooltipArray:Array = new Array(“Angela Ortman”,“Chrissie Pedigo”,“Tina Hodge”,“Jay Myer- CEO”,“Jed McCrory”,“Jessica Reynolds”,“Trina Ellis”,“Krysti Storey”,“Laura Folsom”,“Shannon Goines”,“Tina Hodge”, “Trina Ellis”)
init()
function init()
{
numOfItems = 10
for(var i=0;i<numOfItems;i++)
{
var t = home.attachMovie(“item”,“item”+i,i+1);
t.angle = i * ((Math.PI2)/numOfItems);
t.onEnterFrame = mover;
t.toolText = tooltipArray
t.icon.inner.loadMovie(“icon” + (i+1) + “.png”);
t.r.inner.loadMovie(“icon” + (i+1) + “.png”);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
}
function over()
{
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()
{
trace(this._parent.toolText);
}
function moveTip()
{
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
}
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) + 65);
}
this.onMouseMove = function()
{
speed = (this._xmouse-centerX)/6000;
}