1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.ValidationResultEvent;
public var monAlert:Alert;
protected function emailValide_invalidHandler(event:ValidationResultEvent):void
{
// TODO Auto-generated method stub
monAlert = Alert.show("Mail Invalide", "Alert", Alert.OK );
// Set the height and width of the Alert control.
monAlert.height=250;
monAlert.width=250;
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Placer ici les éléments non visuels (services et objets de valeur, par exemple). -->
<mx:EmailValidator id="emailValide" source="{emailInput}" property="text"
trigger="{btnCon}" triggerEvent="click" invalid="emailValide_invalidHandler(event)" />
.........
</fx:Declarations> |