Webdings animation

Richard Suchenwirth 2007-10-04 - Here's a silly little demo, which requires that you have the Webdings font (probably Windows only). If you do, you see an animation of a small strange city with an airplane and two ambulances moving through :^) When the animation is over, you can experiment by typing capital letters, to remodel the city. Once you're satisfied, just copy and paste the strings back into the script.

WikiDbImage textanim.jpg

 #!/usr/bin/env tclsh
 package require Tk

 pack [text .t -font {Webdings 48} -width 17 -height 4]
 .t insert end [string repeat " " 30]j\n
 .t insert end ABCDEFGHIJKMPQRST\n
 .t insert end "[string repeat " " 30]h h\n"
 .t insert end ABCDEFGHIJKMPQRST\n
 update
 after 500
 for {set i 0} {$i <= 64} {incr i} {
    if {$i<31} {.t delete 1.0}
    if {$i%2==0} {.t delete 3.0}
    update
    after 300
 }
 bind . <Escape> {exec wish $argv0 &; exit}

NEM: Works on MacOS X too!


Category Toys | Category Example | Category Animation