User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16

Thread: Retrieve number of frames

  1. #1
    Clicker Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Sep 2008
    Location
    Western Australia
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Retrieve number of frames

    Is it possible to retrieve the number of frames in an application and place that number in a variable (or use it in a calculation)?

    I have had a search around, but cannot find it.

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieve number of frames

    Since you can't exactly add or remove frames at runtime, can't you just make a global values that you change to have the number of frames?
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Multimedia Fusion 2 Developer
    alspal's Avatar
    Join Date
    Nov 2007
    Location
    Australia
    Posts
    171
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieve number of frames

    No need to be snooty. :whistle:
    [size:8pt]-StephenL[/size]

  4. #4
    Clicker Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Sep 2008
    Location
    Western Australia
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieve number of frames

    Quote Originally Posted by LB
    Since you can't exactly add or remove frames at runtime, can't you just make a global values that you change to have the number of frames?
    Yes, I could, but it would be more convenient if the number of frames could be determined at runtime.

    The reason it would be helpful is that my game has an intro screen and a game over screen, and all the other screens are 'levels'. Currently, I have a global variable in which I store the number of levels, so that Global events only occur within the game levels and the intro/game over levels. Every time I add level, I have to change the global variable. It's not a massive problem, but I don't know how many times I have added a level, tested the game, and then found that the new level doesn't work correctly because I have not changed the "Number of levels" global variable, so I have to go back and change the global variable.

    I could also change my game over frame so that it is frame 2, then I could check for 'if frame number > 2', but that means a bit of recoding.

    I can make the changes, but it would be easier for me if there was a way to access the number of frames, hence my question.

    Do you know if there is such a facility?

  5. #5
    RayMarble
    Guest

    Re: Retrieve number of frames

    Would it work if you just set the opening screen to jump to your say splash screen frame which you put as the last frame in your application and then there have something like

    Start of frame:
    Set variable to (number of current frame)

    And then jump back to whatever frame your game / editor is. I guess you'll have to adjust the number to maybe (number of current frame)-1 or something depending on what you need.

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieve number of frames

    Or this...
    Working as fast as I can on Fusion 3

  7. #7
    Clicker Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Sep 2008
    Location
    Western Australia
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieve number of frames

    Quote Originally Posted by RayMarble
    Would it work if you just set the opening screen to jump to your say splash screen frame which you put as the last frame...
    Actually, that will do the trick so I won't have to manually change a global variable each time I add a level (which is the problem I am trying to overcome).

    If, at the start of the application, there is a jump to frame X (where X is the last frame) and in frame X I set a global variable to "current frame" as you have stated, then it will always be correct, even when new frames are inserted before the final frame, because MMF2 adjusts the "Jump to Frame" accordingly when new frames are added.

  8. #8
    Clicker Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Sep 2008
    Location
    Western Australia
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieve number of frames

    LB, unless I have misunderstood your message, I would have to manually enter the number of the last frame into a global variable every time I added a new frame, which is what I am trying to avoid.

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Retrieve number of frames

    I was bored so I made this example. Don't ask how it works!
    http://clickteam.info/looki/Examples/FrameCount.mfa

    Requires Overlay Redux and Memory object.
    http://www.aquadasoft.com/Memory.zip
    http://www.bumderland.com/objects/Overlay.exe

    I really don't recommend you to use it.
    But if you insist...

  10. #10
    Clicker Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Sep 2008
    Location
    Western Australia
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieve number of frames

    Quote Originally Posted by Looki
    I was bored so I made this example. Don't ask how it works!
    It was kind of you to do that, but all my MMF2 work gets exported to a SWF, and I don't think those extensions are available for the SWF exporter.

    Thanks anway.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Number of Frames
    By BMD in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 26th May 2010, 12:42 AM
  2. Retrieve version number?
    By Richard_Pikk in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th January 2010, 02:04 PM
  3. Number of Frames?
    By astrospoon in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 9th April 2009, 03:09 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
  •