<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.macromedia.com/2003/mxml" width="400" height="400" title="Page2" show="mx.controls.Alert.show(mytext)">
<mx:Script>
<![CDATA[
var mytext;
]]>
</mx:Script>
<mx:TextInput id="input1" text="{mytext}"/>
<mx:ControlBar>
<mx:Button label="Goto Page1" click="parentDocument.viewStack.selectedChild = parentDocument.page1"/>
</mx:ControlBar>
</mx:Panel>