http://www.perlmonks.org?node_id=535937

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

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