A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: How can I identify Movieclip-Copys?

  1. #1
    Junior Member
    Join Date
    Jan 2003
    Posts
    1

    How can I identify Movieclip-Copys?

    This is the problem:
    My Programm displays several dots (~400). They are duplicated Movieclips, the original Movieclip is a button.
    When you mouseclick one of this Duplicates, it should somehow be able to identify itself. Like find out its name or depth, which of course is different for every Copy.

    Is there a way to write this ability into the parent's code?
    Something like "What is my own name?"
    Or do you have any alternative ideas?

    The idea of the programm is this:
    It will be used to track 3D-coordinates of human skulls )
    The 3D-coordinates are turned into 2D.
    Now you can select some of the dots. Finally a text-output tells you which points were selected.

    I can´t figure out how to realize the last funktion, as stated above.
    Thank you for any help

    teteo

  2. #2
    Junior Member
    Join Date
    Jun 2001
    Location
    England
    Posts
    24
    If you add

    _root.lastClicked=this._name;

    to the on (press) action of your MC (the one you are duplicating) it will set the root-level variable to the instance's name when its clicked. For recording several instance names, you would need an array. To take the names out of the array if an instance was clicked again, you'd need to search the array and see if its name is already there, to make a sort of 'toggle' action.

    Chris.
    Centre for New Media,
    KMi, The Open University, UK
    http://cnm.open.ac.uk/

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center