Código
Using perl Syntax Highlighting
- use Tk;
- use Tk::Animation;
- my $mw = MainWindow->new;
- $mw->title("Animated GIF");
- my @gif_files = "tigre.gif";
- my $animate = $mw->Animation;
- for (@gif_files) {
- $animate->add_frame(
- $mw->Photo( -file => $_ )
- );
- }
- $animate->set_image(0);
- my $lab = $mw->Label( -image => $animate )->grid;
- my $start = $mw->Button(
- -text => 'Start',
- -command => [ $animate => 'start_animation', 500 ]
- )->grid;
- my $stop = $mw->Button(
- -text => 'Stop',
- -command => [ $animate => 'stop_animation' ]
- )->grid;
- MainLoop;
Coloreado en 0.003 segundos, usando GeSHi 1.0.8.4
¿Alguien me puede ayudar?