<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.macromedia.com/2003/mxml" width="400" height="400" title="Page1">
<mx:TextInput id="input1"/>
<mx:ControlBar>
<mx:Button label="Goto Page2" click="parentDocument.page2.mytext = input1.text;parentDocument.viewStack.selectedChild = parentDocument.page2"/>
</mx:ControlBar>
</mx:Panel>