Hi Alex,

Thanks for the help.

The problem is intermittent, perhaps happening one in three times if I have 
more than three sub applications being loaded in.

I found the bug was related to an MXML component with two states, which is 
being repeated. Only once is the alternate state used (if it's the first item). 
I have therefore removed the state from the repeater, and put it before the 
repeater. This has stopped the problem, but obviously not resolved the RTE from 
potentially happening again somewhere else.

It's interesting what you say about removing the loader. In order to preload 
the sub applications, I add them to a hidden container on the stage momentarily 
to start them loading (If there is a way to do this in AS only please let me 
know). The reference to the sub app swf is still retained for when the user 
chooses to see it, and it is then attached to the stage again. The RTE happens 
when there loading in, so I assume this supports that theory.

This is a section of the MXML component that preloads the swf

...

            private function _preLoadSwf(e:PropertyChangeEvent):void
            {
                if (!e.newValue)
                    return;

                createChildren();
                this.preLoader.removeAllChildren(); // Remove the child once 
added 
            }

            override protected function createChildren():void
            {
                super.createChildren();

                if (this.preLoader && _ds.preloadSwf)
                    this.preLoader.addChild(SWFLoader(_ds.preloadSwf));
            }
        ]]>
    </mx:Script>

    <!-- Display Object used for preloading channels -->
    <mx:Canvas id = "preLoader"
               visible = "false"/>

....

Obviously this is a bit of a hack to force the swfloader to start loading, but 
I assume it's the cause of the problem.

Please let me know how to report the bug, and I can try and see if I can 
recreate the issue, but it's a bit of a tricky one to recreate ;)

Ta

Rob


Reply via email to