[Gambas-user] is possible to "inglobe" data (audio, video, etc) into gambas code?

Benoît Minisini benoit.minisini at gambas-basic.org
Tue Sep 19 20:56:12 CEST 2023


Le 19/09/2023 à 20:41, Bruce Steers a écrit :
> aah yes so you would want code something like this if you have a 
> clip.mp3 file in a folder called sounds in the project dir...
> 
> Public sClipFile As String = "./sounds/clip.mp3"
> 
> Public Sub Form_Load()
> 
>   PlayInternalMusic(sClipFile)
> 
> End
> 
> Public Sub PlayInternalMusic(sFile As String)
> 
>    Dim sTempName As String = File.Dir(Temp()) &/ File.Name(sFile)
> 
>    If Not Exist(sTempName) Then Copy sFile To sTempName
>    Music.Load(sTempName)
>    Music.Play()
> 
> End
> 
> Respects
> BruceS
> 

No, as it is done automatically by the interpreter.

-- 
Benoît Minisini.



More information about the User mailing list