Movie Controller

Klaus Major klaus at major-k.de
Fri Oct 17 18:26:20 EDT 2003


Hi Simon,

>> I had once made a movie controller for a project done in MC, but it  
>> was soooo long ago I cannot even remember which one it was done for.
>>
>> I'm looking to make a stack that can play mpg movies on mac, sgi and  
>> windows.  The controller needs to do a few things:
>>
>> 1) Display the timecode
>> 2) Play/Pause/Restart buttons
>> 3) Controller to jog through movie (but also moves as movie plays)

check this old stack of mine:

Custom Controller for Players v1.0

You find it on:

http://www.runrev.com/Revolution1/developercentral/ 
usercontributions.html

waaaaaaay down the page :-)

It will cover line 2 and 3 of your wish-list ;-)

Since it is created with custom images/graphics it will look the same  
on all platforms :-)


For line 3:
I also made a "smpte_lite" function a long time ago.
Wait a minute, i will check my archieves...

(5 looong minutes later...)

Found it! (...he said with clouds of dust floating around his head,  
hands and shoulders... :-)
Cough, cough..., will only handle minutes and seconds, but no, cough,  
frames...
Did not need this kind of "accuratèsse" ;-)

function smpte_lite dauer1,ts
   ## duration1, TimeScale
   set the numberformat to xx
   ## force a leading 0, if necessary...
   put dauer1 div 60 into minu
   put dauer1 mod 60 into seku
   return "00" & ":" & minu & ":" & seku
end smpte_lite


And this in the "start" button of the player:

on mouseUp
   if the duration of player 1 = 0 then exit mouseup
   ## No movie set yet...
   ## will also prevent "divide by 0" errors :-)

   put round(duration of player 1/the timescale of player 1) into gesamt
   put the timescale of player 1 into ts
   set the paused of player 1 to not the paused of player 1
   ## ON/OFF
   diezeit gesamt, ts
end mouseUp

on diezeit gesamt, ts ## the time :-)
   if the paused of player 1 then exit diezeit
   put round(the currenttime of player 1/ts) into jetzt ##now
   put round(gesamt - jetzt) into restzeit ## remaining time
   put "Current :" & TAB & smpte_lite(jetzt) & cr & "Remaining :" & TAB  
& smpte_lite(restzeit) into fld "zeit"
   send "diezeit" to me in 1 secs
end diezeit

You get the picture...

Hope that helps.


Regards

Klaus Major
klaus at major-k.de
www.major-k.de


P.S.
Are you the S.L. that i know somehow from my SuperCard days? :-)


More information about the metacard mailing list