Are they supposed to work on a browser? The only touch screen I have is on an iPhone (12 mini, latest os).
The ExamineTouchScreen() function does return true, but the TouchY() and TouchDeltaY() always return 0.
Touch screen commands on Safari Browser
Re: Touch screen commands on Safari Browser
Do you have some sort of example code, we can use for testing?
Maybe the code is missing something. If not, we'll be able to do further investigations. I'm sure the commands are supposed to work.
Maybe the code is missing something. If not, we'll be able to do further investigations. I'm sure the commands are supposed to work.
-
- Posts: 2
- Joined: Thu Nov 10, 2022 10:38 pm
Re: Touch screen commands on Safari Browser
I tried to dummy up something and the results were odd. I'm not sure it has anything to do with spiderbasic. I added some code like this:
and the procedure is:
What is completely confusing is that if I run either the debug or fully compiled html/js I see the title bar and the timer number ($5000) and one zero which is correct because I don't have any touch devices on my desktop. But when I put this code on the aws bucket, the timer never fires at all, so the title bar never changes. I don't have another way to test it right now, but should at some point.
thanks
// Added Code-Tags (Peter)
Code: Select all
#TouchTimer = $5000
After creating the window:
AddWindowTimer(Window_0,#TouchTimer,100)
BindEvent(#PB_Event_Timer, @TimerEvents())
Code: Select all
Procedure TimerEvents()
Define finger
Define a$
If ExamineTouchScreen()
For finger = 0 To 4
a$ = a$ + " " + Str(TouchY(finger)) + "-" + Str(TouchDeltaY(finger))
Next
EndIf
SetWindowTitle(Window_0,"timer: " + Hex(EventTimer()) + " " + Str(ExamineTouchScreen()) + " " + a$)
EndProcedure
thanks
// Added Code-Tags (Peter)
Re: Touch screen commands on Safari Browser
Have you tried the TouchScreen.sb example in the help file under "2D Games & Multimedia Libraries/Touch Screen" ?