0 Replies Latest reply on Nov 8, 2006 6:36 AM by ljonny18

    viewStack + load component function

    ljonny18 Level 1

      I have a main mxml file "main.mxml" containing a view stack linking to an additional 2 mxml components:

      <mx:ViewStack id="viewStack_vs">
      <mi:page1 id="page_1" label="this is page 1"/>
      <mi:page2 id="page_2" label="this is page 2"/>
      <mi:page3 id="page_3" label="this is page 3"/>
      <mi:page4 id="page_4" label="this is page 4"/>

      when an item within the viewStack is selected / clicked… I want to call a function within the component that is selected….

      For example within page2.mxml there is a function called testFunc():

      Public function testFunc(){
      Alert.show(“hello world”)

      and then the link “page 2” is selected / clickrd from the viewStack, I want to run this fuction within the page2.mxml component….

      Is this possible??? Is t here some sort of onClick event within the viewStack I can use???