1 Reply Latest reply on Dec 21, 2007 7:02 AM by kglad

    AS 2.0 Class runtime loading problem

    cosmits Level 1
      Hi all
      i work in a company who is developing an impressive sized flash web application.
      flash application development, involving many swf files that share the same classes,
      creates a potential problem which is very difficult for us to avoid:
      say you compile a 'thumb_Navigation_bar.swf' which uses the 'PhotoManager' class
      that is imported and compiled with the swf file,
      then you make some changes to the 'PhotoManager' class,
      after that, you created 'another_gallery_component.swf' who uses the same PhotoManager for some other uses
      you actually have two swf files, importing and using the same class with different versions
      the problem occurs when the 'thumb_Navigation_bar.swf' comiled with the old version is loaded into memory
      then the 'another_gallery_component.swf' , though compiled with a newer version of the 'PhotoManager' class
      since it had already loaded into memory, the 'another_gallery_component.swf' file can't use the new functionality of the latest version of the class.

      the only solution to this behavior we have right now is running a complete build process which compiles all the whole application with all of its swf files.
      though not a big issue when building a relative small scale project,
      when the application gets bigger and complex, it creates a major problem, making the development process extremely tedious.

      does anyone have encountered a similar problem ?
      anyone have an idea as to how to go about solving it ?

      cheers
      Yariv
        • 1. Re: AS 2.0 Class runtime loading problem
          kglad Adobe Community Professional & MVP
          you need to reconsider your design process. if you had thought ahead, you would have created a base PhotoManager class that would not need to be changed for different applications.

          at its most basic, PhotoManager would be an interface whose methods and properties are implemented in another class that's specifically designed to work with thumb_Navigation_bar. and you would use another implementation for another_gallery_component.