User Tag List

Results 1 to 3 of 3

Thread: scrolling a layer problem

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    scrolling a layer problem

    It seems when I set a variable to the position of a touch relative to a layer, the variable is not always set correctly. I am using:

    +A new touch has occurred, Number 0
    - Set OldX to XTouch + LyrGetLayerXPos(layer object, 3)*-1
    - Set NewX to XTouch + LyrGetLayerXPos(layer object, 3)*-1
    - Set XSpeed to 0

    +Touch 0 is active
    - Set OldX to NewX
    - Set NewX to XTouch + LyrGetLayerXPos(layer object, 3)*-1
    - Set XSpeed to OldX - NewX

    I use the speed variable (XSpeed) to set the layer's speed like so:

    +XSpeed <> 0.0
    - Set X Layer 3 to LyrGetLayerXPos (layer object, 3) - XSpeed

    For some reason, when I tap the same spot, the variables that are set to the touch position are not equal on the first tap. This seems to make scrolling the layer choppy, since the OldX and NewX values need to be equal. Sorry if this is not making sense, since I haven't gotten much sleep lately.

    If anyone can help me figure this out, I would greatly appreciate it. I am using DistantJ's scrolling with momentum example as a starting place, if that helps. I am trying to adapt it to scroll a layer by touch using the multitouch object, not the mouse.

    Cheers,

    Reg

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    How bug is the difference?

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    The values don't always update, so sometimes only the OldX will update on touch. Sometimes only the NewX will update on touch. When this happens, it causes problems. I can try to simplify my code to an example if that will help.

    EDIT: Here is a simplified example of the shop I made. The desired behavior is to freely scroll by click-dragging or to scroll with momentum when you click-drag-release. Click-drag seems to quickly jitter the layer's position (you can see this when the item slots rapidly jitter). I think this is because of the inconsistent values I mentioned in the original post.

    Any ideas?

    Reg
    Attached files Attached files

Similar Threads

  1. Layer Scrolling Performance
    By StingRay in forum iOS Export Module Version 2.0
    Replies: 4
    Last Post: 11th January 2013, 03:49 PM
  2. Can you stop a particular layer from scrolling?
    By ChrisBurrows in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 9th November 2011, 05:25 PM
  3. Beta 12 - Layer Scrolling Bug
    By RhysD in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 21st February 2011, 04:13 AM
  4. Layer scrolling
    By Digitalic in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 25th June 2010, 09:29 PM
  5. Layer Scrolling Problem
    By crusher in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 2nd September 2009, 12:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •