..:: MX Studio Fóruns ::..: Como carregar swfs externos em seqüência - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




ATENÇÃO

Para evitar posts desnecessários e que não influam para o andamento e desenvolvimento do fórum, clique aqui e leia todas as regras.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Como carregar swfs externos em seqüência Preciso que meu banner carregue um swf seguido do outro

#1 User is offline   Ayame Kaneko 

  • Group: Membros
  • Posts: 1
  • Joined: 17-December 07

Posted 17 December 2007 - 05:03 PM

Preciso fazer um banner que carregue quatro swf externos. Quando o primeiro swf terminar, um segundo swf deve ser carregado, e depois que este terminar de exibir, mais um deve ser carregado em seqüência.
Só posso usar AS2 então se alguém puder me ajudar eu ficaria muit agradecido.

Segue meu código atual que funciona sem problemas até então:

CÓDIGO
var myXML:XML = new XML();
var XML_URL:String = "dado.xml";
var myLoader:MovieClipLoader = new MovieClipLoader();
var CaminhoAtual:Number = 0;
var endLoad:Object = new Object();
// quando terminar de carregar
endLoad.onLoadInit = function() {
    percent._visible = false;
    progressGraph._visible = false;
    holder01._visible = true;
};
//quando estiver carregando
endLoad.onLoadProgress = function(alvo:Object, bLoad:Number, bTotal:Number) {
    percent.text = Math.round(bLoad/bTotal*100)+"%";
    holder01._visible = false;
};

myXML.ignoreWhite = true;
myXML.onLoad = function(ok) {
    if (ok) {
        btn01.onRelease = function() {
            CaminhoAtual = 0;
            LoadSWF();
        };
        btn02.onRelease = function() {
            CaminhoAtual = 1;
            LoadSWF();
        };
        btn03.onRelease = function() {
            CaminhoAtual = 2;
            LoadSWF();
        };
        btn04.onRelease = function() {
            CaminhoAtual = 3;
            LoadSWF();
        };
        CaminhoAtual = 0;
            LoadSWF();
    }
};
myXML.load(XML_URL);
btn01.texto.text = "1";
btn02.texto.text = "2";
btn03.texto.text = "3";
btn04.texto.text = "4";

function LoadSWF() {
    holder01._visible = false;
    myLoader.unloadClip(holder01);
    myLoader.loadClip(myXML.firstChild.childNodes[CaminhoAtual].firstChild.nodeValue, holder01);
    CaminhoAtual++;
    if (CaminhoAtual > 3)
    {
        CaminhoAtual = 0;
    }
    percent._visible = true;
    progressGraph._visible = true;
    myLoader.addListener(endLoad);
}


Muito obrigado desde já
0

#2 User is offline   Natan 

  • Group: Moderador Global
  • Posts: 7350
  • Joined: 28-February 04

Posted 17 December 2007 - 09:03 PM

Veja se ajuda:

http://www.flashmasters.net/?site=tutoriai...cat=4&id=79

[]s
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic



Publicidade




2 User(s) are reading this topic
0 membro(s), 2 visitante(s) e 0 membros anônimo(s)