2 Replies Latest reply on May 31, 2007 6:41 PM by icarus786

    Flash incremental loading

    icarus786 Level 1
      Hi,

      I am having a problem with flash movies and document classes. My document classes have no access to any instance variables defined in the movie except in frame1,

      I think this is due to the incremental loading of flash movies, is there a way to stop it and ask the whole movie to be downloaded and initialized. I don't need the incremental feature anyway.

      If this still doesn't fix it then I think the document class feature is really pretty broken for all practical purposes. I wish Macromedia/Adobe would hire some decent developers to design their API's as the whole flash api seems to have been written by somebody who doesn't have a clue on on how to write an api. API's are supposed to provide a coherent set of functionality not a whole bunch of kludges.

      Also why don't those jerks design some decent components (dialog boxes, panes, etc.), instead of wasting their time on Flex/Central which haven't got a chance in hell of succeeding. All they need is a fully functional API set (e.g. maybe look at Java), support for more types of media and better project support. If they could do this then Silverlight would have no traction with me, as it is I am seriously looking at it. The only thing stopping me is the lack of peneration and the fact that my project has to be live in a couple of months.
        • 1. Re: Flash incremental loading
          kglad Adobe Community Professional & MVP
          use preloader code in your document class to ensure loading is complete before trying to reference objects and variables beyond frame 1.
          • 2. Re: Flash incremental loading
            icarus786 Level 1
            Already tried that (all my movies are preloaded).

            It is some property of the runtime that instance variables beyond frame 1 are not available, they are not even available using an ENTER_FRAME even listener. They are available if I put script code in the frame and then call a function in the document class (I assumed that this would be the same as ENTER_FRAME), once they become available they exist for the lifetime of the movie.

            I assumed the problem was that the code added to the document class by the compiler for an instance variable is like v = getChildByName("varname") in the constructor, and because these instances are not part of the display hierarchy at that point that is why they don't appear.

            The thing that still confuses me that I can't predict when they will appear from my document class code, I can only guarantee them existing from movie script code. This is very annoying as I had intended not having any code in the movie.

            I had assumed that checking the tick box (declare in frame1) would cause these instances to exist. But with these guys assuming anything is dangerous.

            Regards.