Precarga externa swf invisible ayuda!

  • skilleddesigner
  • Born
  • Born
  • No Avatar
  • Registrado: Oct 12, 2008
  • Mensajes: 1
  • Status: Offline

Nota Octubre 12th, 2008, 12:25 pm

Hola amigos,

tengo 4 swf

1.main.swf
2.content1.swf
3.content2.swf
4.content3.swf


en main.swf, estoy usando los siguientes scripts para cargar swf externo (content1.swf, content2.swf & content3.swf) de forma dinámica con las transiciones.

Código: [ Select ]
stop();



//initialise a variable
nextMovie="content1.swf";
//load the starting movie into level 1
loadMovieNum(nextMovie,1);



//button1 actions
button1.onRelease=function(){
    //this makes sure that content 1 isn't already loaded
    if(nextMovie!="content1.swf"){
    //set the variable that holds the name of the movie to be loaded
    nextMovie="content1.swf";
    //tell the currently loaded content movie to play it's outro animation
    _level1.gotoAndPlay("outro");
}
}





//button2 actions
button2.onRelease=function(){
    //this makes sure that content 1 isn't already loaded
    if(nextMovie!="content2.swf"){
    //set the variable that holds the name of the movie to be loaded
    nextMovie="content2.swf";
    //tell the currently loaded content movie to play it's outro animation
    _level1.gotoAndPlay("outro");
}
}



//button3 actions
button3.onRelease=function(){
    //this makes sure that content 3 isn't already loaded
    if(nextMovie!="content3.swf"){
    //set the variable that holds the name of the movie to be loaded
    nextMovie="content3.swf";
    //tell the currently loaded content movie to play it's outro animation
    _level1.gotoAndPlay("outro");
}
}
  1. stop();
  2. //initialise a variable
  3. nextMovie="content1.swf";
  4. //load the starting movie into level 1
  5. loadMovieNum(nextMovie,1);
  6. //button1 actions
  7. button1.onRelease=function(){
  8.     //this makes sure that content 1 isn't already loaded
  9.     if(nextMovie!="content1.swf"){
  10.     //set the variable that holds the name of the movie to be loaded
  11.     nextMovie="content1.swf";
  12.     //tell the currently loaded content movie to play it's outro animation
  13.     _level1.gotoAndPlay("outro");
  14. }
  15. }
  16. //button2 actions
  17. button2.onRelease=function(){
  18.     //this makes sure that content 1 isn't already loaded
  19.     if(nextMovie!="content2.swf"){
  20.     //set the variable that holds the name of the movie to be loaded
  21.     nextMovie="content2.swf";
  22.     //tell the currently loaded content movie to play it's outro animation
  23.     _level1.gotoAndPlay("outro");
  24. }
  25. }
  26. //button3 actions
  27. button3.onRelease=function(){
  28.     //this makes sure that content 3 isn't already loaded
  29.     if(nextMovie!="content3.swf"){
  30.     //set the variable that holds the name of the movie to be loaded
  31.     nextMovie="content3.swf";
  32.     //tell the currently loaded content movie to play it's outro animation
  33.     _level1.gotoAndPlay("outro");
  34. }
  35. }



parece que todo funciona bien.
¿Es posible cargar el swf externo de todos los archivos de forma invisible mientras navega por el sitio web? algo así como múltiples preloader swf.
mi intención es la carga Content1. swf, content2.swf & content3.swf invisible en la memoria caché de antelación para que no se carga de nuevo y de nuevo una vez que haga clic en button1 button2 & button3.

cualquier idea de los amigos??
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Octubre 12th, 2008, 12:25 pm

  • graphixboy
  • Control + Z
  • Mastermind
  • Avatar de Usuario
  • Registrado: Jul 11, 2005
  • Mensajes: 1828
  • Loc: In the Great White North
  • Status: Offline

Nota Octubre 13th, 2008, 5:48 am

Mueva el clip objetivo de la etapa por lo que no puede ver. Luego hacer su carga y, o bien mover el clip de nuevo cuando quiera que sea visible o volcado de la pinza después de su carga y recarga de nuevo cuando lo necesite de la caché.
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com

Publicar Información

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