Dynimically cargado clips - con ayuda de getProperty - ¿CÓMO?

  • jbezzina
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Jul 26, 2004
  • Mensajes: 5
  • Status: Offline

Nota Julio 26th, 2004, 1:43 am

Estoy cargando una imagen en _level20. ¿Cómo puedo obtener las propiedades de esta imagen?

Código: [ Select ]
    this.button.onRelease = function() {
        myMCL.loadClip("gallery/photo10.jpg", 20);
        picWidth = getProperty(_target, _width);
        picHeight = getProperty(_target, _height);
        trace(picWidth);
        trace(picHeight);
    };
  1.     this.button.onRelease = function() {
  2.         myMCL.loadClip("gallery/photo10.jpg", 20);
  3.         picWidth = getProperty(_target, _width);
  4.         picHeight = getProperty(_target, _height);
  5.         trace(picWidth);
  6.         trace(picHeight);
  7.     };

¿Qué puedo hacer en lugar de _target?

Gracias :)
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Julio 26th, 2004, 1:43 am

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Julio 26th, 2004, 2:26 am

jbezzina, por favor, recuerde que debe envolver el código dentro de [code] [/ code] o [php] [/ php] tags, Gracias :)
Strong with this one, the sudo is.
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Julio 26th, 2004, 2:41 am

¿Qué versión de Flash utiliza?

getProperty (instanceName, propiedad) prácticamente ha sido sustituido por _ alfa , _ anchura , _ altura , Ect .. [b]

En lugar de utilizar getProperty () probar esto,
Código: [ Select ]
buttonInstanceName.onRelease = function() {
   myMCL.loadMovie("gallery/photo10.jpg"); //I've never seen loadClip() before :-/
   picWidth = myMCL._width;
   picHeight = myMCL._height
   trace(picWidth);
   trace(picHeight);
  };
  1. buttonInstanceName.onRelease = function() {
  2.    myMCL.loadMovie("gallery/photo10.jpg"); //I've never seen loadClip() before :-/
  3.    picWidth = myMCL._width;
  4.    picHeight = myMCL._height
  5.    trace(picWidth);
  6.    trace(picHeight);
  7.   };


Ive nunca visto [b] loadClip ()
antes de que cualquiera "Title =" Confused "/>
Strong with this one, the sudo is.
  • jbezzina
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Jul 26, 2004
  • Mensajes: 5
  • Status: Offline

Nota Julio 26th, 2004, 2:53 am

Hi paciencia.

Im usando MX 2004. Gracias por la punta. Trataré más tarde ya que tengo que correr.

Lo siento por el código cosa. Este fue mi primer desplazamiento a aquí. Estoy seguro de que no será mi último.

;)
  • jbezzina
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Jul 26, 2004
  • Mensajes: 5
  • Status: Offline

Nota Julio 26th, 2004, 5:52 am

Hola paciencia.

Im miedo de que no devuelve ningún valor. Im getting indefinido

Lo intenté con loadMovie y loadClip pero ambos fracasaron. Aquí está el código completo:

Código: [ Select ]
var myMCL:Object = new MovieClipLoader();

for (b=1; b<21; b++) {
    this.button.onRelease = function() {
        myMCL.loadMovie("gallery/photo10.jpg", 20);
        picWidth = myMCL._width;
        picHeight = myMCL._height;
        trace(picWidth);
        trace(picHeight);
    };
}
  1. var myMCL:Object = new MovieClipLoader();
  2. for (b=1; b<21; b++) {
  3.     this.button.onRelease = function() {
  4.         myMCL.loadMovie("gallery/photo10.jpg", 20);
  5.         picWidth = myMCL._width;
  6.         picHeight = myMCL._height;
  7.         trace(picWidth);
  8.         trace(picHeight);
  9.     };
  10. }


¿Alguna idea?
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Julio 26th, 2004, 11:01 pm

jbezzina escribió:
Hola paciencia.
Im usando MX 2004.


En ese caso es mejor que lea esto,
http://www.actionscript.org/tutorials/i ... ndex.shtml

MovieClipLoader es una nueva clase de MX2004 no era consciente de (im utilizando 6) lo que tu buscas está en párrafo 8 (theyre paginación) del enlace de arriba.

Código: [ Select ]
var myMCL = new MovieClipLoader();
myMCL.onLoadInit = function (targetMC)
{
    picWidth = targetMC._width;
    picHeight = targetMC._height;
}

myMCL.loadClip("path/to/movie.swf","targetMC");
  1. var myMCL = new MovieClipLoader();
  2. myMCL.onLoadInit = function (targetMC)
  3. {
  4.     picWidth = targetMC._width;
  5.     picHeight = targetMC._height;
  6. }
  7. myMCL.loadClip("path/to/movie.swf","targetMC");
Strong with this one, the sudo is.
  • lostinbeta
  • Guru
  • Guru
  • Avatar de Usuario
  • Registrado: Jun 26, 2003
  • Mensajes: 1402
  • Loc: Philadelphia, PA
  • Status: Offline

Nota Julio 27th, 2004, 7:56 pm

El contenido debe ser del 100% cargadas antes de poder modificar sus propiedades.

En Flash MX usted tuvo que hacer una dinámica preloader, pero en MX 2004 como joebert dijo, crearon un MovieClipLoader () de clase que hace que este más fácil para usted gente (suerte cabrones!...hehe)

Publicar Información

  • Total de mensajes en este tema: 7 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 43 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC