Ir para conteúdo

Arquivado

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

Dieguinhu Web

Exibir dados ASP no Flash

Recommended Posts

lista_conteudo.asp

 

<!--#include file="conexao.asp" --><%

cod = request.QueryString("cod")

SQL = "SELECT  * FROM tbl_conteudo_estado WHERE cod = " & cod
Set pesquisa = conexao.Execute(SQL)
%>
<?xml version="1.0" encoding="iso-8859-1"?>
<blog>
	<%
	response.Buffer
	do while not pesquisa.eof %><titulo link="texto_conteudo.asp?codigo=<%=pesquisa("cod")%>" legenda="<%=pesquisa("titulo")%>" cidade="<%=pesquisa("cidade")%>"><%=pesquisa("titulo")%></titulo><%
	pesquisa.movenext : loop
	response.Flush()
	%>
</blog>

 

o arquivo foi transformado em XML estou fazendo já uma pesquisa que retorna valores e gostaria de puxar as imagens em um movie clip teria como?

 

segue a action no flash

 

function loadTitulos(url)
{
	var _loc1 = new XML();
	_loc1.ignoreWhite = true;
	_loc1.load(url);
	_loc1.onLoad = getTitulos;
} // End of the function
function getTitulos(ok)
{
	var _loc3 = this.firstChild.childNodes;
	var _loc7 = [];
	var _loc2 = 0;
	var _loc8 = _loc3.length;
	tituloGrande.text = _loc3[0].attributes.cidade;
	while (_loc2 < _loc8)
	{
		_loc7.push({label: _loc3[_loc2].childNodes, data: _loc3[_loc2].attributes.data, url: _loc3[_loc2].attributes.link});
		++_loc2;
	} // end while
	tit_list.dataProvider = _loc7;
} // End of the function
function loadPost(url)
{
	var _loc1 = new XML();
	_loc1.ignoreWhite = true;
	_loc1.load(url);
	_loc1.onLoad = getPost;
} // End of the function
function getPost(ok)
{
	if (ok)
	{
		txtPost.text = "<b>" + tit_list.selectedItem.label + "</b><br>";
		txtPost.text = txtPost.text + this.lastChild.childNodes[0].nodeValue;
		fotoTeste.text = this.firstChild.childNodes[0].attributes.foto;
		fotoslink = xmlNodes[i].lastChild.lastChild.nextSibling;
		fotosss.text = fotoslink.attributes.foto;
		if (fotoslink == "sim")
		{
			mcfoto.gotoAndStop("sim");
		}
		else
		{
			mcfoto.gotoAndStop("nao");
		} // end else if
	}
	else
	{
		txtPost.text = "Erro ao carregar a notícia. Tente novamente";
	} // end else if
} // End of the function
function loadAllPosts()
{
	var dados = tit_list.dataProvider;
	var _loc3 = 0;
	var _loc4 = dados.length;
	while (_loc3 < _loc4)
	{
		var _loc2 = this["xPost" + _loc3];
		_loc2 = new XML();
		_loc2.ignoreWhite = true;
		_loc2.id = _loc3;
		_loc2.load(dados[_loc3].url);
		_loc2.onLoad = function ()
		{
			if (this.id == 0)
			{
				txtPost.text = "";
			} // end if
			txtPost.text = txtPost.text + ("<b>" + dados[this.id].label + "  -  " + dados[this.id].data + "</b><br><br>");
			txtPost.text = txtPost.text + this.firstChild.childNodes[0].nodeValue;
			txtPost.text = txtPost.text + "<br>----------------------------------------------------------<br><br>";
		};
		++_loc3;
	} // end while
} // End of the function
stop ();
tit_list.changeHandler = function ()
{
	txtPost.text = "O roteiro está sendo carregada. Aguarde...";
	loadPost(this.selectedItem.url);
};
tudo_btn.clickHandler = function ()
{
	txtPost.text = "Carregando todas as notícias...";
	loadAllPosts();
};
loadTitulos("lista_conteudo.asp?cod=" + codigo);

Compartilhar este post


Link para o post
Compartilhar em outros sites

Nesse tópico tem algumas referências... se ajudar... http://www.imasters.com.br/artigo/3156

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.