User Tag List

Results 1 to 5 of 5

Thread: Dynamic Object Creation

  1. #1
    No Products Registered

    Join Date
    Sep 2006
    Location
    Brazil - ES
    Posts
    173
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dynamic Object Creation

    Lets say I have 1000 different objects of the same Group in my application and I have to create one of these objects one or more times depending on a certain value. For example:
    I have the Objects 1, 2, 3, 4, 5... All of them with a unique ID.
    The player gets the value 379. How do I create the item with that ID?
    Please don't tell me to create 1000 conditions and remember the object might be create more then once and they all start in the frame with "Create at start" option disabled. Oh, the objects are static (no animation), like a image.

    The only way I found to do this was to create a single object with 1000 stored images and switch to the respective ID. Any other ideias?

  2. #2
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic Object Creation

    Unfortunately there is no way to create an object by a variable in MMF2, which sucks because it makes it difficult.
    You *may* be able to do something in LUA scripting by enabling MMF interface, although I have not explored that before.

    If you could do it though, you could have your objects called, for example, "activexxx" with xxx replaced by the numbers 000-999. Then if lua allowed you to create an object by name you could create the active by using "active"+number.

    Just a thought, might not be possible (probably not)

  3. #3
    No Products Registered

    Join Date
    Sep 2006
    Location
    Brazil - ES
    Posts
    173
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic Object Creation

    I see... Too bad all my experience in Lua resumes in a homework to college 4 years ago xDDD
    But thanks for the idea pall ~~

  4. #4
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic Object Creation

    from what I understand, theres no viable way for any extension to create objects through MMF2. You simply cannot create objects except through the very lackluster "select an object" interface, which is one of the many weaknesses of MMF2.

    It means that several things that should take O(N) implementations require O(N^2) time instead, which can utterly bog down projects (especially the one I'm working on).

  5. #5
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic Object Creation

    @pixel - yeh thats what I thought.

Similar Threads

  1. Dynamic PMO creation & assignment example.
    By Nifflas in forum File Archive
    Replies: 13
    Last Post: 15th July 2011, 10:39 AM
  2. Dynamic Grid Object
    By Retriever2 in forum Extension Development
    Replies: 17
    Last Post: 10th November 2009, 02:11 AM
  3. Instances and object creation
    By Olivier in forum File Archive
    Replies: 5
    Last Post: 6th July 2008, 06:51 PM
  4. Minor object creation bug
    By Nick in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 12th July 2007, 12:46 PM
  5. Dynamic Array object problems.
    By izac in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 29th July 2006, 06:30 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
  •