1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#!/usr/local/bin/perl -w
use Tk;
use lib './blib/lib'; use Tk::Splashscreen;
use Tk::widgets qw/Photo Animation/;
use strict;
my $mw = MainWindow->new;
$mw->withdraw;
$mw->Button(-text => 'Quit', -command => \&exit)->pack;
my $splash = $mw->Splashscreen(-milliseconds => 5000);
my $animate;
my $gif89 = Tk->findINC('anim.gif');
$animate = $splash->Animation(-format => 'gif', -file => $gif89);
$splash->Label(-image => $animate)->pack;
$animate->set_image(0);
$animate->start_animation(500);
$splash->Splash; # show Splashscreen
$mw->after(1000);
$| = 1;
print STDOUT "Waiting for Splashscreen to finish ...\n";
$splash->Destroy; # tear down Splashscreen
$mw->deiconify; # show calculator
MainLoop;
|