mikasue has asked for the wisdom of the Perl Monks concerning the following question:
Error i'm gettingsub PlayAnimation{ my $animation_toplevel = $main::mw->Toplevel; my $img1 = $animation_toplevel->Photo(-file=>$Bin."/MMD/images/spinnin +gpenny.gif"); my $img = $animation_toplevel->Animation(-format => 'gif', -file =>$im +g1)->start_animation(10); my $anibut = $animation_toplevel->Button(-image=>$img, -command=>sub{p +rint"You pressed me!";})->pack; }
Tk::Error: Cannot open 'image3' in mode 'r' at C:/Perl/lib/Tk/Image.pm + line 21. Tk callback for .toplevel1 Tk callback for image Tk::Image::new at C:/Perl/lib/Tk/Image.pm line 21 Tk::Animation::new at C:/Perl/lib/Tk/Animation.pm line 26 Tk::Widget::__ANON__ at C:/Perl/lib/Tk/Widget.pm line 256 MMD::PROGRAMDEFAULTS::PlayAnimation at C:/Documents and Settings/Owne +r/My Docum ents/pianokeys/MMD/PROGRAMDEFAULTS.pm line 105 main::__ANON__ at pianokeysprogram.pl line 74 Tk callback for .toplevel.canvas.button Tk::__ANON__ at C:/Perl/lib/Tk.pm line 252 Tk::Button::butUp at C:/Perl/lib/Tk/Button.pm line 111 <ButtonRelease-1> (command bound to event)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HELP! Tk::Error using Tk::Animation
by eserte (Deacon) on Dec 29, 2007 at 09:43 UTC | |
|
Re: HELP! Tk::Error using Tk::Animation
by zentara (Cardinal) on Dec 30, 2007 at 16:42 UTC |