I am getting a very weird error within my Flex 4 CSS file. The problems panel within Flex is saying that the error exists on line 8 of a file that only has 6 lines. Here is the error:
1071: Syntax error: expected a definition keyword (such as function) after attribute namespace, not s.
Here is the CSS file within <project root>/src/assets/styles/pages/ReviewsStyles.css (only 6 lines):
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
.reviewer {
}
That’s all that this file contains. There aren’t any other files with the same class name as this stylesheet any where in the project. Oddly enough, this problem occurs no matter what name I give the stylesheet, even if the old one is deleted and re-created. Closing Flash Builder doesn’t resolve the error, and the compiled SWF throws a runtime error.
Any ideas on this one?
Thank you for your time.
Grr… ( please excuse the release of steam 😀 )
I found out why. I was including the stylesheet in my application like this:
But its not
<fx:Script>, it’s<fx:Style>, and hence the weird errors that I was receiving.Hope that helps someone.