Autor Tema: Preload vario swf  (Leído 2032 veces)

0 Usuarios y 1 Visitante están viendo este tema.

eeraul

  • Visitante
Preload vario swf
« : febrero 21, 2007, 02:38:16 pm »
Hey tengo un gran problema estoy haciendo una animacion en flash pero estoy usando varios swf que son llamados de el primero pero como puedo cargarlos desde que corre el primero :blackeye:

Desconectado kerberoz

  • The Communiter-
  • *
  • Mensajes: 3713
Re: Preload vario swf
« Respuesta #1 : febrero 21, 2007, 09:06:11 pm »
Si keres ke todos los swf te carguen al mismo tiempo pon cada swf dentro de clips de peliculas, se crean igual ke los botones.

Eso entendi, ¿a eso te referias?
El aguinaldo es un invento comunista; pero eso no te molesta, ¿Verdad?

eeraul

  • Visitante
Re: Preload vario swf
« Respuesta #2 : febrero 22, 2007, 01:40:59 pm »
BUENO VOY A TRATAR DE EXPLICARME MEJOR
HE HECHO 3 ANIMACIONES OSEA SON 3 ARCHIVOS swf Y DOS DE ELLOS LOS LLAMOS DESDE EL PRIMERO Y SON UNA SECUENCIAS PERO CUANDO CARGO EL PRIMERO NO HAY PROBLEMA CUANDO LLAMO AL SEGUNDO ASEA DESPUES DE TERMINAR EL PRIMERO SE TARDA EN ABRIR EL SEGUNDO PORQU TIENE QUE CARGARLO...ESE ES TODO EL ROLLO Y YO QUIERO SABER SI HAY FORMA DE CARGARLOS ANTES MIENTRAS CORRE EL PRIMERO....OK
OJALA ME HAYANENTENDIDO... GRACIAS

Desconectado mxgxw

  • Global Moderator
  • The Communiter-
  • *
  • Mensajes: 5665
  • Starlet - 999cc
    • mxgxw
Re: Preload vario swf
« Respuesta #3 : febrero 23, 2007, 08:06:10 pm »
BUENO VOY A TRATAR DE EXPLICARME MEJOR
HE HECHO 3 ANIMACIONES OSEA SON 3 ARCHIVOS swf Y DOS DE ELLOS LOS LLAMOS DESDE EL PRIMERO Y SON UNA SECUENCIAS PERO CUANDO CARGO EL PRIMERO NO HAY PROBLEMA CUANDO LLAMO AL SEGUNDO ASEA DESPUES DE TERMINAR EL PRIMERO SE TARDA EN ABRIR EL SEGUNDO PORQU TIENE QUE CARGARLO...ESE ES TODO EL ROLLO Y YO QUIERO SABER SI HAY FORMA DE CARGARLOS ANTES MIENTRAS CORRE EL PRIMERO....OK
OJALA ME HAYANENTENDIDO... GRACIAS

porque no los cargas desde el primer frame? osea, metelos en el primer frame y modifica los otros dos para que tengan un stop() en el primer frame.

despues cuando ya llegue el momento de correrlos solo les das play() a cada movieclip


eeraul

  • Visitante
Re: Preload vario swf
« Respuesta #4 : febrero 27, 2007, 01:25:18 pm »
hey gracias por la idea .....
y ademas que encontre la respuesta en un programa que se llama ScriptMaster
esta buenisimo y hay estaba...
les doy el codigo acontinuacion
Simply put all your movies to load and the corresponding
levels in the array moviearray. Remember: If you don\'t
want the loaded clips to start immediatly after beeing
loaded, you have to place a stop action in the first
frame of the movie.

frame 1:
//provide a list with all your movies to load and the levels to load into
moviearray = new Array("movie1.swf",1,"movie2.swf",2,"movie3.swf",3);
//set the index of the first movie to load
actMovieIdx = 0;

frame 2:
// get the next moviename and level
moviename = moviearray[actMovieIdx++];
movielevel = moviearray[actMovieIdx++];
// load the given movie
loadMovieNum(moviename, movielevel);

frame 3:
// nothing in here

frame 4:
//get the actual loaded bytes
actBytes = eval("_level" add movielevel).getBytesLoaded() || 0;
// get the total bytes to load
totBytes = eval("_level" add movielevel).getBytesTotal() || 100;
// calculate the percentage loaded
percent  = Math.round(actBytes * 100 / totBytes);

if( totBytes - actBytes > 10){//more bytes available, keep on loading
   gotoAndPlay(3);
} else if(actMovieIdx < moviearray.length){//if we got more movies to load   
   gotoAndPlay(2);   
} // else go to frame 5

frame 5:
// ready, go - here starts your movie
aqui esta si lo necesitan.....