User Tag List

Results 1 to 2 of 2

Thread: can someone check my expression - it's not working as i expect

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS 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)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2010
    Posts
    172
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    can someone check my expression - it's not working as i expect

    I'm using the expression to shuffle an active across x.
    X( "Start" ) + ( ( X( "End" ) - X( "Start" ) ) * EaseTimer( "Active 3" ) / EaseDuration( "Active 3" ) * 1.0 )
    X( "Start" )=100
    X( "End" )=500
    EaseTimer( "Active 3" )=0-100 with 1 being added each cycle
    EaseDuration=100
    I expect that as the EaseTimer increases from 0 to 100 the active would slide between 100 and 500. in reality it waits in the 100 position until it hits 500 and then jumps. Can anyone tell me where it went wrong?

    I also used the easing object with this formula:

    EaseInBetween( "Easing Object", PreviousSatellite_X_15( "Val_Planets" ), SelectedSatellite_X_9( "Val_Planets" ), 1, JumpTimer( "Player" ) / JumpDuration( "Player" ) * 1.0 )

    which works in html but fails in the preview mode.
    Small Example easeTest.mfa
    and link to how it should work http://johnhenderson.com.au/Worlds

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS 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)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2010
    Posts
    172
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Equation convert to float solution

    Quote Originally Posted by JohnArtbox View Post
    I'm using the expression to shuffle an active across x.
    X( "Start" ) + ( ( X( "End" ) - X( "Start" ) ) * EaseTimer( "Active 3" ) / EaseDuration( "Active 3" ) * 1.0 )
    X( "Start" )=100
    X( "End" )=500
    EaseTimer( "Active 3" )=0-100 with 1 being added each cycle
    EaseDuration=100
    Thanks to @Yves , I now know that the correct formula is:
    X( "Start" ) + ( ( X( "End" ) - X( "Start" ) ) * EaseTimer( "Active 3" )* 1.0 / EaseDuration( "Active 3" ) )

    You need to convert the integer into a float before it is divided, otherwise it will convert an integer division into a meaningless float at the end. in my case the answer varied between 0 and one, so having the float(*1.0) at the end meant the equation napping between 0 and 1.

Similar Threads

  1. Replies: 4
    Last Post: 30th January 2014, 02:47 PM
  2. Why is it working in all the browser expect IE? :)
    By dinktheboss in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 23rd September 2012, 03:59 PM
  3. what to expect in updates
    By life2searching in forum XNA Export Module Version 2.0
    Replies: 13
    Last Post: 4th August 2011, 12:03 PM
  4. What to expect in the next release?
    By LazyCoder in forum Hardware Accelerated Runtime
    Replies: 15
    Last Post: 23rd April 2008, 09:12 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
  •