Dkid Posted April 23, 2006 at 03:08 PM Report #23786 Posted April 23, 2006 at 03:08 PM 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
NCS_One Posted April 23, 2006 at 05:43 PM Report #23805 Posted April 23, 2006 at 05:43 PM 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.
Dkid Posted April 23, 2006 at 06:11 PM Author Report #23811 Posted April 23, 2006 at 06:11 PM 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
Dkid Posted April 23, 2006 at 07:28 PM Author Report #23830 Posted April 23, 2006 at 07:28 PM 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
TheDark Posted April 26, 2006 at 12:40 AM Report #24364 Posted April 26, 2006 at 12:40 AM 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.
Dkid Posted April 27, 2006 at 06:44 PM Author Report #24662 Posted April 27, 2006 at 06:44 PM 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
Recommended Posts