I did this....it was giving null b4 for menuObj.vs.selectedIndex=2 i created
this custom event n handled in main application.
menuObj of main application vs is view stack object and i was accesing it in
component...anyway its solved

On Sat, Jul 17, 2010 at 2:30 PM, Khalid Chaudhary <
[email protected]> wrote:

> 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]<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.

Reply via email to