[RESOLVED] Touch controls scroll problem

Get help using Construct 2

Post » Tue Jun 26, 2012 4:42 am

Hi there,

I just want to figure it out about 'touch controls'. I'm using an iphone 4S/iOS5/Safari. I'm working on a picture which can be scrolled on the Y axis. When tested on a regular PC browser, it works find, but on safari iphone, it doesn't work. I've tried all the touch option 'is touched' on start touch' and so on, but none of them work.

Is there something that I've missed?

HTML link use on iphone
Use your iphone

CAPX FILE
The capx fileDirtyArts2012-07-02 04:43:42
Create HTML5 games
B
9
S
1
Posts: 29
Reputation: 1,323

Post » Tue Jun 26, 2012 4:51 am

Maybe enable "Use mouse as touch" in the properties if you havent. could be the browser is trying to act as a computer rather than an app.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Tue Jun 26, 2012 5:17 am

It's already done.

I've also tried the 'iscroll' plugin, but it requires URL image which isn't useful for my target iphone native app.DirtyArts2012-06-26 05:18:33
Create HTML5 games
B
9
S
1
Posts: 29
Reputation: 1,323

Post » Tue Jun 26, 2012 6:21 am

The problem is in the way you are setting the sMY variable using the position of the Mouse. When you're on a touch screen there is no Mouse object to get the coordinates from.
So change Mouse.AbsoluteY to Touch.AbsoluteY and it'll work.
B
20
S
5
G
4
Posts: 51
Reputation: 4,139

Post » Sat Jun 30, 2012 9:39 pm

Thx works perfectly.
Create HTML5 games
B
9
S
1
Posts: 29
Reputation: 1,323


Return to How do I....?

Who is online

Users browsing this forum: Pandadoor, Zebbi and 16 guests