User Tag List

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

Thread: 'Global to this application'

  1. #1
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    'Global to this application'

    Hi
    I have a question and a followup question

    ...
    If i have 3 Frames in my application
    Create an Array Object ( in Frame 1 ) and check 'Global to this application' in its propertys
    I then then copy-past the Array intoo Frame 2 and Frame 3

    If i change one of the Arrays, what happens to the other Arrays in the other Frames?
    They should also change accordingly, correct?

  2. #2
    No Products Registered

    Join Date
    Feb 2012
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Easy to test if you just put a counter in every frame that sets to a certain value of the array.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fair enought ( see .mfa attachment at bottom of this post )

    ...
    When i change the Array in one of the Frames, the Arrays in the other Frames seem to somehow change as well.

    ...
    But what if i have a Sub Application in Frame 1, wich points to Frame 2?
    What happens to the Array in Frame 1, if i changing the Array in Frame 2 through the Sub Application in Frame 1?
    Attached files Attached files

  4. #4
    No Products Registered

    Join Date
    Feb 2012
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't understand what you mean?

    Isn't making the array object global the whole point that the values change for all frames? Just like global values?

    GlobalArray.mfa

  5. #5
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You can choose whether to have a subapplication share its global objects / values with the parent application or not, its one of the options in the object.
    When resources are global to an application, they will be in shared memory accessible from every frame. When you have two different frames referencing the same memory at the same time, they will read the same object- they can write to it to communicate between frames, for example, just like global values- this is the normal way of passing messages between a subapplication and its parent (or other subapplications).

    Just keep in mind that if you're altering the data at the same time, the order might be fairly nondeterministic- MMF2 will each frame iterate through the events of each application one at a time iirc, so which order they go in will affect how it works. I can't remember if its newer first, or older, or some matter of a parent tree or whatever


    So for example, if you have 3 frames running concurrently, A, B, and C, in subapplications, then frame A does a line saying
    "Set global value to 1"

    And both B & C have identical code saying
    "If global value = 1, then set global value to 0 and add 1 to a counter"

    Then when the line executes in A, one of B or C, but not both, will add 1 to its counter. But it might occur on that same frame loop, or it might happen on the very next one

  6. #6
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK so i have 3 Frames.
    All frames have the same Global Array Object.
    Frame 3 has a Sub Application pointing to Frame 1.

    ...
    The Array in the Sub Application does not seem to refferance the Global Array correctly ( the Array in the actuall Frame and the Array in the Sub Application are not syncronized ).

    Is this correct behaviour, why is this happening?
    How can i fix this?

    Pixelthief, where in the Sub Applications propertys do i enable 'Share global objects'?
    Attached files Attached files

  7. #7
    Clicker Multimedia Fusion 2

    Join Date
    Feb 2012
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bump

  8. #8
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Location
    USA
    Posts
    2,982
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    From what I can see, the global properties for a subapp only include global values and strings. You may need to use a different array object than the standard one perhaps to get it working correctly, but I would think that surely there is a way to accomplish this with the standard array.

  9. #9
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    Killeen, TEXAS
    Posts
    1,062
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    sharing global values and strings, is in the sub-application's properties.
    i thought (i may be wrong) that it only shares the APPLICATIONS global values/strings, scores, lives, and player controls... not objects globals etc.

  10. #10
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It would be realy nice if Global Objects would work for Sub Applications.
    It would make alot of things alot easier, like Inventorys.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Global objects in global events
    By Boba Fonts in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 8th October 2010, 12:12 PM
  2. Sub Application can't use global arrays?
    By Konidias in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 12th September 2009, 04:08 PM
  3. Sub-Application - Global values ?
    By DJ_Wild in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 26th April 2009, 02:13 PM
  4. 241_MMF2dev -Global strings refusing being global
    By Tiny in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th July 2006, 07: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
  •