You are not logged in.

luismator

Beginner

  • "luismator" started this thread

Posts: 2

Date of registration: Dec 3rd 2012

  • Send private message

1

Monday, December 3rd 2012, 4:11pm

Play WAV file on Applet

Hi,



I am not an expert in software programming, but I have found jabaco very useful for my little projets.

Let me show you how I did to play wav sound files on my jabaco applet (jar file)



1- Import (press F1) \Java\jdk1.7.0_09\jre\lib\rt.jar > java > io (I am not sure but I think it was this one)



2- Add your wav file (example "ding.wav") as a resource to the project (screen top right PROJECT > ADD FILE > RESOURCE)



3- In your code (let say in a button) add this code:



In Module1 declare these variables

Public sonido_resource As IResource
Public sonido As Clip




Public Sub Command1_Click()
sonido_resource = DingWav
sonido=GetWavResClip(sonido_resource)
sonido.start
End Sub

Rate this thread
WoltLab Burning Board