1 Reply Latest reply on Sep 20, 2007 10:33 AM by hanchan07

    Runtime CSS bug?

      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.
      at ::ModuleInfo/load()
      at ::ModuleInfoProxy/load()
      at MethodInfo-637()
      at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
      at flash.utils::Timer/flash.utils:Timer::tick()

      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?
        • 1. Re: Runtime CSS bug?
          hanchan07 Level 1
          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=" http://www.adobe.com/2006/mxml" initialize="StyleManager.loadStyleDeclarations('style.swf')">