Oki, i’m generating a few movieclip functions from an array that relate to an mc that’s on the stage. However, in the mc.onRelease function, i can’t seem to get the _root.filename = *** .txt to match the name of said mc instance. Instead i get a really long location for the mc on the stage Any ideas how i can get round this?
var machines:Array = [unimatic,circularSaw,heatpress,embroidery,lineBender,laser,mugpress,vacuumF,linisher,profileCutter,pillarDrill,novamill,compactRouter];
for(var i:Number = 0; i < machines.length; i++)
{
var mc:MovieClip = machines*;
mc.onRollOver = function():Void
{
this.gotoAndPlay(2);
}
mc.onRollOut = function():Void
{
this.gotoAndStop(1);
}
mc.onRelease = function():Void
{
_root.attatchTab();
_root.filename = this + ".txt"; // THIS IS THE DEATH LINE >.<
}
}