3 Replies Latest reply on Nov 1, 2007 10:19 AM by kglad

    linkage identifier versus instance name

    Level 7
      What are the differences between linkage identifier and instance name of any
      object(mc,symbol etc)

      Some commands in flash require linkage identifiers to me provided.What if
      the movieclip is being created dynamucally.How would then the link Id be
      given.

      On the other hand if movieclip is static with linkage identifier then how to
      create handlers (on press ,etc) for it after attcahig it on stage or some
      container to recieve events from those container also.

      Any suggestions and thoghts appreciated.



        • 1. Re: linkage identifier versus instance name
          kglad Adobe Community Professional & MVP
          the instance name is a string used to reference an instantiated (or on-stage - though it can be off-stage) object.

          a linkage id is a string that's used to reference a library symbol. it can only be created by right clicking on a library symbol and clicking linkage (or properties).

          therefore, a dynamically created movieclip cannot have a linkage id assigned.

          one the other hand a movieclip created using a linkage id (ie, by using attachMovie() ) is require to have an instance name supplied (as the first attachMovie() parameter) and that instance name (or a reference to the attachMovie() statement) is used to reference the new movieclip (and assign handlers, properties and other methods).
          • 2. Re: linkage identifier versus instance name
            Level 7
            one the other hand a movieclip created using a linkage id (ie, by using
            attachMovie() ) is require to have an instance name supplied (as the first
            attachMovie() parameter) -- I suppose this is SECOND parametr,first is
            linkage ID .

            All you said is right but I want to know how to assigh handlers to mc with
            linkage id in library.
            so that when they are attched they should respond to the events.
            Eg i attcah a mc which plays on clickin on it ,has an linkage id but not an
            instance name so that i can put assosiate handler to.
            BTW using AS2.

            or if i create an empty movie clip and then attach the mc to it.then how to
            assign handlers.


            • 3. Re: linkage identifier versus instance name
              kglad Adobe Community Professional & MVP
              your first paragraph is correct: instance name is the 2nd parameter