User Tag List

Results 1 to 7 of 7

Thread: Click Detection on Cloned Objects?

  1. #1
    No Products Registered

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

    Click Detection on Cloned Objects?

    Let's say I create an active object called "Box". Then, at runtime, I create multiple Box elements on screen.

    Is there a way for MMF2 to measure which particular Box I clicked on? Essentially, I'm trying to find a more efficient way than creating multiple active objects ("Box 1", "Box 2", "Box 3") and so on, and copying all of the associated code for each of those Boxes. I'm looking for the functionality of a "this" statement.

    Thanks!

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    MMF2 has built-in "object selection" whereby it will automatically only select objects relevant to a condition. In most cases the easiest way to know which objects it will select is to know that it will never select objects referenced in expression, and it will always select objects from whom you got the condition.

    In your case, creating multiple instances of the same object and having an "On Clicked on Box" condition will make any actions in the rest of that even only deal with the box that was clicked on.

    Also, when you use the Create Object action, only the newly created object is selected
    Working as fast as I can on Fusion 3

  3. #3
    No Products Registered

    Join Date
    Feb 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First, thank you for the response!

    Unfortunately, I'm finding that the events are being applied to all instances of the object, rather than just the one instance that was clicked on. I am using the "User clicks with left button on "[Object]".

  4. #4
    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)
    The condition
    'User clicks with left button on [Object]'
    only selects the object you are clicking on ( i just checked )

    You must be doing something wrong, there must be something else going on

  5. #5
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi apsharky, you must be doing the actions in the same event as the condition, and must not be running any fastloops in the same condition (this breaks object selection). Here is an example MFA:
    Attached files Attached files
    Working as fast as I can on Fusion 3

  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)
    LB, im not sure if i missunderstand what your saying
    But I modyfied your example and included a Game Loop ( fast loop ), and it does however not seem to break the object selection ( only the objects i click change animation frame )
    Attached files Attached files

  7. #7
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    yeah you misunderstood:
    Quote Originally Posted by LB
    and must not be running any fastloops in the same condition
    By "running" I mean "starting" and by "same condition" I meant "same event"
    Working as fast as I can on Fusion 3

Similar Threads

  1. Collision detection of backdrop objects not working outside of original frame.
    By butterfingers in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 16th August 2012, 09:50 AM
  2. Question: Collision detection for overlapping objects
    By ardo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 11th February 2012, 06:08 PM
  3. very missaligned collision (click) detection
    By BrashMonkey in forum Android Export Module Version 2.0
    Replies: 6
    Last Post: 15th January 2012, 09:42 PM
  4. Best method for independant cloned actives
    By BREK in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 6th June 2011, 07:49 PM
  5. Click detection problem.
    By JosephFTaylor in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 13th June 2010, 08:07 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
  •