0 Replies Latest reply on Oct 4, 2006 8:01 PM by ccaptainsubzero

    Compile Errors:  The class or interface could not be loaded

    ccaptainsubzero
      I'm trying to set up a MainViewer class in a .as file that will make a series of calls to a modified version of Moock's ImageViewer class -- what I want is a number of images loaded, so I will call ImageViewer loading for each of them and store an array of ImageViewers. But I need to know when all the images are done loading. So I thought to put a counter in my MainViewer.as file that would increment with each call to ImageViewer.loadClip(), and then decrement on onLoadInit. I'm an AS newbie -- and the best way I could figure out to call back to the MainViewer was to store an instance of it in each ImageViewer upon incarnation of the ImageViewer. Then in the ImageViewer class, on onLoadInit, I would use that stored copy of MainViewer to access MainViewer's methods to increment MainViewer's private counter. But when I do this I get errors like

      **Error** /Users/robert/Documents/source0/moock_eas2_examples/eas2_imageviewer_take2/MainViewer.as: Line 1: The name of this class, 'MainViewer', conflicts with the name of another class that was loaded, 'MainViewer'.
      class MainViewer {


      Am I running into some kind of rule where there's a circularity here in definition? I attach the releveant files -- bear in mind I'm not done yet, just started (don'e have the XML hooked up yet, but got that working yesterday separately). There could, at this point, be other logical errors in program -- I've gotten stumped and been poking around for an hour or so.

      What's going wrong here -- and if you're loading 50 images, what's the best way to keep track of ALL their progress?