Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Can anyone help me improve upon this... Keep it simple if you can please...

use diagnostics; use strict; use Tk; my $colour = "black"; # title my $main = MainWindow->new(-title => "Matrix...", -bg => $colour,); # size of window $main->minsize(qw(422 200)); $main->maxsize(qw(422 200)); # icon in the top left corner of the window (system menu icon) my $file4o = "C:\\Perl\\tk\\prog2\\matx.gif"; # around 32x32 GIF or BM +P # add you own path ?!? Transparancy in gif not working for me ???? $main->idletasks; # necessary ! my $icon4options = $main->Photo(-file => $file4o); $main->iconimage($icon4options); # left side my $leftframe=$main->Frame(-bg => $colour,)->pack(-side=>'left', -fill +=>'y'); # $main Vs $leftframe my $matrix_textbox = $main->Text(-width => "2", -background => $colour +, -font => "-*-Matrix Code NFI-*-*-*--*-200-*", # hash out if y +ou don't have the font -foreground => "lightgreen", -wrap => "none", -relief => 'flat',)->pac +k(-side => 'right', -fill => 'y'); # A matric font can be found at http://www.1001fonts.com/font_details. +html?font_id=2555 my $matrix_textbox2 = $main->Text(-width => "2", -background => $colou +r, -font => "-*-Matrix Code NFI-*-*-*--*-200-*", # hash out if + you don't have the font -foreground => "lightgreen", -wrap => "none", -relief => 'flat',)->pac +k(-side => 'right', -fill => 'y'); # A matric font can be found at http://www.1001fonts.com/font_details. +html?font_id=2555 my $matrix_textbox3 = $main->Text(-width => "2", -background => $colou +r, -font => "-*-Matrix Code NFI-*-*-*--*-200-*", # hash out if +you don't have the font -foreground => "lightgreen", -wrap => "none", -relief => 'flat',)->pac +k(-side => 'right', -fill => 'y'); # A matric font can be found at http://www.1001fonts.com/font_details. +html?font_id=2555 my $a =("a\n"); my $b =("b\n"); my $c =("c\n"); my $d =("d\n"); my $e =("e\n"); my $f =("f\n"); my $g =("g\n"); my $H =("H\n"); my $i =("i\n"); my $j =("j\n"); my $l =("l\n"); my $n =("n\n"); my $o =("o\n"); my $r =("r\n"); my $s =("s\n"); my $hip =("\,\n"); my $w =("w\n"); my $y =("y\n"); my $space =("\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); my $onegap =(" \n"); sub five{ my @letters =($d, $l, $r, $o, $w, $onegap, $o, $l, $l, $e, $H, $space) +; my @letters2 =($n, $i, $a, $g, $a, $onegap, $o, $l, $l, $e, $H, $space +); my @letters3 =($onegap, $onegap, $onegap, $y, $o, $b, $onegap, $d, $a, + $b, $onegap, $onegap, $onegap, $onegap, $space); $matrix_textbox->Contents(@letters, @letters, @letters); $matrix_textbox2->Contents(@letters2, @letters2, @letters2); $matrix_textbox3->Contents(@letters3, @letters3, @letters3); $matrix_textbox->configure(-state => 'disabled',); $matrix_textbox2->configure(-state => 'disabled',); $matrix_textbox3->configure(-state => 'disabled',); $matrix_textbox->yviewScroll( 37,'units'); $matrix_textbox2->yviewScroll( 67,'units'); $matrix_textbox3->yviewScroll( 27,'units'); my $max = 27; # run through the below 27 times for (my $i=1; $i <= $max; $i++) { $matrix_textbox->yviewScroll( -1,'units'); $matrix_textbox2->yviewScroll( -2,'units'); $matrix_textbox3->yviewScroll( -1,'units'); $main->update; use Time::HiRes; Time::HiRes::sleep (.1 # ); } } ## repeat the above until I change $repeat to anything other than 0 ?? +?? my $repeat = 0; while ($repeat =~ /0/) {five;} # # Bits I'm after: # # To add a trailling and/or first/**** character brighter effect ??? # as of $matrix_textbox->configure(-foreground => "green",); only for +first/**** character of each @letters... ???? # sound effect ??? # disable the right click on scrolling text's popup. It's cursor chang +e too. # # crack pic over text (transparent gif over text) MainLoop;

READMORE tags added by Arunbear


In reply to Matrix falling text effect by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2022-01-26 14:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (69 votes). Check out past polls.

    Notices?