Prefix for element not bound

Posted by Tim on Stack Overflow See other posts from Stack Overflow or by Tim
Published on 2010-05-23T16:59:51Z Indexed on 2010/05/23 20:10 UTC
Read the original article Hit count: 452

Filed under:

Hello!

I am a newbie in Flex development and using Flash Builder 4 with SDK 4. Now I get the error that "the prefix "fx" for element "fx:Style" is not bound" in line number 4. I searched for it, and it has sth. to do with namespaces, but I can not solve it by myelf.

I have the file called "UserStory.mxml" in the directory "components" to place it via the main.mxml onto the screen:

<fx:Script>
    <![CDATA[
        import components.UserStory;
        private function init():void {
            var userStory1:UserStory = new UserStory();
            userStory1.x = 100;
            userStory1.y = 100;

            userStory1.userStoryText = "test";

            this.addChild(userStory1);
        }
    ]]>
</fx:Script>

The file in which the error occurs in line no. 4:

<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="300" height="150" styleName="userstory">

    <fx:Style source="styles/styles.css"/>

    <fx:Text x="5" y="5" width="275" height="135" text="{userStoryText}" fontFamily="notes" fontSize="18"/>

    <mx:Script>
        ...
    </mx:Script>
</mx:Canvas>

Can someone tell me what's wrong?

Thanks a lot in advance & Best Regards.

© Stack Overflow or respective owner

Related posts about flex