C Cecil New Member Licensed User Longtime User Jul 2, 2014 #1 Hello! I've had an interesting idea and I need to implement this but don't know if it is possible to do. Basically what I need is make the program play a sound only when the screen is touched (for example, in a drawing manner), and when I release my finger the sound has to stop even if it doesn't have finished yet. I was trying with something like this... Code: Copy Sub Panel2_Touch (Action As Int, X As Float, Y As Float) SignatureCapture.Panel_Touch(SD,X,Y,Action) MP.Play End Sub ...but obviously it doesn't stops when I release Help!
Hello! I've had an interesting idea and I need to implement this but don't know if it is possible to do. Basically what I need is make the program play a sound only when the screen is touched (for example, in a drawing manner), and when I release my finger the sound has to stop even if it doesn't have finished yet. I was trying with something like this... Code: Copy Sub Panel2_Touch (Action As Int, X As Float, Y As Float) SignatureCapture.Panel_Touch(SD,X,Y,Action) MP.Play End Sub ...but obviously it doesn't stops when I release Help!
Erel B4X founder Staff member Licensed User Longtime User Jul 2, 2014 #2 Code: Copy If Action = Activity.ACTION_DOWN Then mp.Play Else If Action = Activity.ACTION_UP Then mp.Stop End If Upvote 0
Code: Copy If Action = Activity.ACTION_DOWN Then mp.Play Else If Action = Activity.ACTION_UP Then mp.Stop End If