import caurina.transitions.Tweener;A pasta de todos os arquivos é aqui
var posL:int = 1;
var xmlSite:XML;
var xmlListSite:XMLList;
var xmlLoaderSite:URLLoader = new URLLoader();
//xmlLoaderSite.load(new URLRequest("/xml/imagens-empresa-produtos.xml"));
xmlLoaderSite.load(new URLRequest("http://65.254.56.211/~soda/sodaflash/painel_simples/xml.xml"));
xmlLoaderSite.addEventListener(Event.COMPLETE, xmlLoadedSite);
function xmlLoadedSite(event:Event):void {
xmlSite=XML(event.target.data);
xmlListSite=xmlSite.children();
desmonta(0)
}
var imageLoader:Loader
function desmonta(n:int){
Tweener.addTween(local,{alpha:1,time:1, onComplete:function() { monta(n); }});
// Tweener.addTween(porcentagem,{alpha:1,time:1});
}
function monta(n:int){
imageLoader = new Loader();
imageLoader.load(new URLRequest(xmlSite.picture[n].attribute("miniature_url")));
local.addChild(imageLoader);
imageLoader.contentLoaderInfo.addEventListener( Event.INIT, mostraImagem );
}
function mostraImagem(event:Event ):void {
var loader:Loader=Loader(event.target.loader);
loader.alpha=0;
Tweener.addTween(loader,{alpha:1,time:2});
Tweener.addTween(local,{alpha:1,time:2});
// iniciando o Timer
meuTempo.start();
}
var meuTempo:Timer = new Timer(4000);
meuTempo.addEventListener("timer", FuncaoDoTimer);
//funcao será chamada a cada 500ms
function FuncaoDoTimer(e:TimerEvent){
meuTempo.stop();
trace(posL);
if(posL >= xmlListSite.length()-1){
desmonta(posL);
posL=0;
}else{
desmonta(posL);
posL++;
}
trace("Timer chamado " + meuTempo.currentCount + " veses.");
}
Tweener.addTween(gira,{rotation:359,time:.52,transition:"linear",onComplete:repete});
function repete(){
gira.rotation = 0;
Tweener.addTween(gira,{rotation:359,time:.52,transition:"linear",onComplete:repete});
}
(arquivos flash CS4);