I would add a focus out event listener on text2. When it fires, check to see if Text1 has been validated. If not, prevent the event from propagating.
--- In [email protected], "Mandy Mandy" <amachutta@...> wrote: > > Hello All, > > I have a project I'm working on in Flex 3.5 that involves writing a bunch of > validation stuff for focusIn and focusOut for components. Depending on the > type of validation selected this could generate an Alert message. So the > problem I am running into is say I have two TextInput boxes, both with their > FocusOut property set to validate a phone number, and if the phone number is > incorrect, it will pop an alert and place the focus back into that textbox.. > A user types in a Phone Number and hits tab. The focusOut on Text1 does its > validation and pops a message that the phone number needs to be at least 10 > digits in length. The focus gets pulled from Text2 to place it back into > Text1 thereby calling the focus out in Text2 which is blank so it also pops > an alert and now we have an infinite loop of alert and focus movement. > > I've been trying to find a way to code around this and am fishing for ideas. > One idea I had was to somehow override the focusManager for this form, but am > not having much luck figuring out how to exactly do this. Anyone have any > ideas? > > > Thanks, > Amanda >

