thnx Geoffrey, it ran. but still i dont get it why "target" didn't answer

oktay caglar



 
On 5/25/06, Geoffrey Williams <[EMAIL PROTECTED]> wrote:
Use relativeTo instead of target:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
layout="absolute"
creationComplete="initData()">
<mx:Script>
<![CDATA[

  private var welcomeScreen:denemeci;
  private function initData():void{
   currentState='first';
  }

]]>
</mx:Script>
<mx:states>
<mx:State name="first">
  <mx:AddChild relativeTo="{targetBox}">
   <mx:Label text="hello world" />
  </mx:AddChild>
</mx:State>
<mx:State name="second">
  <mx:AddChild relativeTo="{targetBox}">
   <mx:Label text="byebye world" />
  </mx:AddChild>
</mx:State>
</mx:states>
<mx:HBox width="100%">
<mx:VBox id="targetBox" height="100" width="100"/>
<mx:Button click="currentState='first'" />
<mx:Button click="currentState='second'" />
</mx:HBox>
</mx:Application>

--- In [email protected], "oktay nba" <[EMAIL PROTECTED]> wrote:
>
> hi everyone;
> i can't change states. i write a simple code, but i can't work it
too. is it
> a bug of flex or flash player?
> here is the code:(in flex 2 beta2 it is done well but in beta 3 it
sucks)
> -------------------------------------------------------------------
--------------
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
> layout="absolute"
>  creationComplete="initData()">
>  <mx:Script>
>   <![CDATA[
>
>    private var welcomeScreen:denemeci;
>    private function initData():void{
>     currentState='first';
>    }
>
>   ]]>
>  </mx:Script>
>  <mx:states>
>   <mx:State name="first">
>    <mx:AddChild target="{targetBox}">
>     <mx:Label text="hello world" />
>    </mx:AddChild>
>   </mx:State>
>   <mx:State name="second">
>    <mx:AddChild target="{targetBox}">
>     <mx:Label text="byebye world" />
>    </mx:AddChild>
>   </mx:State>
>  </mx:states>
>  <mx:HBox width="100%">
>   <mx:VBox id="targetBox" height="100" width="100"/>
>   <mx:Button click="currentState='first'" />
>   <mx:Button click="currentState='second'" />
>  </mx:HBox>
> </mx:Application>
>
> -------------------------------------------------------
>
> Oktay Caglar
>






------------------------ Yahoo! Groups Sponsor --------------------~-->
Home is just a click away. Make Yahoo! your home page now.
http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links

<*> To visit your group on the web, go to:
   http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
   http://docs.yahoo.com/info/terms/






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to