1 Reply Latest reply on Aug 26, 2007 7:04 AM by Newsgroup_User

    AS3 & runtime sharing

    Level 7
      i've made the following simple test:
      in a movie called 'sharedLib' i've crated a MC containg some graphics, and
      in its linkage dialog-box i've checked all the 3 'export' check-boxes, named
      the class 'myIcon', and in the url put 'sharedLib.swf' (the base-class was
      automaticaly set to 'MovieClip'). in another movie, called 'destination'
      i've added an empty MC, placed it on the stage, and checked the 'import for
      runtime sharing' check-box in its 'linkage' dialog-box, named the class
      'myIcon' and in the url put 'sharedLib.swf'.
      when previewed the graphic from 'sharedLib' is seen in 'destination'.
      however, when i add the following code to the 'destination' first frame -
      var newIcon:MovieClip = new myIcon();
      i got a compile error saying 'call to a possibly undefined method myIcon'.
      so how do i approach a runtime-shared clip?
      btw - when i turned both movies to AS2 and changed the code to
      'this.attachMovie(...)' it worked fine.

      thanks in advacne,