for which object its giving null ?
On Sat, Jul 17, 2010 at 11:53 PM, Sidhu Vijay Sidhu <[email protected]>wrote:
> Hi guys
>
> I have four different components in views folder and i have a view stack in
> which those components are imported like this
>
>
> <mx:ViewStack id="vs" resizeToContent="true" selectedIndex="1">
>
> <views:About/>
>
> <views:Restaurant/>
>
> <views:Home />
>
> <views:Contact/>
>
> <views:Events/>
>
> </mx:ViewStack>
>
> and in About componet i have button i want when i click on that button
> control goes to component called Home...i have tried like this
>
> This is in About
>
> <mx:Button
> label="GoToHome" click="handleClick(event)"/>
>
> <mx:Script>
>
> <![CDATA[
>
> *import* MenuDemo; // Main Application in view stack is there
>
> *public* *var* menuObj:MenuDemo = *new* MenuDemo();
>
> *public* *function* handleClick(event:MouseEvent):*void*{
>
> menuObj.vs.selectedIndex=2;
>
> }
>
> ]]>
>
>
>
> But it is showing null object ref... How can i do this ..Help me
>
> </mx:Script>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.