1 Reply Latest reply on Jun 1, 2007 9:24 AM by JamesWilliams

    Transition fails after WebService call

      Hi all.

      If you read my post 5 mins ago you'll realise this is a related problem - I'm a Flex noob and haven't been able to find the solutions in the help files or elsewhere online - so I'd greatly appreciate any help you could offer me.

      I have a component that calls a WebService to populate some labels and once this data is retrieved I change the state of the panel container to display those labels. I've defined a transition between these 2 states - but can't get it to display properly.
      As with the previous problem, I am changing the state in the creationComplete event of the main panel because I need it to happen automatically - I can't put it on a button.

      I'm beggining to think that this is where my problem lies - I'm trying to do everything as the component gets created and not when responding to user input. Is there any way I can get this to work automatically?

      Important code snippetts are shown below:

      <mx:Panel xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute"
      width="280" height="200" title="Broker Details"

      private function loadBrokerDetails(event: Event): void
      // Change the state to play the transition
      currentState = 'DisplayState';

      <mx:Transition id="brokerLoadTransition" fromState="" toState="DisplayState">
      <mx:Parallel targets="{[lbl_Brok_ID, lbl_Co_Name, lbl_Contact_Name,
      txt_Full_Address, lbl_Telephone, lbl_Email, lbl_Originator]}">
      <mx:WipeDown duration="1000" />
      <mx:WipeRight duration="1000" />
      <mx:Dissolve alphaFrom="0.0" alphaTo="1.0" duration="1000"/>