1 Reply Latest reply: Feb 25, 2013 9:36 AM by DeanLoganBH RSS

    I can face errors in state property. how can i resolve this errors in flex 4.6?

    bhargavannangi Community Member

      <?xml version="1.0" encoding="utf-8"?>

      <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"

      xmlns:s="library://ns.adobe.com/flex/spark"

      xmlns:mx="library://ns.adobe.com/flex/mx"

      width="118" height="118">

      <s:layout>

      <s:BasicLayout/>

      </s:layout>

      <s:states>

      <s:State name="X">

      <mx:AddChild position="lastChild">

      <s:Label x="10" y="10" text="X" fontWeight="bold" fontSize="72" width="98" id="label1" height="98" textAlign="center"/>

      </mx:AddChild>

      </s:State>

      <s:State name="O">

      <mx:AddChild basedOn="X">

      <mx:SetProperty target="{label1}" name="text" value="O"/>

      </mx:AddChild>

      </s:State>

      <s:State name="OWinner" basedOn="O">

      <mx:SetStyle name="backgroundColor" value="#42E303"/>

      </s:State>

      <s:State name="XWinner" basedOn="X">

      <mx:SetStyle name="backgroundColor" value="#42E303"/>

      </s:State>

      </s:states>

      <fx:Script>

      <![CDATA[

      public var used:Boolean = false;

      public function reset():void

      {

      used = false;

      currentState = "";

      }

       

      ]]>

      </fx:Script>

      <fx:Declarations>

      <!-- Place non-visual elements (e.g., services, value objects) here -->

      </fx:Declarations>

      </s:Group>