MBS Xojo Developer Conference and Training
Join us from 3rd to 6th May 2017 in Berlin, Germany.

MBS Real Studio Plugin Tutorial Videos

MovieProtection Source

Note: The function DesktopFolder is deprecated in Real Studio. You can replace it with SpecialFolder.desktop.

Class App
Inherits Application
// Constants
Const kFileQuitShortcut = Ctrl+Q
Const kFileQuit = E&xit
Const kEditClear = &Delete
End Class

Class Window1
Inherits Window
// Controls
ControlInstance
End ControlInstance
ControlInstance
Sub Action() Handles Event
dim f as FolderItem
dim b as BinaryStream
dim s as string

f=DesktopFolder.Child("TestMovie.mov")
b=f.OpenAsBinaryFile(False)
s=B.Read(b.Length)
b.Close

s=StringXORMBS(s,"hello")

f=DesktopFolder.Child("TestMovieEncoding.mov")
b=f.CreateBinaryFile("")
b.Write s
b.Close


End Sub
End ControlInstance

// Properties
Dim data As string

// Event implementations
Sub Open()
dim f as FolderItem
dim m as movie

RegisterCustomQTDataHandlerMBS "xorm","mbsP"

f=DesktopFolder.Child("TestMovieEncoding.mov")
m=OpenMovieWithCustomQTDataHandlerMBS(f, "xorm", "hello")

MoviePlayer1.movie=m

'dim f as FolderItem
'dim m as movie
'dim b as BinaryStream
'
'f=DesktopFolder.Child("TestMovieEncoding.mov")
'b=f.OpenAsBinaryFile(False)
'
'data=b.Read(b.Length)
'
'data=StringXORMBS(data,"hello")
'
'm=OpenMovieFromStringMBS(data,"TestMovieEncoding.mov","")
'
'MoviePlayer1.movie=m

End Sub
End Class


All movies




Links
MBS FileMaker Plugins