I seem to be having another problem: my project is meant to run on a signage touchscreen at 1920x1080. My development machine does not have a touch screen and runs in another resolution. Dragging and scaling on the dev machine with the mouse works beautifully, but when loaded into the destination touch screen machine, the touch gestures like drag or scale start out at the correct point but become exaggerated - like dragging the finger by 500px on the screen causes the object to move 750px (not exact figures). I can see the OS has the correct touch data points. I am not doing anything fancy - all the touch stuff is copied directly from examples that came with SDK or built into the element (a Slider to be exact).
The GestureWorks FAQ mentions fixing this by correctly initializing the touch screen resolution, but nowhere i can find how to do this correctly in AS. The touchscreen is unfortunately a 3 hour drive away, so any information is appreciated.
My own dev machine does not have an HD screen either. The issue is if the screen is resized after the application is started, the touch events are scaled with the window.
Are you developing and programming in your target resolution, or are you developing in your screen's native resolution, and then scaling the window up by saying fullscreen="true"? If it's the second one, that's likely the source of your scaling issues on touch. If the interaction is working all right on your dev screen, I would recommend making sure to adjust to target an HD screen and adjust your CML as best you can, then adjust things locally on the screen once you've compiled. It's tedious, hence the reason it should hopefully only be finishing touches.
I have found a LOT of ways the resolution can be set, i am kinda new to this, there is surely a better way.
Various combinations of these produce strange results either on the target or dev machine.
1. In CML
2. [SWF(width = "1920", height = "1080", backgroundColor = "0x123456", frameRate = "30" )]
in main function:
3. stage.fullScreenSourceRect=new Rectangle(0,0,1920,1080);
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
key = "xxxxxxxxxx";
cml = "/cml/Owensboro.cml";
5. in Owensboro-app.xml
I have found several ways to set resolution. I tried SOME of these in different combinations but i get strange results like the touch mismatch i mentioned, or incorrect scaling, etc. either on the dev or target machines.
1. in CML
2. in the main AS file
In the main function are 3. and 4.
Finally 5. in Owensboro-app.xml
I had a similar problem, but it was due to the stage's frameRate parameter. I initially had the frameRate set to 60, and it worked perfectly on my development machine in simulator mode. But when I ran the application on the touch machine, it would exhibit strange gesture bugs like those mentioned in this post. After much frustration, I found that changing the frameRate to 30 fixed the problem. So it seems that it is important to keep your application's frame rate the same as your touch device's refresh rate.
Anyone manage to get past the 30fps limitation? 60fps makes the dragging and touch feel much smoother
This topic is now closed. New replies are no longer allowed.
This topic is now archived. It is frozen and cannot be changed in any way.