> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > > # This should work for you... > use Tk; > use Win32::MultiMedia::Mci; > > my $mci; > my $mw=tkinit; > my $start = $mw->Button(-text=>'Start',-command=>\&start)->pack; > my $stop = $mw->Button(-text=>'Stop',-command=>\&stop)->pack; > MainLoop; > > sub start > { > my $midi = "/path/to/midi/file.mid"; > $mci = Win32::MultiMedia::Mci->open($midi); > $mci->seek(to=>'start'); > $mci->play; > } > > sub stop > { > $mci->stop; > } > > __END__ >
Actually - this sucks because the $mci object should not be overwritten on each button press. But with minor changes you can do what you need (i.e. you get the idea) Jack _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
