User Tag List

Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 25

Thread: ScreenZoom Example: Pinch to zoom

  1. #11
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Perry's Avatar
    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,355
    Mentioned
    53 Post(s)
    Tagged
    0 Thread(s)
    OMG are you serious?? wasn't that in the original file as well that you created ???


    Edit: Working now

    Thank you thank you thank you

  2. #12
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Perry's Avatar
    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,355
    Mentioned
    53 Post(s)
    Tagged
    0 Thread(s)
    have 1 question... Zoom is working great, but is it possibe to put a limit on how far you can zoom in and out ??
    my screen = 1028 x 768 to i made the area 1200 x 900 but I can zoom way more in and zoom all the way out, so i can't see it at all lol..
    It needs some kind of a max zoom in / out on it... is that possible with the 1st example ?

  3. #13
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    In my example have a look at event #6 (the last one).
    There I set the scale value:
    Code:
    Min(Max(referenceScale( "Multiple Touch" ) * ( pinchPercent( "Multiple Touch" ) / 100.0 ), 0.2 ), 5.0 )
    Simply change the 0.2 and 5.0 values to whatever you want. Those values limit the zoom.

  4. #14
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Perry's Avatar
    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,355
    Mentioned
    53 Post(s)
    Tagged
    0 Thread(s)
    Awesome
    Thanks Anders.. you rock!

  5. #15
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Perry's Avatar
    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,355
    Mentioned
    53 Post(s)
    Tagged
    0 Thread(s)
    The zoom is working great now... changed it to 1.0 and 3.0 so I can't zoom all the way out.
    1 thing I noticed..
    My window viewer = 1024x768 and my app frame= 1363x768 and with this in place if it's showing normal
    i can drag the form to the left (the rest of 1362-1024) Is there a way to ignore that, so it doesn't move when it's zoomed normal ?

  6. #16
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Simply limit the scroll in both x and y direction to half the window size.
    So:
    Center horizontally at: Min( <the old X-scroll-position here>, WinXSize( "Window Control" )/2)
    Center vertically at: Min( <the Y-old scroll-position here>, WinYSize( "Window Control" )/2)

    (note: it may sound counter-intuitive to set a maximum scroll position using the Min() function, but that is how it works )

    You can even do better and correct the maximum scroll position to some calculation of the current zoom level. Otherwise you cannot zoom in on the bottom-right corner.

  7. #17
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Perry's Avatar
    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,355
    Mentioned
    53 Post(s)
    Tagged
    0 Thread(s)
    ok, I feel stupid...
    I'm assuming it's an "Always" condition
    but where do I find <the old X-scroll-position here> ? or where do I set it, since I cannot find it

  8. #18
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    I mean the expression that it would otherwise use:

    Before it was:
    referenceX( "Multiple Touch" ) + ( referenceWinX( "Multiple Touch" ) - windowTouchX( "Multiple Touch" ) ) * scrollScale( "Multiple Touch" ) + ( X Right Frame - X Left Frame ) / 2.0


    Now it should be:
    Min( referenceX( "Multiple Touch" ) + ( referenceWinX( "Multiple Touch" ) - windowTouchX( "Multiple Touch" ) ) * scrollScale( "Multiple Touch" ) + ( X Right Frame - X Left Frame ) / 2.0 , WinXSize( "Window Control" )/2)

  9. #19
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Perry's Avatar
    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,355
    Mentioned
    53 Post(s)
    Tagged
    0 Thread(s)
    Thanks, that worked... now it doesn't move to the right anymore when it's not zoomed..
    Now I need to figure out why I can't move up/down and left/right anymore once I zoom in....
    I can't win

  10. #20
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    I expanded on my example file a bit here:
    PinchZoomLimitScroll.mfa

    The maxScrollX and maxScrollY alterable values in the Multiple Touch object controls the scrolling limits.
    When you zoom in it allows you to scroll closer to the window edge as that portion isn't visible to the user.



    EDIT: I realize that the MMF2 scrolling boundary will prevent it from zooming in on the topmost and leftmost part of the frame here. I'll modify the example so it has a minimum scrolling part as well. You will have to center your zoomable area inside a larger frame that is free to scroll in any direction and not limited for scrolling near the top and left frame edge.

Page 2 of 3 FirstFirst 1 2 3 LastLast

Similar Threads

  1. Cant't find Zoom in and Zoom out shortcuts for MMF2 developer...
    By Villmaxie in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 18th November 2014, 12:01 AM
  2. Pinch Zoom Help
    By Appsareawesome in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 19th February 2014, 05:15 AM
  3. How to fixed min size for pinch?
    By pradeep in forum Android Export Module 2.5
    Replies: 0
    Last Post: 18th February 2014, 04:16 PM
  4. pinch in multiple touch
    By ineke in forum Android Export Module Version 2.0
    Replies: 4
    Last Post: 26th August 2013, 09:20 AM

Posting Permissions

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