User Tag List

Results 1 to 5 of 5

Thread: Create Dynamic Buttons

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export ModuleInstall Creator ProPatch Maker

    Join Date
    Jul 2006
    Location
    Athens, GA
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Create Dynamic Buttons

    Hi,

    Is it possible to load an external file with questions and answer choices that the MMF2 application reads and then dynamically creates the number of buttons with relation to the number of questions on the file?

    If the user makes a quiz with 5 questions then there are 5 buttons created along the bottom for each question. For example, when the user clicks button 2 then the 2nd question with the choices is shown.

    I am trying to create a quiz application in MMF2 that I originally created in flash.

    Thanks in advance.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Create Dynamic Buttons

    Yes, it is possible. I'd use INIs and loops, and determine which button is which by their X position.

    Do you want a variable amount of possible answers or, for example, have four (differing) choices for every question?
    .:::.Joshtek.:::.

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export ModuleInstall Creator ProPatch Maker

    Join Date
    Jul 2006
    Location
    Athens, GA
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Create Dynamic Buttons

    Thanks for the reply. I would have four choices per question.

    I think I understand your approach- load the INI file and loop through it adding a button for each question until the end of the file. Then determine which button by the x (y) position on mouseover or when clicked to display the question with the 4 choices.

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Create Dynamic Buttons

    Exactly. You could also use the Y position if you had multiple rows.

    All you need is to make one button and use the "duplicate" facility. This should mean that all buttons have a determinable X/Y if you take into account the distance and the offset. You can then do a loop to populate the buttons with the correct title and to determine which button it is. Use str$() to convert a number (e.g. loop step) into an string.

    Oh, and the easiest way to do it would be to have one INI group per question, and an item in a seperate group (or no group) which contains the amount of questions. Alternatively, you could have it keep going to the next group (1,2,3,etc) until it finds one with a blank item for the question field. A loop told to run -1 times should run until stopped.
    .:::.Joshtek.:::.

  5. #5
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export ModuleInstall Creator ProPatch Maker

    Join Date
    Jul 2006
    Location
    Athens, GA
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Create Dynamic Buttons

    Thank you for the details to get started.

    I am new to MMF2 and this really helps. The application may have multiple rows depending how many questions were created.

Similar Threads

  1. Soft Buttons not showing Home/Back/Multitask buttons?
    By Bipolar_Games in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 19th May 2013, 03:38 AM
  2. Dynamic Textbox
    By GoldFish in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 9th September 2012, 03:57 PM
  3. HWA Dynamic Light Example
    By Werbad in forum File Archive
    Replies: 14
    Last Post: 17th January 2009, 09:05 AM
  4. Dynamic data help.
    By SEELE in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 13th May 2008, 01:44 AM
  5. Create Dynamic Buttons
    By crugh in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 8th April 2007, 04:06 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
  •