iOS - Stop drag?

Get help using Construct 2

Post » Thu May 10, 2012 11:16 pm

Hi there,

I was making a test iOS web app as you do and found a big flaw in that when the screen is touched, it scrolls the page. Even if the page is the same size as the screen, the screen scrolls ( or think of it as the app being dragged). This is good for a web page but not for a web app. How can I sort this out?

Thanks

Addison
DalekAddison2012-05-26 00:00:24
B
29
S
4
Posts: 42
Reputation: 2,391

Post » Tue May 15, 2012 2:11 pm

Hi All,

Still no solution. I did make a see-through sprite the size of the screen, then gave it the Drag and Drop behaviour and then on Drop it's position is reset. When I dragged the background the whole page did not move but dragging the button makes it move anyway. Do you think this sprite is having an effect or do you think as it is empty it is not doing anything?

Any other way to solve this?DalekAddison2012-05-15 14:12:37
B
29
S
4
Posts: 42
Reputation: 2,391

Post » Fri May 25, 2012 10:14 pm

Hi Everyone,

So not much progress here. I have managed to use the same large sprite to allow interaction with a sprite which can act as a button. I have created a small sprite that goes to where a Touch begins and when it contacts the sprite for the first time it activates any process. Such as changing text etc. Still can't get inbuilt buttons to work even if I set the Drag and Drop behavior on it.

Is there any way I can edit the settings so that it stays fixed. Has no one got any idea? This is the third time I've asked.

Thanks

Addison
B
29
S
4
Posts: 42
Reputation: 2,391

Post » Mon May 28, 2012 4:56 am

Hey, I saw this topic, it sounds like it might have something to do with your problem?

http://www.scirra.com/forum/ios-safari-ignores-meta-information-r91-beta_topic52588.html

It sounds like you already have the touch object, but in case you don't, as Ashley mentions try adding it to your project to stop the scrolling. Aside from that, I have no idea. :/ Maybe ask Ashley in case he missed this topic?
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Tue May 29, 2012 4:13 pm

@Arima Thanks for that link. I didn't know that thread had been made. Unfortunately I do have the Touch object already. I think however that my recent 'progress' i.e. having a large drag and drop sprite for touch doesn't seem to work as the same effects happen when it's not there too. Meaning my progress has been for nothing!

That's a good idea.

@Ashley Have you seen this thread? Have any ideas? Has anyone got any ideas!

So adding the touch object works but when clicking a button and dragging it drags the whole screen anyway (To sum up). Perhaps this is just the way as Touch events are handled differently by the iOS device if it is starting an event perhaps?

I have created an equivalent of a Button by using a Sprite and when a touch starts a small object goes to the Touch location. Then for the first time a touch happens with the small object and the Sprite the Button event happens. If that makes sense.

Although this is a work around here, i'm trying to get music for iOS via the use of a plugin (a whole other kettle of fish I know ). Anyway, I use his plugin (HTML Div)to create a small media player in iOS which when played does create music! However of course it works like the button and drags the screen. Perhaps it is to do with a Touch iOS event as that is the big thing in common between a button and this media player.

I'll get a demo up when I can!

Here we are:

http://dl.dropbox.com/u/46716511/DragPre/index.html

This one shows the button problem. Touching the blue sprite button causes changes to the text labels. Open up on an iOS to see the problem.

Here is the one with the plugin with the same problem.

http://dl.dropbox.com/u/46716511/First%20Music/index.html

Nothing much different here. Careful, will play a snazzy disco version of the Star Wars theme when started! If you are on iOS however it won't automatically start though.

I'm not sure the CAPX will be of much use, but if you would like to see one just ask.

I hope this helps. Thanks!
B
29
S
4
Posts: 42
Reputation: 2,391


Return to How do I....?

Who is online

Users browsing this forum: Braus and 5 guests