0 Replies Latest reply on Oct 10, 2006 1:30 PM by Whitetimer

    State Management

    Whitetimer
      Hi All ...

      Ok this is my problem. I want to view the base state everytime the page reloads or the user clicks back on to that page. I have a website where i use view-stacks with 6 seperate components and then each component can have several states. When i go to view each State on each seperate viewStack and then go back to the last state, the state is on the last viewed state instead of the base state. How can i set each base state to show first.

      Below is a smaple of a component with two additional states ....

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" width="980" height="500" label="About Us">
      <mx:states>
      <mx:State id="jBio" name="cvJBio">
      <mx:RemoveChild target="{aboutText}"/>
      <mx:SetProperty target="{lbAbout1}" name="label" value="Back"/>
      <mx:SetEventHandler target="{lbAbout1}" name="click" handler="this.currentState=''"/>
      <mx:AddChild relativeTo="{aboutNav}" position="lastChild">
      <mx:LinkButton label="Julian" color="#c0c0c0" id="linkbutton1"/>
      </mx:AddChild>
      <mx:AddChild relativeTo="{aboutNav}" position="lastChild">
      <mx:LinkButton label="Karen" click="this.currentState='cvKBio'" color="#000080" id="linkbutton2"/>
      </mx:AddChild>
      <mx:RemoveChild target="{lbAbout2}"/>
      <mx:AddChild relativeTo="{vbox2}" position="lastChild">
      <mx:Text width="730" height="450"
      x="15" y="25"
      enabled="true"
      fontFamily="Arial"
      textAlign="center"
      fontSize="12"
      color="#000080">
      <mx:htmlText>
      <![CDATA[<font face="Bodoni MT" size="16">JULIAN C CORBETT

      Coming from a family of healers, I am third generation and have years of experience with many healing modalities.

      I studied Bio-Magnetic Therapy with the founder, my grandfather who stood at the forefront of this type of healing, which is now practiced world wide. I also embraced the art of Chinese medicine and perfected techniques with Acupuncture and then went on to become a Reiki master.

      Now the focus of all my work is Universal White Time Healing and Teaching, New Earth Teaching and Gemstone Healing from the White Time philosophy, as the results are phenomenal and surpass any of the healing techniques I have previously used.

      I look forward to sharing this knowledge with you and seeing the wonderful results you can achieve.


      Love & Light
      Ese,ese,ese</font>

      ]]>
      </mx:htmlText>
      </mx:Text>
      </mx:AddChild>
      <mx:AddChild relativeTo="{linkbutton1}" position="before">
      <mx:Spacer width="200" height="10"/>
      </mx:AddChild>
      <mx:AddChild relativeTo="{linkbutton2}" position="before">
      <mx:Spacer width="200" height="10"/>
      </mx:AddChild>
      <mx:RemoveChild target="{spacer1}"/>



      </mx:State>
      <mx:State id="kBio" name="cvKBio">
      <mx:RemoveChild target="{aboutText}"/>
      <mx:SetProperty target="{lbAbout1}" name="label" value="Back"/>
      <mx:AddChild relativeTo="{aboutNav}" position="lastChild">
      <mx:LinkButton label="Julian" click="this.currentState='cvJBio'" color="#000080" id="linkbutton3"/>
      </mx:AddChild>
      <mx:AddChild relativeTo="{aboutNav}" position="lastChild">
      <mx:LinkButton label="Karen" color="#c0c0c0" id="linkbutton4"/>
      </mx:AddChild>
      <mx:RemoveChild target="{lbAbout2}"/>
      <mx:AddChild relativeTo="{vbox2}" position="lastChild">
      <mx:Text width="730" height="450"
      x="15" y="25"
      enabled="true"
      fontFamily="Arial"
      textAlign="center"
      fontSize="12"
      color="#000080">

      <mx:htmlText>
      <![CDATA[<font face="Bodoni MT" size="16">KAREN GORDON

      I come from an NHS background and have worked within the service for almost 25 years.

      I am a trained Nursery Nurse and worked within a special care baby unit for many of these years, gaining valuable experience in the care of people from all walks of life, learning compassion and humility and giving love and respect.

      I am also a qualified baby massage instructor and hold group sessions in the community, encouraging loving, nurturing touch.

      My work is now focused around Universal White Time Healing and Teaching and New Earth Teaching, as this wonderful energy has changed and enriched my life.

      I have always been a carer, but now I have the tools to really help people in the best way possible.

      I truly look forward to welcoming you and helping you on your journey.

      Love & Light
      Ese, ese, ese</font>

      ]]>
      </mx:htmlText>

      </mx:Text>
      </mx:AddChild>
      <mx:SetEventHandler target="{lbAbout1}" name="click" handler="this.currentState=''"/>
      <mx:AddChild relativeTo="{linkbutton3}" position="before">
      <mx:Spacer width="200" height="10"/>
      </mx:AddChild>
      <mx:AddChild relativeTo="{linkbutton4}" position="before">
      <mx:Spacer width="200" height="10"/>
      </mx:AddChild>
      <mx:RemoveChild target="{spacer1}"/>


      </mx:State>
      </mx:states>

      <mx:HBox
      x="0" y="0"
      width="980"
      height="500"
      horizontalGap="0">

      <mx:VBox width="220" height="500" verticalGap="0">

      <mx:VBox
      height="100" width="220"
      verticalAlign="middle" horizontalAlign="center">

      <mx:Label width="200" height="50" text="About Us ... !" styleName="PageLabel" textAlign="center"/>

      </mx:VBox>

      <mx:VBox id="aboutNav"
      height="400" width="220"
      verticalAlign="middle" horizontalAlign="center">

      <mx:LinkButton label="Julian" id="lbAbout1" click="this.currentState='cvJBio'" color="#000080"/>
      <mx:Spacer width="200" height="10" id="spacer1"/>
      <mx:LinkButton label="Karen" click="this.currentState='cvKBio'" id="lbAbout2" color="#000080"/>

      </mx:VBox>


      </mx:VBox>

      <mx:VBox id="vbox2"
      width="760" height="500"
      horizontalAlign="center"
      verticalAlign="middle"
      styleName="myVBox" >

      <mx:Text id="aboutText"
      width="730" height="450"
      x="15" y="25"
      enabled="true"
      fontFamily="Arial"
      textAlign="center"
      fontSize="12"
      color="#000080">
      <mx:htmlText><![CDATA[<font face="Bodoni MT" size="16">
      Our classes for Universal White Time Healing are held in Freshfield Merseyside, a beautiful coastal area. We are happy and excited to be bringing these classes into the North of England for the first time. We feel so honoured to have been asked to teach White Time here and make it more easily accessible to you, we are humbly grateful for this chance to spread this wonderful knowledge.

      We focus on giving out the teachings of Channie Centara Cha and her teachers, the Higher Beings of Light from “out there” to spread spiritual truth, knowledge, light, love and wisdom.
      We teach Level 1 Universal White Time Healing at present but also available are the New Earth Teacher correspondence courses and of course many healing techniques, including distance healing for those who may not be able to travel.

      You can have healing treatments without becoming a healer yourself; although once you experience the energy you might change your mind. It is your free will choice.

      We keep our classes small and normally would not have more than six people in a class as we like to keep each class personal and give as much time to our students as possible.

      Please browse our website for more details on all the teachings and healings available, and feel free to contact us at any point in your search.

      Universal White Time is a family bound together with love and respect, if you are looking for higher truths, want to heal yourself and your life or help others to do the same, perhaps you have found the place to start; we would like to welcome you to our White Time family.
      </font>]]>
      </mx:htmlText>

      </mx:Text>

      </mx:VBox>

      </mx:HBox>

      </mx:Canvas>

      Many thanks

      Jools