I have just recently tried putting the css for my app in at
runtime, however once I did I get this error when I run the app:
TypeError: Error #1009: Cannot access a property or method of
a null object reference.
This usually only happens with a cleared cache, but once this
happens the Styles do not load. If I hit the refresh button once or
twice the error stops and the Styles load fine. The problem is that
the error will not show up on a non debug version of flash player,
and is a problem for the normal user. I have tired putting a
listener to pull up the style sheet once the app has loaded as well
and I still get the same error. If I take out the runtime CSS and
hard code it inside the app with the <style> tag it works
fine as well. Is there a bug with the Style swf? Has anyone come
across this problem and know of a way to fix it?
Just Looked into this again, I was loading the CSS swf with a
event handler, the error come from the handler, So it looks like
there is a conflict with runtime css and event listeners. I put the
css to load in the application tag with a initialize=""and it works
fine. Like this. <mx:Application xmlns:mx="