Hacer un preloader en CS3

  • VictorEremita
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Ene 25, 2008
  • Mensajes: 10
  • Status: Offline

Nota Julio 22nd, 2008, 6:21 am

Quería hacer un preloader para un destello de la película con sonido, pero tengo bastantes problemas para hacerlo. Im usando flash CS3.

He encontrado este tutorial sobre cómo hacer una -- http://www.oreillynet.com/pub/a/oreilly ... _0501.html -- Pero me queda atascado ya en el trámite 8, donde dice "Usar Modificar -> Marco para la nueva etiqueta de fotogramas clave de carga". Al hacer clic en Modificar CS3, theres nada llamado Frame en ese país. Así que no he podido seguir el resto del tutorial.

Bueno, el tutorial es, después de todo, créditos para Flash 5, así que buscaron la internet un tutorial para decirme cómo hacer un preloader en CS3. Sin embargo, todos los tutoriales que pude encontrar fue para ActionScript 3. Hice mi flash en el documento de ActionScript 2 porque yo había escuchado algunas ventajas a ActionScript 2, que adapta lo que yo tenía en mente para el documento. En este punto, desde Im un noob, no entiendo la diferencia entre actionscript 2 y 3 que mucho.

Entonces, ¿cómo puedo hacer un preloader en CS3 con actionscript 2?

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

Nota Julio 22nd, 2008, 6:21 am

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23407
  • Loc: Woodbridge VA
  • Status: Offline

Nota Julio 22nd, 2008, 6:54 am

Ver si este le ayuda.
http://biochimistu.blogspot.com/2008/02 ... as-20.html
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • VictorEremita
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Ene 25, 2008
  • Mensajes: 10
  • Status: Offline

Nota Julio 22nd, 2008, 7:49 am

ATNO/TW escribió:
Ver si este le ayuda.
http://biochimistu.blogspot.com/2008/02 ... as-20.html


Extraño resultado. He seguido su tutorial pero con mi documento existente. He creado las capas dijo, y se incluirán sobre el script en el primer cuadro. Luego me mudé a mi propia película de capas para el segundo cuadro. Ok, entonces yo debería ver la pantalla de carga en el cuadro 1 y se supone que sólo siguen marco 2 (donde comienza mi película) cuando se ha cargado todo. Después de cargar, en efecto, seguir el segundo cuadro, pero luego no pasa nada. Su pegada sólo en el segundo cuadro. No tengo ni idea de por qué de repente no reproducir la película después de seguir sus consejos. Incluso he tratado de insertar jugar (); en el segundo cuadro y un montón de cosas - pero no, después de la carga que acabo de ver el segundo cuadro y nada más.

Y cuando se mira en el código No lo entiendo. El presente. gotoAndPlay (2); debería hacer la película de jugar allí (acciones no se detiene en cuadro 2).

Im confundido. Pero gracias hasta la fecha.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23407
  • Loc: Woodbridge VA
  • Status: Offline

Nota Julio 22nd, 2008, 8:45 am

Humor mí y en lugar de gotoAndPlay (2) intentar gotoAndStop (2)

I solucionado este problema el día de ayer la misma manera
flash-forum/problem-programming-flash-and-actionscript-t89436.html

gotoAndPlay, wouldnt trabajo, pero gotoAndStop hizo.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • Xarathal
  • Born
  • Born
  • Avatar de Usuario
  • Registrado: Abr 20, 2007
  • Mensajes: 3
  • Status: Offline

Nota Julio 24th, 2008, 2:19 pm

Heres el código que uso. Básicamente, se crea un clip de película llamado "mcPreloader", asegúrese de que cuenta con 100 cuadros en él, lo puso en la línea de tiempo raíz, y luego poner el código siguiente dentro de mcPreloader:

Código: [ Select ]
 
/************************************************************************
Preloader by http://www.TheCosmonaut.com
Modified from source code from Chris Sessions
Preloader movie clip must have 100 frames
************************************************************************/
//-- stop the parent movie
this._parent.stop();
//-- Define the name of the start frame. You can change this to be anything (a frame number or a frame name). Whatever it is, it refers to the frame of the main movie clip you want to play when the preloader is finished preloading.
var startFrame = "main";
//-- preload function
var preloadCounter:Boolean = false;
function preload(cutoffPercent:Number) {
    var totalBytes:Number = 0;
    var loadedBytes:Number = 0;
    //-- add parent bytes to total  
    totalBytes += Math.round(this._parent.getBytesTotal()/1024);
    loadedBytes += Math.round(this._parent.getBytesLoaded()/1024);
    //-- calculate percent done
    var percentDone = Math.round((loadedBytes/totalBytes)*cutoffPercent);
    if (loadedBytes>=totalBytes) {
        if (preloadCounter == false) {
            percentDone = 0;
            preloadCounter = true;
        } else {
            this.stop();
            delete(this.onEnterFrame);
            this._parent.gotoAndPlay(startFrame);
        }
    } else {
        this.gotoAndStop(percentDone);
    }
}
//-- start the function
this.onEnterFrame = function() {
    preload(100);
};
 
  1.  
  2. /************************************************************************
  3. Preloader by http://www.TheCosmonaut.com
  4. Modified from source code from Chris Sessions
  5. Preloader movie clip must have 100 frames
  6. ************************************************************************/
  7. //-- stop the parent movie
  8. this._parent.stop();
  9. //-- Define the name of the start frame. You can change this to be anything (a frame number or a frame name). Whatever it is, it refers to the frame of the main movie clip you want to play when the preloader is finished preloading.
  10. var startFrame = "main";
  11. //-- preload function
  12. var preloadCounter:Boolean = false;
  13. function preload(cutoffPercent:Number) {
  14.     var totalBytes:Number = 0;
  15.     var loadedBytes:Number = 0;
  16.     //-- add parent bytes to total  
  17.     totalBytes += Math.round(this._parent.getBytesTotal()/1024);
  18.     loadedBytes += Math.round(this._parent.getBytesLoaded()/1024);
  19.     //-- calculate percent done
  20.     var percentDone = Math.round((loadedBytes/totalBytes)*cutoffPercent);
  21.     if (loadedBytes>=totalBytes) {
  22.         if (preloadCounter == false) {
  23.             percentDone = 0;
  24.             preloadCounter = true;
  25.         } else {
  26.             this.stop();
  27.             delete(this.onEnterFrame);
  28.             this._parent.gotoAndPlay(startFrame);
  29.         }
  30.     } else {
  31.         this.gotoAndStop(percentDone);
  32.     }
  33. }
  34. //-- start the function
  35. this.onEnterFrame = function() {
  36.     preload(100);
  37. };
  38.  


Me gusta este código, porque se pueden hacer cosas más elaboradas dentro de la precarga (como han clips de película dentro de la precarga que se disparan cuando se llega a un marco específico).

Rock on!

- Eric
  • VictorEremita
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Ene 25, 2008
  • Mensajes: 10
  • Status: Offline

Nota Julio 25th, 2008, 4:42 am

Gracias hombre!

Publicar Información

  • Total de mensajes en este tema: 6 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 42 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