1 Reply Latest reply on Jan 10, 2007 11:04 AM by Peter Lorent

    "selecting" a movieclip at runtime

    rodolfo1216 Level 1
      I've got a number of movieclips on the stage and I have a slider which I want users to use to change the height and width of these movieclips. But how do users "select" a movieclip and then how does the slider know which has been selected so it can adjust the size of the selected movieclip. Finally, how do users select another movieclip if they wish to resize that one?


        • 1. Re: "selecting" a movieclip at runtime
          Peter Lorent Level 2
          Several solutions but try using this one:
          set a timeline var like 'current_mc'.
          In an onRelease event for the mc's the user select, set that timeline var to 'this' which creates a reference to the clicked mc.
          Your function that scales the mc should then use current_mc to do the scaling on.

          var current_mc:MovieClip;