Let us now create the view which is solely responsible for displaying the data to the user.


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
   
    <mx:TextInput id="personName" />
   
    <mx:Text id="res" text="" />
   
    <mx:Button id="showHello" label="Say Hello" />
</mx:Application>

This will create a simple interface, which displays:
  • TextInput: for the user to enter his/her name
  • Text: That will show the results
  • Button: Clicking will initiate the event