-
1. Re: speed of TouchEvent.TOUCH_MOVE
sinious Aug 27, 2013 8:50 AM (in response to ocbfd)You can help this a bit by creating a tween between points of movement. I'm assuming here that you're just moving the object to the x/y immediately upon the event firing though.
If not, try something like TweenLite where you can continuously tween the movement. It will feel much smoother overall. It's easy to kill prior tweens of the object as well. You can get TweenLite at http://www.greensock.com
An example would be
function onDrag(e:TouchEvent):void
{
// kill any previous movement (this is desired)
TweenLite.killTweensOf(myObject,false);
TweenLite.to(myObject,0.1,{x:e.stageX,y:e.stageY,ease:Quad.easeOut});
}
That would fire off very fast and you might think continuously killing and starting a tween would feel laggy but it's actually quite smooth.
Lots of other functionality in the library if you're not already using it, here's the API:
-
2. Re: speed of TouchEvent.TOUCH_MOVE
ocbfd Aug 27, 2013 9:18 AM (in response to ocbfd)That's a good idea. My question about this isn't about the movement though. I just noticed that the TOUCH_MOVE is a bit slow. I see the same lag in other apps (like itunes) so it must just be accepted. Open an app, find something that's draggable and drag quickly back and forth to see what I'm talking about.
-
3. Re: speed of TouchEvent.TOUCH_MOVE
sinious Aug 27, 2013 9:43 AM (in response to ocbfd)Unless it's GPU driven, chances are yes you're going to really tax the system with drag and drop. iTunes will have portions of the app accelerated like viewing videos but dragging around UI elements lags for me as well (iPad1, 2, 3, 4 wifi).
Try the TweenLite technique if it really bugs you. I do it quite a bit to smooth it out because it also bugs me that native performance apps are so much smoother when scrolling, dragging, etc.
-
4. Re: speed of TouchEvent.TOUCH_MOVE
ocbfd Aug 27, 2013 11:31 AM (in response to ocbfd)Yes it's optimized for ios ipad - gpu, everything converted to bitmaps, etc. I'm experienced coding apps. I'm creating a new touch class and see that TOUCH_MOVE doesn't perform well and wanted to know why.
Scrolling is perfectly smooth once you use bitmaps. It's just this TOUCH_MOVE event has a little time lag. The movement is smooth when dragging it's just a little behind. You can see this in other apps.
Does TOUCH_MOVE fire based on time or fps?
-
5. Re: speed of TouchEvent.TOUCH_MOVE
sinious Aug 27, 2013 11:44 AM (in response to ocbfd)Based on available resources. As fast as the OS can hand the event to Flash, the event is fired off. If you do anything excessive on CPU you'll see there's a decrease in the amount but you really need to peg it out to 100%. It's not that Flash isn't getting the events from the device either, it just can't handle it, like any frame that exceeds the ops it can handle. But it will also throttle which is what I think you're really asking and I'm not certain if that throttling is time, document frame rate or device specific. Probably a combination.
If you're using Multitouch then you will lose some performance just based on the logic necessary to extract the correct touch. If you're not utilizing it then MouseEvent might just be faster for you.
-
6. Re: speed of TouchEvent.TOUCH_MOVE
sinious Sep 4, 2013 12:29 PM (in response to ocbfd)I wanted to follow up and point out on Aug 29th they put out a new version of the AIR SDK which includes this listed as a fix:
- Touch events extremely slow on AIR with Stage3D(3536911)
-
7. Re: speed of TouchEvent.TOUCH_MOVE
3134957 Sep 10, 2013 3:52 AM (in response to sinious)Hi,
I work on the flash Runtime team and glad to know that you find the release note that mention the issue fixed on AIR3.8
Please have a try to see if the issue resolved or not.
If there is still has issue or you have other kind of issues on flash runtime, please open a new bug report at https://bugbase.adobe.com/ ? When adding the bug, please include sample code so we can quickly test this out internally.
If you would like to keep this private, feel free to eail the attachment to me directly(jiyuan@adobe.com) and I will attach it to the bug for internal use only
-
8. Re: speed of TouchEvent.TOUCH_MOVE
ocbfd Oct 12, 2013 10:24 AM (in response to ocbfd)Sorry I didn't respond. I had to replace my hard drive and it's taken forever to get back to normal.
I see the very same lag in the all other games and apps I have so it must not be an issue - it's just the speed you get from the device.
If you swipe around on Cut the Rope game, the trail lags. If you swipe around on Pulse app, the scrolling lags the same.
Thanks for the feedback both of you!
Sorry I triggered your bug radar Runtime Team.
-
9. Re: speed of TouchEvent.TOUCH_MOVE
sinious Oct 14, 2013 11:15 AM (in response to ocbfd)There's a certain amount of lag even on desktops (kiosks). While there's much less on higher powered devices, even on old tablets I see some pretty fast events fire. Since I use Android and all screens aren't (iOS) faking smoothness by turning everything into a scrolling bitmap, I get lag in all apps. It comes with the territory on a true multithreaded OS. On both iOS and Android I feel the event speed is quite fine for dragging objects, but I still smooth it out using tweens and it really is a lot less noticable.




