3 Replies Latest reply on Jan 2, 2007 5:48 PM by _Albertx_

    renaming dynamic mcs

    soupycafe Level 1
      Hello and Happy New Year!!!

      I have been trying to rename dynamic movieclips on the stage and place them into new levels without re-attaching.
      I have used eval, _name and .name, but to no avail.

      I would appreciate your prompt assistance,
        • 1. Re: renaming dynamic mcs
          sly one Level 1
          Why exactly do you need to change the clip's name? Why can't you just give them the correct names when they are duplicated or attached? More detail would help.
          • 2. Re: renaming dynamic mcs
            soupycafe Level 1
            hello sly one!

            thank you for replying.

            Wellllllll, I am making an editable video player.
            The user selects from a menu and this attachs a movieclip where he can now drag the new movieclip onto his editing platform.
            He can select many videos/mcs multiple times placing them on the editing platform.

            He can also delete the mc if he drags it over the delete box.
            He can also re-order the mcs, if he places one in front of other.

            Then the video player plays according the movieclips on the platform.
            Similar to jumpcut.com

            That is the main concept. I am using an object list to track this information, but I seem to have run into trouble when trying to rename the selected movieclips.
            It would help to rename them so I can track the levels and number according to the list.
            Right now, I have it re-attaching..etc and re-importing graphics...EW!

            Any help is appreciated, let me know if I have been too abstract.

            Kind Regards,
            • 3. Re: renaming dynamic mcs
              _Albertx_ Level 1
              You were clear.

              Well, we don't know exactly why you can't rename them but maybe I have a solution.

              All functions like (duplicateMovieClip, attachMovie, createEmptyMovieClip) return the instace of the movieClip created/attached/duplicated. It meas that you can have multiple names refering the same movieClip without increasing the memory used.
              For Example
              var currentClip:MovieClip = attachMovie("LibraryID", "newClipName", 10);
              Here newClipName and currentClip have the same reference to the movieClip attached. Also you can create as many references as you want.
              var anotherRef:MovieClip = currentClip;
              var anotherMore:MovieClip = anotherRef;
              As you can see, your movieClip can have multiple names :D