3 Replies Latest reply on Jan 19, 2007 1:57 AM by Peter Lorent

    Event listner not owrking in external as file.


      I'm stuck please help.
      I'm converting a web site to flash, and because we need to use the same template for all pages and because it most be easy to change the images, I'm loading images and menu items in an external *.as file and import this file in every page.
      The problem arise when I want to add mouse listeners to some movie clips for linking to other pages, It's not working at all. I think it's because I'm creating listeners in external as file. But I have to. The same code work when I test it on a normal movie clip.
      I'm using flash 8 and actionscrip 2.
      this is a piece of code :
      var mc:MovieClip = _root.createEmptyMovieClip("mc", this.getNextHighestDepth());
      mc._x = 50;
      mc._y = 50;
      myLoader.loadClip("image.png", mc);
      mc.onRelease = function(){
      Some one suggested creating another movie clip and adding listener to it, but it didn't work.
      Also I tried to add listener after loading images and it didn't work either.

      I'm in real trouble. Any help is appreciated very much.