Ver Mensaje Individual
  #3 (permalink)  
Antiguo 29/10/2012, 05:29
irenebb
 
Fecha de Ingreso: octubre-2012
Mensajes: 2
Antigüedad: 11 años, 6 meses
Puntos: 0
Respuesta: Ayuda¿donde pongo ._root para funcione script dentro de un MC?

Gracias!
si, he puesto antes de la instancia _root.
pero me sigue sin funcionar, igual tengo que ponerlo también en alguna funcion...?

centerx = Stage.width / 0.8;
centery = Stage.height / 1.25;
menucount = 6;
miwidth = this["_root.btn0" + menucount - 1]._width;
miborder = 10;
AnchMen = 0;
onEnterFrame = function ()
{
var _loc7 = 0;
for (var _loc2 = 0; _loc2 < menucount; ++_loc2)
{
var _loc3 = this["_root.btn0" + _loc2]._xmouse;
var _loc5 = this["_root.btn0" + _loc2]._ymouse;
var _loc4 = Math.sqrt(_loc3 * _loc3 + _loc5 * _loc5);
if (_loc4 < 70)
{
this["_root.btn0" + _loc2]._xscale = this["_root.btn0" + _loc2]._yscale = this["_root.btn0" + _loc2]._yscale + (200 - _loc4 - this["_root.btn0" + _loc2]._yscale) / 3;
}
else
{
this["_root.btn0" + _loc2]._xscale = this["_root.btn0" + _loc2]._yscale = this["_root.btn0" + _loc2]._yscale + (100 - this["_root.btn0" + _loc2]._yscale) / 3;
} // end else if
_loc7 = _loc7 + this["_root.btn0" + _loc2]._width;
} // end of for
_loc7 = _loc7 + (menucount - 1) * miborder;
var _loc6 = Math.round((centerx - _loc7) / 2);
_loc6 = _loc6 + Math.round((this.btn00._width + miborder) / 2);
for (var _loc2 = 1; _loc2 < menucount; ++_loc2)
{
x = _loc2 - 1;
_loc6 = _loc6 + (this["_root.btn0" + x]._width / 2 + miborder + this["_root.btn0" + _loc2]._width / 2);
this["_root.btn0" + _loc2]._x = _loc6;
this["_root.btn0" + _loc2]._y = centery;
} // end of for
this.btn00._x = this.btn01._x - this.btn00._width / 2 - this.btn01._width / 2 - miborder;
this.btn00._y = centery;
};