Yo veo 2 cosas:

1)

this.loadMovie(this.nombre,prof);

deberia ser:
this.clip.loadMovie(this.nombre,prof);

2)

No apliques la redimension hasta que hayas cargado la foto.

un saludo

Joseba Alonso
www.sidedev.net
----- Original Message ----- 
From: "ugly-naked" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 21, 2003 10:56 AM
Subject: [ASNativos] novato creando clases


hola,

estoy empezando con esto de las clases y me he basado (bueno, m�s bien
lo he copiado y he ido modificando) en un minitutorial de Joseba para
hacer botones din�micamente.

lo q quiero es una clase para cargar jpgs indic�ndoles el nombre,
tama�o y en q posici�n deben cargarse. la verdad es q estoy demasiado
pez, os pongo el c�digo por si alguno me puede dar algo de luz

<code>

_global.Imagen = function(nombre, x, y, w, h) {
this.width = 83;
this.height = 100;
this.x = x;
this.y = y;
this.w = w;
this.h = h;
this.nombre = nombre;
this.clip = null;
};

Imagen.prototype.cargar = function(mc, prof) {
this.clip = mc.createEmptyMovieClip("tHolder"+prof, prof);
this.clip._x = this.x;
this.clip._y = this.y;
this.clip._width = this.w;
this.clip._height = this.h;
this.clip.instancia = this;
this.loadMovie(this.nombre,prof);
};

</code>

y luego la llamo

<code>

var img = new Imagen("imagen1.jpg",10,10,83,100);
img.cargar(_root,1);

</code>

gracias


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

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

Responder a