User Tag List

Results 1 to 2 of 2

Thread: Iterating Objects

  1. #1
    No Products Registered

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

    Arrow Iterating Objects

    First of all, sorry for my poor English. I will try to understand me best.

    I have a problem with the software I'm creating.

    It is a tool to insert buttons and images. The names and pictures I keep in a file "ini" as follows:

    [Button 1]
    X = 32
    Y = 32
    [Button 2]
    X = 32
    Y = 64
    [Image 1]
    Path = D: \ Software \ Image1.jpg
    [Image 2]
    Path = D: \ Software \ Image2.jpg

    Ok. I downloaded an example to handle the "ini" and all is well, but when editing buttons and pictures ... I can not save the information.

    I have a global variable called "Button_ID" where I store the ID of the buttons are added and each button has a variable named "ID"

    I do the following:

    - Button "Create" was clicked?
    Create_Button [0,0]
    Add 1 to GlobalVariable "Button_ID"
    Set value to ID("Button") = GlobalVariable "Button_ID"

    And each button has a saved ID. But when I do the loop for storing data that has all the buttons on the form, I do not know how.

    So I'm doing:

    - Button "Save" was clicked?
    Create_Loop("Saving_Data") (Button_ID times)

    - On_Loop("Saving_Data")
    - Loop_Index("Saving_Data") == ID("Button")
    - Set XPos("Button") to item "X" from group "Button"+Str$(ID)

    I do not in any way, as it always variable ID button is 4 (If I have 4 buttons)

    It is always saved the last button created variable in this example 4.

    In which way could iterate through the buttons you created in dynamic form to save your data in the file?

    Thank you very much for your time!

  2. #2
    No Products Registered

    Join Date
    Nov 2010
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks anyway

    I could already solve the problem.

    I leave it here in case anyone needs it.

    Before starting the loop, put the Button variable ("ID") at 1.

    During the loop, performing the action I wanted and then executing the action: Spread 1 to Button ("ID") and that way I worked.

    Regards

Similar Threads

  1. Hidden objects (it thinks objects inside the screen are outside?)
    By SoftWarewolf in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 16th December 2012, 11:15 PM
  2. created objects create objects and destroy both.
    By wizlore in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 25th September 2012, 08:37 PM
  3. Compairing 'Objects AltValueA' to 'Objects AltValueB' dont work
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 8th May 2012, 12:27 AM
  4. Objects creating a line of objects to an obstacle
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th March 2012, 08:22 PM
  5. Collisions Between Active Objects & Image Objects?
    By mkj5025 in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 18th February 2009, 08:58 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •