Ho questa stringa di codice sul fotogramma 1:

<<<---->>>

snapToGrid = function ()
{
if (arguments.length<2)
{
return null;
}
var pos = arguments[0];
var size = arguments[1];
return Math.round(pos/size)*size;
};
mc1 .onPress = function()
{
this.startDrag();

};

mc1 .onRelease = function()
{
this.stopDrag();
this._x = snapToGrid(this._x, 5);
this._y = snapToGrid(this._y, 5);
};

Funziona perfettamente se metto mc1 come root, il problema è che io devo riuscire a dagli il nome dell'istanza (mc1, mc2, mc3.....) facendo leggre il numero (1, 2, 3....) da un campo di testo di imput che è sulla _root principale....non riesco
Invece di mc1 .onPress = function()
ho prvato con
mc(_root.control).onPress = function()
ma naturalmente non funziona....

ecco il mio file swf

ecco il mio file fla