1 Reply Latest reply on May 14, 2006 6:55 PM by kglad

    Problem loading CSS StyleSheet

    WebXperience Level 1
      This is the error I get:

      **Error** C:\Documents and Settings\Administrator\Local Settings\Application Data\Macromedia\Flash MX 2004\en\Configuration\CLASSES\TextField.as: Line 47: The class 'TextField.StyleSheet' could not be loaded.
      var styleSheet:TextField.StyleSheet;

      Total ActionScript Errors: 1 Reported Errors: 1

      This is the code causing the error:

      //---------------- Load CSS ---------------\\
      var cssStyles:TextField.StyleSheet = new TextField.StyleSheet ();

      cssStyles.load("styles/styles.css");
      cssStyles.onLoad = function (success) {
      if (success) {
      loadedInfo.styleSheet = cssStyles;
      } else {
      loadedInfo.text = "There has been an error loading the requested information. Please contact the Webmaster and report your error.";
      }
      }

      //---------------- </Load CSS> -----------