Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Felipe Marinho

Banner de IMG

Recommended Posts

Salve Salve a todos da comunidade.

 

 

é o seguinte. eu tenho um banner em AS 2.0 com tecnologia XML de comunicação de dados. fiz um igual aqueles do americanas.com, submarino, shoptime.com, etc.

 

só que não esta funcionando. o banner todo funciona legal, só que as imagens não aparecem. não sei o pq.

 

vou por aqui o link do projeto e os codigos AS e o XML.

 

espero que me ajudem:

 

PS: O TWEEN ESTA FUNCIONANDO. ANTES DE UTILIZAR O XML ESTAVA FUNCIONANDO beleza. COLOCAVA OS END DAS IMGS FUNCIONAVA BACANA. MAIS AGORA NÃO FUNCIONA MAIS A TROCA DAS IMGS E NEM O CARREGAMENTO DAS MESMAS. MANTIVE A MESMA ESTRUTA DAS IMGS DE ANTES.

Site

 

abaixo vou mostrar uma parte da estrutura do meu site:

Imagem Postada

na marcação em vermelho é aonde esta a index.php

e o fla marcado é aonde esta o topo.swf.

 

CODIGO AS

//Cria o tempo que ira trocar os banners
onClipEvent (load) {
	var pausa = 2;
	var tempo = getTimer();
	var i = 0;
	var inicio:Boolean = true;
	var fotoLoad:Array = new Array();
	fotoLoad[0] = false;
	fotoLoad[1] = false;
	fotoLoad[2] = false;
	fotoLoad[3] = false;
	fotoLoad[4] = false;
	fotoLoad[5] = false;
	fotoLoad[6] = false;
	fotoLoad[7] = false;
	fotoLoad[8] = false;
	fotoLoad[9] = false;
	
	var produtora:Array = new Array();
	var nomeJogo:Array = new Array();
	var endereco:Array = new Array();

	// ********** [ ORDEM CRONOLOGICA DOS JOGOS ] **********
	// ********** [ 01 - VICE CITY		] **********
	// ********** [ 02 - SAN ANDREAS	] **********
	// ********** [ 03 - LINE AGE		] **********
	// ********** [ 04 - PERFECT WORD	] **********
	// ********** [ 05 - GRAND CHASE	] **********
	// ********** [ 06 - FIFA 08		] **********
	// ********** [ 07 - NFS UD2 		] **********
	// ********** [ 08 - CS 			] **********
	// ********** [ 09 - BFS 02			] **********
	// ********** [ 10 - WARCRAFT 03	] **********

	System.useCodepage = true;
	var xmlGaleria:XML = new XML();
	xmlGaleria.ignoreWhite = true;

	// Este método será executado ao fim do carregamento dos dados ou em caso de erro.
	xmlGaleria.onLoad = function($sucesso) {
		if ($sucesso) {// Em caso de sucesso 
			for(var x:Number = 0; x<=this.firstChild.firstChild.childNodes.length; x++) {
				produtora[x] = this.firstChild.firstChild.childNodes[x].attributes.produtora;
				nomeJogo[x]  = this.firstChild.firstChild.childNodes[x].attributes.jogo;
				endereco[x]  = this.firstChild.firstChild.childNodes[x].attributes.endereco;

				if (x == 0) {
					loadMovie(this.firstChild.firstChild.childNodes[x].attributes.endereco,_root.figura.mv_fotos_01); 
					_root.figura.mv_fotos_01._x = -339.1;
					_root.figura.mv_fotos_01._y = -120;
				}
				if (x == 1) { 
					loadMovie(this.firstChild.firstChild.childNodes[x].attributes.endereco,_root.figura.mv_fotos_02); 
					_root.figura.mv_fotos_02._x = -339.1;
					_root.figura.mv_fotos_02._y = -120;
				}
				if (x == 2) { 
					loadMovie(this.firstChild.firstChild.childNodes[x].attributes.endereco,_root.figura.mv_fotos_03); 
					_root.figura.mv_fotos_03._x = -339.1;
					_root.figura.mv_fotos_03._y = -120;
				}
				if (x == 3) { 
					loadMovie(this.firstChild.firstChild.childNodes[x].attributes.endereco,_root.figura.mv_fotos_04); 
					_root.figura.mv_fotos_04._x = -339.1;
					_root.figura.mv_fotos_04._y = -120;
				}
				if (x == 4) { 
					loadMovie(this.firstChild.firstChild.childNodes[x].attributes.endereco,_root.figura.mv_fotos_05); 
					_root.figura.mv_fotos_05._x = -339.1;
					_root.figura.mv_fotos_05._y = -120;
				}
				if (x == 5) { 
					loadMovie(this.firstChild.firstChild.childNodes[x].attributes.endereco,_root.figura.mv_fotos_06); 
					_root.figura.mv_fotos_06._x = -339.1;
					_root.figura.mv_fotos_06._y = -120;
				}
				if (x == 6) { 
					loadMovie(this.firstChild.firstChild.childNodes[x].attributes.endereco,_root.figura.mv_fotos_07); 
					_root.figura.mv_fotos_07._x = -339.1;
					_root.figura.mv_fotos_07._y = -120;
				}
				if (x == 7) { 
					loadMovie(this.firstChild.firstChild.childNodes[x].attributes.endereco,_root.figura.mv_fotos_08); 
					_root.figura.mv_fotos_08._x = -339.1;
					_root.figura.mv_fotos_08._y = -120;
				}
				if (x == 8) { 
					loadMovie(this.firstChild.firstChild.childNodes[x].attributes.endereco,_root.figura.mv_fotos_09); 
					_root.figura.mv_fotos_09._x = -339.1;
					_root.figura.mv_fotos_09._y = -120;
				}
				if (x == 9) { 
					loadMovie(this.firstChild.firstChild.childNodes[x].attributes.endereco,_root.figura.mv_fotos_10); 
					_root.figura.mv_fotos_10._x = -339.1;
					_root.figura.mv_fotos_10._y = -120;
				}
			}
			_root.figura.mv_fotos_01.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_02.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_03.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_04.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_05.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_06.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_07.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_08.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_09.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_10.tween("_alpha",0,0,"linear");
		}
	};
	xmlGaleria.load("galeria.xml");
}
onClipEvent (enterFrame) {
	var pos:Number = 0;
	var total:Number = 5;
	var ind:Number = 0;
	var lastRandom = -1;

	carregaFoto = function (pos) {
		if (pos == 0) {
			_root.figura.mv_fotos_01.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_01.tween("_alpha",100,2,"linear");

			_root.figura.mv_fotos_02.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_03.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_04.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_05.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_06.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_07.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_08.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_09.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_10.tween("_alpha",0,0,"linear");
		}
		if (pos == 1) {
			_root.figura.mv_fotos_02.tween("_alpha",0,0.8,"linear");
			_root.figura.mv_fotos_02.tween("_alpha",100,3,"linear");

			_root.figura.mv_fotos_01.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_03.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_04.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_05.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_06.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_07.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_08.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_09.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_10.tween("_alpha",0,0,"linear");
		}
		if (pos == 2) {
			_root.figura.mv_fotos_03.tween("_alpha",0,0.8,"linear");
			_root.figura.mv_fotos_03.tween("_alpha",100,3,"linear");

			_root.figura.mv_fotos_01.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_02.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_04.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_05.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_06.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_07.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_08.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_09.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_10.tween("_alpha",0,0,"linear");
		}
		if (pos == 3) {
			_root.figura.mv_fotos_04.tween("_alpha",0,0.8,"linear");
			_root.figura.mv_fotos_04.tween("_alpha",100,3,"linear");

			_root.figura.mv_fotos_01.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_02.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_03.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_05.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_06.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_07.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_08.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_09.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_10.tween("_alpha",0,0,"linear");
		}
		if (pos == 4) {
			_root.figura.mv_fotos_05.tween("_alpha",0,0.8,"linear");
			_root.figura.mv_fotos_05.tween("_alpha",100,3,"linear");

			_root.figura.mv_fotos_01.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_02.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_03.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_04.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_06.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_07.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_08.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_09.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_10.tween("_alpha",0,0,"linear");
		}
		if (pos == 5) {
			_root.figura.mv_fotos_06.tween("_alpha",0,0.8,"linear");
			_root.figura.mv_fotos_06.tween("_alpha",100,3,"linear");

			_root.figura.mv_fotos_01.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_02.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_03.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_04.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_05.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_07.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_08.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_09.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_10.tween("_alpha",0,0,"linear");
		}
		if (pos == 6) {
			_root.figura.mv_fotos_07.tween("_alpha",0,0.8,"linear");
			_root.figura.mv_fotos_07.tween("_alpha",100,3,"linear");

			_root.figura.mv_fotos_01.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_02.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_03.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_04.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_05.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_06.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_08.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_09.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_10.tween("_alpha",0,0,"linear");
		}
		if (pos == 7) {
			_root.figura.mv_fotos_08.tween("_alpha",0,0.8,"linear");
			_root.figura.mv_fotos_08.tween("_alpha",100,3,"linear");

			_root.figura.mv_fotos_01.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_02.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_03.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_04.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_05.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_06.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_07.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_09.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_10.tween("_alpha",0,0,"linear");
		}
		if (pos == 8) {
			_root.figura.mv_fotos_09.tween("_alpha",0,0.8,"linear");
			_root.figura.mv_fotos_09.tween("_alpha",100,3,"linear");

			_root.figura.mv_fotos_01.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_02.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_03.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_04.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_05.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_06.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_07.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_08.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_10.tween("_alpha",0,0,"linear");
		}
		if (pos == 9) {
			_root.figura.mv_fotos_10.tween("_alpha",0,0.8,"linear");
			_root.figura.mv_fotos_10.tween("_alpha",100,3,"linear");

			_root.figura.mv_fotos_01.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_02.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_03.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_04.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_05.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_06.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_07.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_08.tween("_alpha",0,0,"linear");
			_root.figura.mv_fotos_09.tween("_alpha",0,0,"linear");
		}
		_root.figura.txtCapJogo.text = nomeJogo[pos];
		_root.figura.txtCapDireitos.text = produtora[pos];
	};

	//Função que cria o random.
	function MostraSwf() {
		if (i >= 0) {
			if (i == 0) {
				carregaFoto(i);
				_root.figura.mv_barra.tween("_x",115.5,2,"linear");
				
				var altura:Number = _root.figura.mv_barra.barra_vert._height;
				_root.figura.mv_barra.barra_vert.tween("_height",0,0,"linear");
				_root.figura.mv_barra.barra_vert.tween("_height",altura,6,"linear");
				i ++;
			} 
			else if (i == 1) {
				carregaFoto(i);
				_root.figura.mv_barra.tween("_x",133.0,2,"linear");
				
				var altura:Number = _root.figura.mv_barra.barra_vert._height;
				_root.figura.mv_barra.barra_vert.tween("_height",0,0,"linear");
				_root.figura.mv_barra.barra_vert.tween("_height",altura,6,"linear");
				i ++;
			}
			else if (i == 2) {
				carregaFoto(i);
				_root.figura.mv_barra.tween("_x",150.7,2,"linear");
				
				var altura:Number = _root.figura.mv_barra.barra_vert._height;
				_root.figura.mv_barra.barra_vert.tween("_height",0,0,"linear");
				_root.figura.mv_barra.barra_vert.tween("_height",altura,6,"linear");
				i ++;
			}
			else if (i == 3) {
				carregaFoto(i);
				_root.figura.mv_barra.tween("_x",169.2,2,"linear");
				i ++;
			}
			else if (i == 4) {
				carregaFoto(i);
				_root.figura.mv_barra.tween("_x",186.7,2,"linear");
				
				var altura:Number = _root.figura.mv_barra.barra_vert._height;
				_root.figura.mv_barra.barra_vert.tween("_height",0,0,"linear");
				_root.figura.mv_barra.barra_vert.tween("_height",altura,6,"linear");
				i ++;
			}
			else if (i == 5) {
				carregaFoto(i);
				_root.figura.mv_barra.tween("_x",204.9,2,"linear");
				
				var altura:Number = _root.figura.mv_barra.barra_vert._height;
				_root.figura.mv_barra.barra_vert.tween("_height",0,0,"linear");
				_root.figura.mv_barra.barra_vert.tween("_height",altura,6,"linear");
				i ++;
			}
			else if (i == 6) {
				carregaFoto(i);
				_root.figura.mv_barra.tween("_x",222.4,2,"linear");
				
				var altura:Number = _root.figura.mv_barra.barra_vert._height;
				_root.figura.mv_barra.barra_vert.tween("_height",0,0,"linear");
				_root.figura.mv_barra.barra_vert.tween("_height",altura,6,"linear");
				i ++;
			}
			else if (i == 7) {
				carregaFoto(i);
				_root.figura.mv_barra.tween("_x",240.9,2,"linear");
				
				var altura:Number = _root.figura.mv_barra.barra_vert._height;
				_root.figura.mv_barra.barra_vert.tween("_height",0,0,"linear");
				_root.figura.mv_barra.barra_vert.tween("_height",altura,6,"linear");
				i ++;
			}
			else if (i == 8) {
				carregaFoto(i);
				_root.figura.mv_barra.tween("_x",258.4,2,"linear");
				
				var altura:Number = _root.figura.mv_barra.barra_vert._height;
				_root.figura.mv_barra.barra_vert.tween("_height",0,0,"linear");
				_root.figura.mv_barra.barra_vert.tween("_height",altura,6,"linear");
				i ++;
			}
			else if (i == 9) {
				carregaFoto(i);
				_root.figura.mv_barra.tween("_x",281.9,2,"linear");
				
				var altura:Number = _root.figura.mv_barra.barra_vert._height;
				_root.figura.mv_barra.barra_vert.tween("_height",0,0,"linear");
				_root.figura.mv_barra.barra_vert.tween("_height",altura,6,"linear");
				i = 0;
			}
		}
	}

	if (inicio == true) {
		MostraSwf();
		inicio = false;
	}
	if (tempo+(pausa*3000)<=getTimer()) {
		MostraSwf();
		var tempo = getTimer();
	}
}

