User Tag List

Results 1 to 8 of 8

Thread: Scrolling with coefficients

  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 with coefficients

    I feel like I have asked this a million times before, but can someone please explain how to do the following? I have a horizontal auto scrolling game where I want to be able to use MMF2's layer coefficients to scroll my layers at different speeds (ie parallax). The layers need to wrap/repeat and they can be any width (one or more screens wide). I want all my game elements to stay stationary so that the game only takes place from 0 to 640 (the window is 640x480) and the background scrolls by.

    The only way I know how to do this is by manually scrolling some large actives and resetting them when their x pos is below the left side of the frame. But this method doesn't allow the use of the layer coefficients.

    If anyone could whip up a simple example or suggest the basic code for this, I'd really appreciate it. I know this sounds super basic, but I am just not getting this "easy" MMF concept. T_T

    Mobichan

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling with coefficients

    If you set the virtual frame width to -1 it will look like an infinite loop.

  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)

    Re: Scrolling with coefficients

    Wow. That is a handy bit of knowledge. Out of curiousity, are there any problems with scrolling the frame infinitely like that? I noticed that all the objects will scroll pretty far along in x and I wonder if there could be memory issues?

    But what I was hoping to do was not have my objects actually scrolling through the level (not change x pos). I was using the layer object to set the layers' position to their current pos + a value, but that method only allows integers. And I need a scroll speed slower than 1.

  4. #4
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling with coefficients

    only allows integers? are you sure?

    current Pos + 0.25?

  5. #5
    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)

    Re: Scrolling with coefficients

    Anything under 1.0 and it doesn't scroll at all. T_T Is that a bug?

  6. #6
    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)

    Re: Scrolling with coefficients

    Sorry for bumping, but can anyone confirm that only integers work for scrolling coefficients?

  7. #7
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling with coefficients

    I would imagine so, you cannot scroll 0.5 of a pixel in MMF

  8. #8
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling with coefficients

    Scrolling coefficients under 1 definitely work, I use them myself for parallaxing backgrounds...

Similar Threads

  1. Alpha coefficients not working in Simulator
    By AyreGuitar in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 17th January 2012, 07:38 AM
  2. iOS and RGB Coefficients... do they work?
    By Tuna in forum iOS Export Module Version 2.0
    Replies: 31
    Last Post: 15th December 2011, 04:34 PM
  3. Help with Camera Scrolling for Side-Scrolling
    By ThatOtherGuy in forum File Archive
    Replies: 4
    Last Post: 29th August 2009, 09:38 PM
  4. Ink effect coefficients
    By stuckboy in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 3rd July 2006, 11:23 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
  •