I've got years of experience with AS3 but am very new to MXML. I've downloaded Flash Builder 4.5 in the hope of building some mobile applications and am stumbling over the integration of Actionscript with MXML. I need to dynamically build an elaborate game interface by drawing shapes.

For some reason, Flash Builder tells me I have an error in the Actionscript here:

Code:
<?xml version="1.0" encoding="utf-8"?>
<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                            xmlns:s="library://ns.adobe.com/flex/spark" firstView="views.HelloWorldHomeView">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>

    <fx:Script>
        <![CDATA[

            var myString:String = ;
            
            // !!! error: 1120: Access of undefined property myString
            myString = ;
            
        ]]>
    </fx:Script>
</s:ViewNavigatorApplication>
I don't understand why this would be an error. Additionally, I'm wondering why I cannot refer to the this object in code I enter in this MXML file. The Flash Builder IDE complains in that case that "1042: The this keyword cannot be used in static methods. It can only be used in instance methods, function closures, and global code."

Given that the Actionscript exists in the very first script in my application's MXML file, I would expect that "this" would refer to my application itself as if I had entered this actionscript on the first frame of my Flash Movie in the Flash IDE. Either that or the actionscript would be global. But static? How is this actionscript static?

Is there any sort of tutorial that explains the idea of scope and how MXML scripts are scoped, I would certainly appreciate it. I'm also interested in learning how best to organize my actionscript and MXML in my Flex projects.