#!/usr/bin/perl use strict; use warnings; use Tk::Animation; my $gif = 'C:/wamp/bin/Perl/bin/ajax_loader.gif'; my $mw = MainWindow->new; my $img = $mw->Animation( '-format' => 'gif', '-file' => $gif, ); $mw->Label('-image' => $img)->pack; my $lab = $mw->Label('-text' => "Please wait a moment while we fetch your setting information.......")->pack; $img->start_animation(100); my $start = $mw->Button(-text => 'Restart', -command => ['start_animation' => $img, 50])->pack; my $stop = $mw->Button(-text => 'Stop', -command => ['stop_animation' => $img, $lab='', $img->set_disposal_method(0)])->pack; my $pause = $mw->Button(-text => 'Pause', -command => ['pause_animation' => $img])->pack; my $resume = $mw->Button(-text => 'Resume', -command => ['resume_animation' => $img, 50])->pack; my $ff = $mw->Button(-text => '>>', -command => ['fast_forward' => $img,2])->pack; my $fr = $mw->Button(-text => '<<', -command => ['fast_reverse' => $img,-2])->pack; my $quit = $mw->Button(-text => 'Quit', -command => [destroy => $mw])->pack; $img->set_disposal_method(1); $mw->MainLoop;