GFXVoid Graphic Design Forum

Remove Text Formatting
Loading...

» Online Users: 7,906

0 members and 7,906 guests
No Members online

» Site Navigation

 > FAQ

» Stats

Members: 35,442
Threads: 103,075
Posts: 826,688
Top Poster: cc.RadillacVIII (7,429)
Welcome to our newest member, Lekelindids
Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Matrix Text

  1. #1

    Default

    Insert the following in the <HEAD> portion of your page:

    Code:
    &#60;style type=&#34;text/css&#34;&#62;
    .matrix { font-family&#58;Lucida Console, Courier, Monotype; font-size&#58;10pt; text-align&#58;center; width&#58;10px; padding&#58;0px; margin&#58;0px;}
    &#60;/style&#62;
    
    &#60;script type=&#34;text/javascript&#34; language=&#34;JavaScript&#34;&#62;
    
    &#60;&#33;--
    var rows=11; // must be an odd number
    var speed=50; // lower is faster
    var reveal=2; // between 0 and 2 only. The higher, the faster the word appears
    var effectalign=&#34;default&#34; //enter &#34;center&#34; to center it.
    
    var w3c=document.getElementById && &#33;window.opera;;
    var ie45=document.all && &#33;window.opera;
    var ma_tab, matemp, ma_bod, ma_row, x, y, columns, ma_txt, ma_cho;
    var m_coch=new Array&#40;&#41;;
    var m_copo=new Array&#40;&#41;;
    window.onload=function&#40;&#41; {
    	if &#40;&#33;w3c && &#33;ie45&#41; return
     *var matrix=&#40;w3c&#41;?document.getElementById&#40;&#34;matrix&#34;&#41;&#58;document.all&#91;&#34;matrix&#34;&#93;;
     *ma_txt=&#40;w3c&#41;?matrix.firstChild.nodeValue&#58;matrix.innerHTML;
     *ma_txt=&#34; &#34;+ma_txt+&#34; &#34;;
     *columns=ma_txt.length;
     *if &#40;w3c&#41; {
     * *while &#40;matrix.childNodes.length&#41; matrix.removeChild&#40;matrix.childNodes&#91;0&#93;&#41;;
     * *ma_tab=document.createElement&#40;&#34;table&#34;&#41;;
     * *ma_tab.setAttribute&#40;&#34;border&#34;, 0&#41;;
     * *ma_tab.setAttribute&#40;&#34;align&#34;, effectalign&#41;;
     * *ma_tab.style.backgroundColor=&#34;#000000&#34;;
     * *ma_bod=document.createElement&#40;&#34;tbody&#34;&#41;;
     * *for &#40;x=0; x&#60;rows; x++&#41; {
     * * *ma_row=document.createElement&#40;&#34;tr&#34;&#41;;
     * * *for &#40;y=0; y&#60;columns; y++&#41; {
     * * * *matemp=document.createElement&#40;&#34;td&#34;&#41;;
     * * * *matemp.setAttribute&#40;&#34;id&#34;, &#34;Mx&#34;+x+&#34;y&#34;+y&#41;;
     * * * *matemp.className=&#34;matrix&#34;;
     * * * *matemp.appendChild&#40;document.createTextNode&#40;String.fromCharCode&#40;160&#41;&#41;&#41;;
     * * * *ma_row.appendChild&#40;matemp&#41;;
     * * *}
     * * *ma_bod.appendChild&#40;ma_row&#41;;
     * *}
     * *ma_tab.appendChild&#40;ma_bod&#41;;
     * *matrix.appendChild&#40;ma_tab&#41;;
     *} else {
     * *ma_tab=&#39;&#60;ta&#39;+&#39;ble align=&#34;&#39;+effectalign+&#39;&#34; border=&#34;0&#34; style=&#34;background-color&#58;#000000&#34;&#62;&#39;;
     * *for &#40;var x=0; x&#60;rows; x++&#41; {
     * * *ma_tab+=&#39;&#60;t&#39;+&#39;r&#62;&#39;;
     * * *for &#40;var y=0; y&#60;columns; y++&#41; {
     * * * *ma_tab+=&#39;&#60;t&#39;+&#39;d class=&#34;matrix&#34; id=&#34;Mx&#39;+x+&#39;y&#39;+y+&#39;&#34;&#62;&#60;/&#39;+&#39;td&#62;&#39;;
     * * *}
     * * *ma_tab+=&#39;&#60;/&#39;+&#39;tr&#62;&#39;;
     * *}
     * *ma_tab+=&#39;&#60;/&#39;+&#39;table&#62;&#39;;
     * *matrix.innerHTML=ma_tab;
     *}
     *ma_cho=ma_txt;
     *for &#40;x=0; x&#60;columns; x++&#41; {
     * *ma_cho+=String.fromCharCode&#40;32+Math.floor&#40;Math.random&#40;&#41;*94&#41;&#41;;
     * *m_copo&#91;x&#93;=0;
     *}
     *ma_bod=setInterval&#40;&#34;mytricks&#40;&#41;&#34;, speed&#41;;
    }
    
    function mytricks&#40;&#41; {
     *x=0;
     *for &#40;y=0; y&#60;columns; y++&#41; {
     * *x=x+&#40;m_copo&#91;y&#93;==100&#41;;
     * *ma_row=m_copo&#91;y&#93;%100;
     * *if &#40;ma_row && m_copo&#91;y&#93;&#60;100&#41; {
     * * *if &#40;ma_row&#60;rows+1&#41; {
     * * * *if &#40;w3c&#41; {
     * * * * *matemp=document.getElementById&#40;&#34;Mx&#34;+&#40;ma_row-1&#41;+&#34;y&#34;+y&#41;;
     * * * * *matemp.firstChild.nodeValue=m_coch&#91;y&#93;;
     * * * *}
     * * * *else {
     * * * * *matemp=document.all&#91;&#34;Mx&#34;+&#40;ma_row-1&#41;+&#34;y&#34;+y&#93;;
     * * * * *matemp.innerHTML=m_coch&#91;y&#93;;
     * * * *}
     * * * *matemp.style.color=&#34;#33ff66&#34;;
     * * * *matemp.style.fontWeight=&#34;bold&#34;;
     * * *}
     * * *if &#40;ma_row&#62;1 && ma_row&#60;rows+2&#41; {
     * * * *matemp=&#40;w3c&#41;?document.getElementById&#40;&#34;Mx&#34;+&#40;ma_row-2&#41;+&#34;y&#34;+y&#41;&#58;document.all&#91;&#34;Mx&#34;+&#40;ma_row-2&#41;+&#34;y&#34;+y&#93;;
     * * * *matemp.style.fontWeight=&#34;normal&#34;;
     * * * *matemp.style.color=&#34;#00ff00&#34;;
     * * *}
     * * *if &#40;ma_row&#62;2&#41; {
     * * * * *matemp=&#40;w3c&#41;?document.getElementById&#40;&#34;Mx&#34;+&#40;ma_row-3&#41;+&#34;y&#34;+y&#41;&#58;document.all&#91;&#34;Mx&#34;+&#40;ma_row-3&#41;+&#34;y&#34;+y&#93;;
     * * * *matemp.style.color=&#34;#009900&#34;;
     * * *}
     * * *if &#40;ma_row&#60;Math.floor&#40;rows/2&#41;+1&#41; m_copo&#91;y&#93;++;
     * * *else if &#40;ma_row==Math.floor&#40;rows/2&#41;+1 && m_coch&#91;y&#93;==ma_txt.charAt&#40;y&#41;&#41; zoomer&#40;y&#41;;
     * * *else if &#40;ma_row&#60;rows+2&#41; m_copo&#91;y&#93;++;
     * * *else if &#40;m_copo&#91;y&#93;&#60;100&#41; m_copo&#91;y&#93;=0;
     * *}
     * *else if &#40;Math.random&#40;&#41;&#62;0.9 && m_copo&#91;y&#93;&#60;100&#41; {
     * * *m_coch&#91;y&#93;=ma_cho.charAt&#40;Math.floor&#40;Math.random&#40;&#41;*ma_cho.length&#41;&#41;;
     * * *m_copo&#91;y&#93;++;
     * *}
     *}
     *if &#40;x==columns&#41; clearInterval&#40;ma_bod&#41;;
    }
    
    function zoomer&#40;ycol&#41; {
     *var mtmp, mtem, ytmp;
     *if &#40;m_copo&#91;ycol&#93;==Math.floor&#40;rows/2&#41;+1&#41; {
     * *for &#40;ytmp=0; ytmp&#60;rows; ytmp++&#41; {
     * * *if &#40;w3c&#41; {
     * * * *mtmp=document.getElementById&#40;&#34;Mx&#34;+ytmp+&#34;y&#34;+ycol&#41;;
     * * * *mtmp.firstChild.nodeValue=m_coch&#91;ycol&#93;;
     * * *}
     * * *else {
     * * * *mtmp=document.all&#91;&#34;Mx&#34;+ytmp+&#34;y&#34;+ycol&#93;;
     * * * *mtmp.innerHTML=m_coch&#91;ycol&#93;;
     * * *}
     * * *mtmp.style.color=&#34;#33ff66&#34;;
     * * *mtmp.style.fontWeight=&#34;bold&#34;;
     * *}
     * *if &#40;Math.random&#40;&#41;&#60;reveal&#41; {
     * * *mtmp=ma_cho.indexOf&#40;ma_txt.charAt&#40;ycol&#41;&#41;;
     * * *ma_cho=ma_cho.substring&#40;0, mtmp&#41;+ma_cho.substring&#40;mtmp+1, ma_cho.length&#41;;
     * *}
     * *if &#40;Math.random&#40;&#41;&#60;reveal-1&#41; ma_cho=ma_cho.substring&#40;0, ma_cho.length-1&#41;;
     * *m_copo&#91;ycol&#93;+=199;
     * *setTimeout&#40;&#34;zoomer&#40;&#34;+ycol+&#34;&#41;&#34;, speed&#41;;
     *}
     *else if &#40;m_copo&#91;ycol&#93;&#62;200&#41; {
     * *if &#40;w3c&#41; {
     * * *mtmp=document.getElementById&#40;&#34;Mx&#34;+&#40;m_copo&#91;ycol&#93;-201&#41;+&#34;y&#34;+ycol&#41;;
     * * *mtem=document.getElementById&#40;&#34;Mx&#34;+&#40;200+rows-m_copo&#91;ycol&#93;--&#41;+&#34;y&#34;+ycol&#41;;
     * *}
     * *else {
     * * *mtmp=document.all&#91;&#34;Mx&#34;+&#40;m_copo&#91;ycol&#93;-201&#41;+&#34;y&#34;+ycol&#93;;
     * * *mtem=document.all&#91;&#34;Mx&#34;+&#40;200+rows-m_copo&#91;ycol&#93;--&#41;+&#34;y&#34;+ycol&#93;;
     * *}
     * *mtmp.style.fontWeight=&#34;normal&#34;;
     * *mtem.style.fontWeight=&#34;normal&#34;;
     * *setTimeout&#40;&#34;zoomer&#40;&#34;+ycol+&#34;&#41;&#34;, speed&#41;;
     *}
     *else if &#40;m_copo&#91;ycol&#93;==200&#41; m_copo&#91;ycol&#93;=100+Math.floor&#40;rows/2&#41;;
     *if &#40;m_copo&#91;ycol&#93;&#62;100 && m_copo&#91;ycol&#93;&#60;200&#41; {
     * *if &#40;w3c&#41; {
     * * *mtmp=document.getElementById&#40;&#34;Mx&#34;+&#40;m_copo&#91;ycol&#93;-101&#41;+&#34;y&#34;+ycol&#41;;
     * * *mtmp.firstChild.nodeValue=String.fromCharCode&#40;160&#41;;
     * * *mtem=document.getElementById&#40;&#34;Mx&#34;+&#40;100+rows-m_copo&#91;ycol&#93;--&#41;+&#34;y&#34;+ycol&#41;;
     * * *mtem.firstChild.nodeValue=String.fromCharCode&#40;160&#41;;
     * *}
     * *else {
     * * *mtmp=document.all&#91;&#34;Mx&#34;+&#40;m_copo&#91;ycol&#93;-101&#41;+&#34;y&#34;+ycol&#93;;
     * * *mtmp.innerHTML=String.fromCharCode&#40;160&#41;;
     * * *mtem=document.all&#91;&#34;Mx&#34;+&#40;100+rows-m_copo&#91;ycol&#93;--&#41;+&#34;y&#34;+ycol&#93;;
     * * *mtem.innerHTML=String.fromCharCode&#40;160&#41;;
     * *}
     * *setTimeout&#40;&#34;zoomer&#40;&#34;+ycol+&#34;&#41;&#34;, speed&#41;;
     *}
    }
    // --&#62;
    &#60;/script&#62;
    Then insert the following wherever you want the text to appear:

    Code:
    &#60;div id=&#34;matrix&#34;&#62;GFXVoid&#60;/div&#62;
    I trust you can find out what to change for the variables :-)

  2. #2
    Join Date
    Feb 2005
    Location
    va
    Posts
    29

    Default

    although people probly know what this one displays i would still link to an example so we can see it

  3. #3
    Join Date
    Feb 2005
    Location
    Västerås, Sweden
    Posts
    20

    Default

    Very cool&#33;

  4. #4
    Join Date
    Jan 2005
    Posts
    377

  5. #5
    Join Date
    Feb 2005
    Location
    va
    Posts
    29

    Default

    ok i thought it was something like that thanks for the test page pbguy 434

  6. #6
    Join Date
    Jan 2005
    Posts
    377

    Default

    No problem. Glad I could help.

  7. #7

    Default

    sry bout not adding a example, but i figure if people really want a matrix effect they won&#39;t be too lazy to try this out :P

  8. #8
    Join Date
    Feb 2005
    Location
    va
    Posts
    29

    Default

    that is true i am just thinking like i always do want to be absolutly sure of what i am using before i usse to make sure i like it=)

  9. #9

    Default

    Originally posted by pbguy434@Feb 27 2005, 03:13 PM
    Really cool affect.

    http://free.angeltowns.com/pbguy434/testorz.html
    [snapback]11270[/snapback]

    That is f--kin awesome. HOLY SHIT&#33;&#33;&#33;&#33;&#33;&#33; WOOT&#33; Damn thats cool. That is why I <3 CSS.

  10. #10
    Join Date
    Feb 2005
    Location
    va
    Posts
    29

    Default

    excuse me i don&#39;t undestand much l33t speach what does <3 mean?

Similar Threads

  1. Matrix Sig
    By DevilWithIn in forum Sigs & Manips
    Replies: 4
    Last Post: 11-05-2006, 06:33 PM
  2. Animated Matrix Text
    By Brian in forum Other Tutorials
    Replies: 15
    Last Post: 06-10-2006, 08:09 PM
  3. Matrix Man? CnC :)
    By Umbee in forum Sigs & Manips
    Replies: 3
    Last Post: 09-23-2005, 11:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBadvanced CMPS v4.1.1