CODIGO XML

<?xml version="1.0" encoding="iso-8859-1"?>
<galeria>
	<fotos>
		<foto id="0" produtora="ROCKSTAR GAMES" jogo="GTA VICE CITY" endereco="img/banner/gta_vice_city.jpg"></foto>
		<foto id="1" produtora="ROCKSTAR GAMES" jogo="GTA SAN ANDREAS" endereco="img/banner/gta_san_andreas.jpg" ></foto>
		<foto id="2" produtora="NCsoft" jogo="LINE AGE II" endereco="img/banner/line_age_2.jpg" ></foto>
		<foto id="3" produtora="Beijing Perfect World" jogo="PERFECT WORD" endereco="img/banner/perfect_word.jpg" ></foto>
		<foto id="4" produtora="Level UP" jogo="GRAND CHASE" endereco="img/banner/grand_chase.jpg" ></foto>
		<foto id="5" produtora="EA SPORTS" jogo="FIFA 2008" endereco="img/banner/fifa_2008.jpg" ></foto>
		<foto id="6" produtora="EA GAMES" jogo="NFS UNDERGROUND 02" endereco="img/banner/nfs_underground_2.jpg" ></foto>
		<foto id="7" produtora="STEAN" jogo="COUNTER STRIKE 1.6" endereco="img/banner/counter_strike.jpg" ></foto>
		<foto id="8" produtora="EA GAMES" jogo="BATTLE FILED 02" endereco="img/banner/battle_field_2.jpg" ></foto>
		<foto id="9" produtora="EIDOS" jogo="WARCRAFT III" endereco="img/banner/war_craft_03.jpg" ></foto>
	</fotos>
</galeria>

Espero que comprieendam. Qualquer duvida é só postar aqui

Compartilhar este post


Link para o post
Compartilhar em outros sites

Eu xuto que o caminho relativo usado ta errado.....

 

img/banner/fifa_2008.jpg

 

Troque por

 

blacknet-lan/img/banner/fifa_2008.jpg

 

isso se o blacknet-lan n for o dominio = public_html se for coloque só /img/banner/fifa_2008.jpg

 

Abraços

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.