3 Replies Latest reply on Mar 12, 2008 2:24 PM by Damon Edwards

    Class Losing its super()

    Rothrock Level 5
      I've got class AbstractBox extends MovieClip.
      I've got class Border extends AbstractBox.

      Border is a MovieClip in the Library with the proper linkages set.

      About half the time I publish and the border works fine. The other half the time it doesn't work at all.

      I started by tracing out the constructor and onLoad calls for both the Border and AbstractBox. For some odd reason the AbstractBox constructor isn't getting called. I thought perhaps the implicit super() call wasn't working, so I made sure to actually type it out. But that didn't help.

      I also thought perhaps for some reason the AbstractBox class wasn't getting compliled in, but it is used by some other classes that are working and calling the constructor.

      It is really odd. It seems to be every other publish.

      I think this started when I moved the Border clip into a external shared library. And sure enough putting it back directly into the library seemed to fix the problem. But I really would rather have it in the shared library.

      Anybody have any ideas?
        • 1. Re: Class Losing its super()
          Damon Edwards Level 3
          gwd told me to tell you that it's due to a stray kryptonite instance. On a more serious note, I guess it's safe to assume the URL to the library is correct, and the swf isn't being moved around between publishes...?..
          • 2. Re: Class Losing its super()
            Rothrock Level 5
            That is exactly what I was thinking!

            Actually I wasn't quite accurate. It isn't exported for runtime sharing, but perhaps it should be? I didn't set this up.

            We have an external fla called SharedObjects (I know bad name, but that is what it is!) and it has all these little interface elements and other bits and bobs. They are all placed on the stage in a MovieClip called SharedObjects.

            Then we open our production FLA, open the SharedObject FLA as an external library, drag over the SharedObject movie into our production library. We then go into the properties and check Source "Always update before publishing."

            We have two different sets of this. One that has all the interface bits and one that has a bunch of bits that our development environment uses. For some odd reason if the Border is in the first FLA it only works every other publish. If I put it into the SharedObjectDev FLA it works fine.

            And you are correct there is nothing moving between publishes. Nothing being saved, saved and compacted, or anything. Just publish, close test environment, publish. (I have tried combinations of saving, compacting, etc. and it makes no difference.)

            I don't know how to use the export for runtime sharing. Is that more reliable? Should I look into it?
            • 3. Re: Class Losing its super()
              Damon Edwards Level 3
              Kirupa has a nice tut on a true shared library. Here she is.

              "We then go into the properties and check Source "Always update before publishing.""

              I've never heard of this method, lol, sounds kinda make-shift.

              Come by the forum in my sig and jump on live support so you can have a little chat with gwd lol. I know he's dying to explain more about the kryptonite instance, which he swears by.