ADDED_TO_STAGE + IE6 + Debugging
Let me start off by saying Event.ADDED_TO_STAGE does NOT work in IE6. I spent the better part of today debugging to finally track the culprit down to this event. This flip side to this is I figured out a gorilla method for debugging and getting to the source of the problem.I added a method to my SendJavascript singleton class called debug() that fires an ExternalInterface function (I might convert the rest of the class tp ExternalInterface at some point if I find it works better then the way it is now). This in turn is connected to a javascript that generates an alert box. Surprisingly enough, when the alert box would popup on screen, the code running in the SWF would stop. By moving this method around my application I was able to figure out that if the alert came up all was well. If it didn’t come up then I knew it was located beyond the trouble spot. By continuously narrowing the bookends of the alert calls I tracked the issue down to the event. Reminded me of using signal flow to track down a hum in an audio path.I took it a step further and created an F.D.T. code template that allowed me to insert the call. This made it speedy as it would automatically insert the class method and the enclosing method.Here’s the template code:
Here’s the script added to the html:
Here’s the updated Class:SendJavascript Debug UpdateYou can see more info on this class as well here.