Jump to content

Recommended Posts

Posted

Oi pessoal, o problema foi resolvido

Abaixo o codigo pretendido

<html>
<head>
<title>MATRIX TEXT!</title>
<script language="javascript">
function addC()
{
	if(x < string.length)
{
	textBuffer += string.charAt(x);

	dot = string.charAt(x);	  //Sets variable dot for checking



	txt.innerHTML = textBuffer;
	x++;
	setTimeout('addC()', pause);
}

if (x == string.length)
{
	setTimeout('reLoc()', (pause * 7)) // Send viewer to home page with pause to read text.
}

}

function reLoc()
{

}


</script>

</head>

<body bgcolor=#000000>


<font color="green">
<span id="text">TEXTO AKI</span>
</font>

<script language="javascript">

pause = 50;

if (document.getElementById)
{

txt = document.getElementById("text");

if(txt.innerHTML)
{
	textBuffer = " "; // Stops the loss of Spaces

	x = 0;
	string = txt.innerHTML;
	txt.innerHTML = " ";
	addC();
}
}

</script>

I promise that I will not change the PATH variable again other than:PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

Posted

Ois

Em vez de tu andares a percorrer a String com um "for" fazes um "Replace", isto eh fazes um "Replace" de "." por ".\n"

onde o simbolo "\n" eh para mudar de linha, aqui vai :

<html>
<head>
<title>Teste4</title>
<script language="JavaScript">
function HandleString(Str)
{
   Str = Str.replace(/\./g,'.\n');
   Div1.innerText = Str;
}
</script>
</head>
<body>
<div id="Div1"></div>
<input type="button" value="Click" onclick="HandleString('aaa.bbb.ccc.')" />
</body>
</html>

Espero ter ajudado.

Se a vida te voltar as costas aproveita e apalpa-lhe o cu.

Posted

bem axo que ajudas-te, mas axo que n era bem isso que eu queria, tipo eu quero manter aquele efeito de texto a aparecer, mas depois nao quero que ele desapareca, entendes ?

I promise that I will not change the PATH variable again other than:PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

Posted

pessoal secalhar este codigo todo ta-vos a fazer confusao... o objectivo é ter o texto a aparecer, dando um ar de tar a ser escrito sozinho... tao a entender ?

I promise that I will not change the PATH variable again other than:PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

Posted

Subtitui ali no if:

	if (dot == ".")           //Check for full stops in text
	{				//If there is a full stop it
		textBuffer+="<br>";	//starts a clean page
	}

Isto se quiseres que o ponto apareça. Se quiseres que o ponto seja substituído é preciso fazer mais algumas alterações.

Deixei os comentários para ser mais fácil localizar o que tem que ser substituído. Agora já não fazem muito sentido :😛

Desaparecido.

Posted

Subtitui ali no if:

	if (dot == ".")           //Check for full stops in text
	{				//If there is a full stop it
		textBuffer+="<br>";	//starts a clean page
	}

Isto se quiseres que o ponto apareça. Se quiseres que o ponto seja substituído é preciso fazer mais algumas alterações.

Deixei os comentários para ser mais fácil localizar o que tem que ser substituído. Agora já não fazem muito sentido :😛

Oi, obrigado pela vossa ajuda, mas encontrei o resultado, agora ficou como eu queria.... ver no primeiro post....

I promise that I will not change the PATH variable again other than:PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.