Código :
function generate_thumbs() {
var container:MovieClip = this.createEmptyMovieClip("container",this.getNextHighestDepth());
for(i = 0; i< total;i++) {
thumb:MovieClip = container.createEmptyMovieClip("thumb"+i,i);
thumb.loadMovie(thumbnail[i], 1);
thumb._xscale = thumb._yscale = 90;
thumb._x = (i)* 40;
thumb.onRollOver = function () {thumb._xscale = thumb._yscale = 100;};
thumb.onRollOut = function () { thumb._xscale = thumb._yscale = 90;};
thumb.onRelease = function() {
nImage(i);
}
}
container._x = 60;
container._y = (this._height - 30);
Me muestra las imágenes correctamente, pero no ocurren los eventos que le puse. Que debería hacer?
También tengo otras preguntas
- Después de meter la imagen al MovieClip el ancho (thumb._width) me sigue dando 0. Igual para el container, tras añadir todos los thumbnails su width es 0. Cómo puedo saber el ancho correcto del MovieClip?
Está bien meter la función nImage(i) así?. Digo, al final del bucle i va a ser igual a total. Al hacer click se va a ejecutar la función con el valor que tuvo i en ese momento o el valor final de i?
Espero me puedan ayudar. Gracias por todo.
Ahh por cierto estoy usando el flash MX (no el 2004 MX)..
