narayan.1979 has asked for the wisdom of the Perl Monks concerning the following question:
use Tk; use Tk::Animation; my $mw = MainWindow->new; $mw->title("Hello World"); $mw->Photo('C:/Documents and Settings/narayang/Desktop/progress.gif', +-file => 'C:/Documents and Settings/narayang/Desktop/progress.gif'); my $animate; if (@ARGV) { $animate = $mw->Animation; foreach (@ARGV) { $animate->add_frame($mw->Photo(-file => $_)); } } else { } my $gif89 = Tk->findINC('Gouraud_low_anim.gif'); $animate = $mw->Animation(-format => 'gif', -file => 'C:/Documents and + Settings/narayang/Desktop/progress.gif'); $animate->set_image(0); my $lab = $mw->Label(-text => "asd",-image => $animate)->pack; my $start = $mw->Button( -text => 'Start', -command => [$animate => 'start_animation', 100])->pack; my $stop = $mw->Button( -text => 'Stop', -command => [$animate => 'stop_animation'])->pack; MainLoop; 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Animation using Tkx
by Kirsle (Pilgrim) on Nov 27, 2009 at 21:39 UTC |