User Tag List

Results 1 to 6 of 6

Thread: Save and load different Texts at Once?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Nov 2010
    Location
    Switzerland
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Save and load different Texts at Once?

    Hi Everybody,
    i know there should be a lot of examples of this, strangely i was not able to find an appropriate. It sounds really simple, but i was not able to solve it right now.

    Problem: You have 3 (or more) Editboxes. The User writes some Text into the different Editboxes. By clicking a Save-Button the Text of the 3 Editboxes should be saved in a Ini-File. Similarly when the User clicks on a Load-Button, the Text for the 3 Editboxes should be loaded. I think Fastloops are a part to solve this Problem.
    Could someone please explain or share a link to an MFA that explains this?

    Thanks in Advance and Greets

    jahkri

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Re: Save and load different Texts at Once?

    You're seriously over-thinking this.
    It's no different from changing three alterable values at the same time. You don't need fastloops or anything like that - just one event with 3 actions.

    eg.
    + Save clicked
    -> Ini: write edittext("Edit1") to item "string1"
    -> Ini: write edittext("Edit2") to item "string2"
    -> Ini: write edittext("Edit3") to item "string3"

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Nov 2010
    Location
    Switzerland
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Save and load different Texts at Once?

    Hey MuddyMole,

    thanks for the explanation. Because until now i' ve never had to set more than one string or value to an Ini-File at once i' ve always used the "single"-Ini-Actions like:

    + on button clicked
    - set file to...
    - set group to...
    - set item to...

    and then retrieve the value or string in the appropriate "object". I was not aware that one can specify the "Group" and "Item" in the "Receive-Data from external Object"-Command. I was in the believe that it always had to be set by an "Action" in the Ini-File...

    But i think i understand the process completely now. Anyway, thanks MuddyMole for your fast reply. Thanks and Greets,

    jahkri

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Nov 2010
    Location
    Switzerland
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Save and load different Texts at Once?

    Hey MuddyMole (or anybody else),

    perhaps there is another way to save my Editboxes that would use fastloops. In Fact i have to save 120 Editboxes at once. I think adding 120times the same condition in one Event-Action would be somewhat crazy.

    Could you give me a hint how this could be done (should i use an Array instead of an Ini?)

    Thanks and Greets,

    jahkri

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Re: Save and load different Texts at Once?

    Why did you say 3 if you really mean 120?

    // Note that the edit boxes must all be duplicates.
    + Start of frame
    -> Editbox: Spread value 0 in ID

    + Save button clicked
    -> Start fastloop "save", 120 times

    // Use an array instead of an ini; make sure it is set to be a text array not a number array, and that "1-based index" is not selected.
    + On loop "save"
    + Editbox: ID = loopindex("Save")
    -> Array: write Edittext("Editbox") to array at position loopindex("Save")

    Same thing for loading again...

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Nov 2010
    Location
    Switzerland
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Save and load different Texts at Once?

    Hi MuddyMole,

    thanks for your reply. In the Beginning i was just testing if i would be able to do it for 3 Editboxes because i thouhgt that it
    would be the same way to do it for 120 Editboxes. It later became
    clear to me that it would be a lot of work to add 120 Times the
    Action to save the Data. I try to implement your method.

    Thanks again for your kind reply.

Similar Threads

  1. Save and Load
    By PimeX in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 16th August 2010, 11:22 AM
  2. Save status of entire game (load / save values)
    By DEKE15 in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 13th September 2009, 10:17 AM
  3. Save load ext
    By scurvy in forum The Games Factory 2 - Technical Support
    Replies: 15
    Last Post: 29th July 2009, 02:05 PM
  4. save and load
    By Conman in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 17th May 2009, 05:29 PM
  5. Save Load
    By Winston in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 1st January 2008, 04:00 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
  •