Selson, no logro comprender exactamente lo que quieres, pero he elaborado este pequeño ejemplo por si te sirve de algo.
Para esto he creado un MovieClip vacío ( –insertar > nuevo símbolo > clip de pelicula > > nombrar > aceptar).
Le he añadido dos capas más.
En el primer fotograma de la capa inferior he creado un campo de texto, he escrito directamente sobre el mismo y lo he nombrado –mitexto_txt-.
En el primer fotograma de la capa inmediatamente superior he creado un círculo y lo he convertido a mc. Lo he nombrado -circulo_mc-.
En la tercera capa he puesto este código:
Código :
posx = mitexto_txt._x + (mitexto_txt._width) / 2;
posy = mitexto_txt._y + (mitexto_txt._height) / 2;
scala_x = this._xscale;
scala_y = this._yscale;
mitxt_xscla = mitexto_txt._xscale;
mitxt_yscla = mitexto_txt._yscale;
//*********
//aquí hacemos que el circulo enmascare al campo de texto
this.setMask(circulo_mc);
//acciones al presionar sobre el circulo que actúa como botón
circulo_mc.onPress = function() {
this._xscale = scala_x;
this._yscale = scala_y;
mitexto_txt._xscale *= 2;
mitexto_txt._yscale *= 2;
this.onEnterFrame = function() {
this._x = mitexto_txt._xmouse;
this._y = mitexto_txt._ymouse;
if (this._x > mitexto_txt._x + mitexto_txt._width) {
this._x = mitexto_txt._x + mitexto_txt._width;
}
if (this._x < mitexto_txt._x) {
this._x = mitexto_txt._x;
}
if (this._y > mitexto_txt._y + mitexto_txt._height) {
this._y = mitexto_txt._y + mitexto_txt._height;
}
if (this._y < mitexto_txt._y) {
this._y = mitexto_txt._y;
}
};
};
//*********
circulo_mc.onRelease = circulo_mc.onReleaseOutside = function () {
delete this.onEnterFrame;
mitexto_txt._xscale = scala_x;
mitexto_txt._yscale = scala_y;
this._x = posx;
this._y = posy;
this._xscale = this._xscale * (mitexto_txt._width / this._width);
this._yscale = this._yscale * (mitexto_txt._height / this._height);
};
//**********
circulo_mc.onRollOut = function() {
this._xscale = scala_x;
this._yscale = scala_y;
};