0 Replies Latest reply on Jan 15, 2009 2:30 PM by ericbelair

    Loading Styles From External SWF - How can I test the URL first?

    ericbelair Level 1
      I am trying to load styles from a local SWF using the StyleManager.loadStyleDeclarations() function. I want to either check that the URL is valid, or catch the error when attempting to load the SWF - I basically want to go ahead an use the default styles w/o the user seeing the error if this file can't be loaded - but I can't seem to find any way to do this. When I run the following ActionScript code with an invalid URL, I get the following ActionScript error:

      Error: Unable to load style(Error #2036: Load Never Completed. URL: http://localhost/css/styles.swf): ../css/styles.swf.
      at <anonymous>()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\styles\StyleManager Impl.as:858]