User Tag List

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

Thread: Number comparison

  1. #1
    No Products Registered

    Join Date
    Mar 2009
    Location
    London
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Number comparison

    Hello board

    Recently been using MMF (it's great!), and I was wondering whether I could get some help on my game which is related to Maths.

    Maths questions will be diplayed and the user enters their answer into an edit box. How can I get MMF to compare that value in the edit box to another number (the correct answer) and then display a smiley face picture if correct and a sad face picture if incorrect?

    Any help would be much appreciated.

  2. #2
    Clicker Fusion 2.5 Developer
    00J's Avatar
    Join Date
    Jun 2006
    Location
    Virginia, USA
    Posts
    1,510
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number comparison


    Shot at 2009-03-06

    On the correct result you have various ways to set an animation One way would be directional. Based on the result.

    You can retrieve a value from any object that stores values and compare them to the edit box value.

  3. #3
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Number comparison

    Welcome to the Forums!

    Use the "Compare Two General Values" under Special Conditions in the event editor.

    -Edittext$( "Edit Box" ) = "your answer here"

    Then show your smiley face.

    If you need an example, let me know.

    Edit: Dang! Too slow. Thanks, 00J.

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  4. #4
    No Products Registered

    Join Date
    Mar 2009
    Location
    London
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number comparison

    That is brilliant, thanks for your help guys.

    I have managed to create a smiley face when the edit box is equal to a correct answer, however I have realised that this is inadequate as for example if the answer is 12, the smiley face will still be created if 124 is inputted.

    I thought I would get around this by getting the user to click a button so that....

    1)User enters their answer into an edit box
    2)User clicks button
    3)Edit box value is compared to answer value
    4)Smiley face is created if correct/Sad face if incorrect
    5)Move onto next question[frame]

    Its the getting the button to make the comparison which I'm stuck on.

    Also having trouble with handling the incorrect response. I have tried:

    Edit Value ("Edit Box") <> [Answer] {Create sad face)

    However as soon as the application is run a sad face is created straight away as the empty edit box is deemed incorrect.

    Also the smiley faces are missed as the transfer to the next frame occurs too fast, can this be slowed down?

    Appreciate any help.

  5. #5
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number comparison

    I would make it only compare on clicking the button.
    If you right-click on a condition you get the option to add another condition, so you can do:
    User clicks button
    +Edit Value ("Edit Box") = [Answer]
    -{Create happy face}
    User clicks button
    +Edit Value ("Edit Box") <> [Answer]
    -{Create sad face}

    I would also put this event before those, so you only have one face showing at a time:
    User clicks button
    -{Destroy sad face}
    -{Destroy happy face}

  6. #6
    No Products Registered

    Join Date
    Mar 2009
    Location
    London
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number comparison

    That works a treat thanks, is there anyway to automatically navigate to the next frame after seeing a happy/sad face for 2 seconds?

  7. #7
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Number comparison

    When the happy/sad face appears, start a timer (Timer X or similar), after timer = 2 sec, "Jump To Frame" whatever. This option is located under the Frame Properties.

    User clicks button
    +Edit Value ("Edit Box") = [Answer]
    -{Create happy face}
    -(Set Timer)

    +Timer = 2 sec
    -(Jump To Frame whatever)

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  8. #8
    No Products Registered

    Join Date
    Mar 2009
    Location
    London
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number comparison

    Man I've been trying to implement those timer instructions but I always somehow navigate to the next slide way too early or not at all!!

    Appreciate it if anyone take a look at my file to see where on earth I am going wrong?

    http://uploaded.to/?id=ekrphp

    As previously mentioned all I wanted was to navigate to the next slide after either seeing a smiley face, or sad face, or a 'too late' label.

  9. #9
    Clicker Fusion 2.5 Developer
    00J's Avatar
    Join Date
    Jun 2006
    Location
    Virginia, USA
    Posts
    1,510
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number comparison

    Did you guys get to take a look at it? heh

  10. #10
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Number comparison

    Quote Originally Posted by jackdaniels
    As previously mentioned all I wanted was to navigate to the next slide after either seeing a smiley face, or sad face, or a 'too late' label.
    jackdaniels, here is an example file for you. Hope it helps!
    Let us know if you need anymore help.

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


Page 1 of 2 1 2 LastLast

Similar Threads

  1. XNA / MMF2 Comparison Video
    By ChrisStreet in forum XNA Export Module Version 2.0
    Replies: 9
    Last Post: 23rd May 2011, 04:44 PM
  2. [BUG?] LoopIndex comparison
    By MJK in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 12th July 2010, 06:02 PM
  3. String Comparison
    By Jesse in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 30th April 2010, 11:28 PM
  4. Image Comparison
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 16th March 2010, 01:34 PM
  5. Question about something on the comparison
    By Valiace in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 4th April 2007, 05:13 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
  •