0 Replies Latest reply on Jul 23, 2006 4:49 AM by Bob Pierce

    attachMovie() from a different library?

    Bob Pierce Level 1
      In my application I have code that is common to a number of MCs so it resides in a shared code library and each MC links to it. Within each MC is a clip unique to that MC but with a common instance name of source_mc. This allows the shared code to use source_mc.duplicateMovieClip() to successfully create duplicates in any of the MCs.

      I would like to use attachMovie() instead so that duplicates are nested within source_mc. However, calling attachMovie( source_ID, newName, 1) fails because source_ID is not found - the shared code looks in its own library rather than its host's library. I can fix this by putting a copy of source_mc in the shared code library but this means having to manually duplicate each source clip which is messy. Also it screws up my neat arrangement of each host clip having their own versions of source_mc but with the same instance name, thus allowing the linked code to work in all the host clips.

      Is there a way to make attachMovie() look in another library, or is there another solution?