User Tag List

Results 1 to 4 of 4

Thread: Selecting Objects (String) Created with New Object Problem

  1. #1
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,446
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Selecting Objects (String) Created with New Object Problem

    I use a loop to create 5 String objects using the New Object command. I have them bounce around the screen display text 1, 2, 3, 4, 5 each

    All that works fine.

    Now I have a spreadsheet with 3 columns showing. The first column is ID and has 5 rows 1,2,3,4,5. The second column is X-Coor and the third column is Y-Coor.

    As the string objects bounce around the screen I want to update the spreadsheet to show their X and Y Coordinates.

    So I wanted to create a loop called "Update Spreadsheet" and run it 5 times. Then I want wanted to tell it the pick the object based on the loop index and get its X and Y.

    Here is the problem. There is no way to pick the proper string object.

    On each loop I need to pick a specific string and get its X and Y coordinates.

    Any ideas?

  2. #2
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,446
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Here is a link to the .mfa I was working on:


    Also if you run the application several times you may notice another problem in that 6 strings instead of 5 (Two 1's) are sometime generated at "start of frame".
    Attached files Attached files

  3. #3
    Clicker Fusion 2.5
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    570
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I don't have the developer version so I can't open your .mfa (requires listview object), but I made an example using the regular list object: display bouncing string positions.mfa

    Instead of comparing objects to a loop index, I iterate through them using a foreach loop then add them to list. Foreach loops always iterate in reverse creation order, newest to oldest. To get around this, I set the list object to "sort" in its properties, so 54321 becomes 12345 instead.

    Keep in mind that this will only work for 9 and under amount of objects due to how alphabetical sorting works. If you require more than 9 objects, I have an idea of how to get around it, but this method is simpler if it suits your needs.

  4. #4
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,446
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Yes that is the information I needed casleziro. Thank you.

Similar Threads

  1. Problem with destroying the last created object
    By balazstasi in forum Fusion 2.5
    Replies: 2
    Last Post: 31st August 2016, 09:44 AM
  2. using a parsed string for selecting an animation sequence
    By aylictal in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 7th February 2013, 01:56 PM
  3. Selecting last created Object
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 30th June 2012, 06:34 AM
  4. Objects created away from the object that creates them? Using Box2d. (not Box2d2.0)
    By leightonw87 in forum SWF/Flash Export Module Version 2.0
    Replies: 0
    Last Post: 29th February 2012, 11:51 AM
  5. Selecting Objects by Value?
    By YAS in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 31st August 2007, 09:34 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
  •