Hi.
Hopefully someone can help me with a problem I'm having. I have started to create an iPad app to display a local PDF file. I can't seem to trap touch events on the browser object. I have the following script at the card level and have a label to display the points so I can try to figure out what's happening. In the iOS Simulator, labelTouchPoint tracks mouse events, but when I try the same thing on the PDF file image (in the browser object), I get nothing. The PDF file pans, scrolls and scales properly using the mouse & option key, but I'm trying to trap a simple mouseDown or touchStart event and can't seem to do that. What am I doing wrong?
global sBrowserId
on touchStart pTouchId, pX, pY # Sent each time a new touch is startedend touchStart
global sBrowserId
put (pX & comma & pY) into field "labelTouchPoint"
end touchStart
on touchEnd pTouchId, pX, pY # Sent each time a touch endsend touchEnd
global sBrowserId
put (pX & comma & pY) into field "labelTouchPoint"
// cmdShowMainTools
end touchEnd
on touchMove pTouchId, pX, pY # Sent when any touch moves set the loc of the target to pX,pYend touchMove
global sBrowserId
put (pX & comma & pY) into field "labelTouchPoint"
end touchMove
Thanks,
Joel
Touch Events in iOS Browser
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Touch Events in iOS Browser
Thanks Josep.
I've reviewed the post you recommended, but don't quite understand the code/logic. Do you have a working code snippet you could share? I think if I see a working version of the function it might make more sense. The document in my browser group isn't an HTML page, but a PDF.
Thanks in advance,
Joel
I've reviewed the post you recommended, but don't quite understand the code/logic. Do you have a working code snippet you could share? I think if I see a working version of the function it might make more sense. The document in my browser group isn't an HTML page, but a PDF.
Thanks in advance,
Joel
Re: Touch Events in iOS Browser
Hi Joel,
Maybe with a PDF the thing isn't easy, what you want trap when the user touch the PDF?
Turn the page? Then you can evaluate in what zone of the pdf the touch is done, and then go to the next page or the previous.
If the PDF have links, they should work...
Salut,
Josep
Maybe with a PDF the thing isn't easy, what you want trap when the user touch the PDF?
Turn the page? Then you can evaluate in what zone of the pdf the touch is done, and then go to the next page or the previous.
If the PDF have links, they should work...
Salut,
Josep
Re: Touch Events in iOS Browser
Josep,
Mainly, I want to do a couple things with the PDF:
1) I want to be able to determine when a touchEnd (or mouseUp) event happens, anywhere on the browser object, so I can display a menu.
2) I want to be able to determine the location of the touchEnd (or mouseUp) event on the PDF.
If I can accomplish the first, the second will be possible as well along with some additional code. I can't even do the first one yet.
Joel
Mainly, I want to do a couple things with the PDF:
1) I want to be able to determine when a touchEnd (or mouseUp) event happens, anywhere on the browser object, so I can display a menu.
2) I want to be able to determine the location of the touchEnd (or mouseUp) event on the PDF.
If I can accomplish the first, the second will be possible as well along with some additional code. I can't even do the first one yet.
Joel