ya't� lo q he hecho finalmente es, rellenar el borde y asignarle el 
evento al borde

<code>
_global.Imagen = function(nombre, x, y) {
        this.width = 83;
        this.height = 100;
        this.nombre = nombre;   
        this.x = x;
        this.y = y;
        this.colorBorder = "0x990000";
        this.lineBorder = 2;
        this.alfaBorder = 100;
        this.clip = null;
};
//
Imagen.prototype.cargar = function(mc, prof) {
        this.clip = mc.createEmptyMovieClip("tHolder"+prof, prof);
        this.clip.loadMovie(this.nombre);
        this.clip._x = this.x;
        this.clip._y = this.y;
        this.clip.instancia = this;
};
Imagen.prototype.borde = function(mc, prof) {
        this.clip = mc.createEmptyMovieClip("borde"+prof,prof);
        this.clip.beginFill(this.colorBorder);
        this.clip.lineStyle( this.lineBorder, this.colorBorder, 
this.alfaBorder );
        this.clip.moveTo( this.x, this.y );
        this.clip.lineTo( this.x + this.width, this.y ); 
        this.clip.lineTo( this.x + this.width, this.y + this.height );
        this.clip.lineTo( this.x , this.y + this.height );
        this.clip.lineTo( this.x , this.y );
        this.clip.endFill();
        this.clip.useHandCursor = true;
        this.clip.onRelease = this.__onRelease__;
        this.clip.instancia = this;
};
Imagen.prototype.__onRelease__ = function() {
   this.instancia.onClick();
};
</code>

la llamada

<code>
var img1 = new Imagen("imagen1.jpg",10,10);
img1.cargar(_root,2);
img1.borde(_root,1);
img1.onClick = function(){
        trace('imagen');
}
</code>

gracias, seguir� dando la chapa (no pretende ser una amenaza ;))

saludos



<!-------------------------------
Lista ASNativos:
subscripciones/desubscripciones
http://www.sidedev.net/asnativos
-------------------------------->

Responder a