Echo is a trace and introspection tool that you can run in a separate browser session alongside the Flex application you are developing. You can use Echo in two distinct ways:
Figure 1 shows the Echo Console after a user starts the Echo example application, clicks all three buttons in the application, and uses the Echo Inspector to expand the dummyData object:
Figure 1: The Echo Console after expanding the dummyData object
See the Echo Console live at: flexapps.macromedia.com/fast/fastTutorial/fast/echo/console/EchoConsole.mxml
Run the Echo example program at: flexapps.macromedia.com/fast/fastTutorial/_005_EchoExample.mxml
Figure 2 shows the Echo example program user interface:
Figure 2: The Echo Example Application
The following source code is from the Echo example application (_005_EchoExample.mxml). Take note of the highlighted items:
<mx:Panel title="Echo">
<mx:ControlBar>
<mx:Button label="Info message"
click="Echo.info('This is my info message.');"/>
<mx:Button label="Debug message"
click="Echo.debug('Debug message.');"/>
<mx:Button label="Error message"
click="Echo.error('Error message! TILT!');"/>
</mx:ControlBar>
</mx:Panel>
<mx:Script>
import fast.echo.Echo;
var dummyData:Object;
private function initApp(){
// Initialize Echo
Echo.enableDebug();
Echo.clearConsole();
// Log a message
Echo.debug("Application initialized");
// Initialize dummy data
dummyData = new Object();
dummyData.stringParameter = "This is a string";
dummyData.dateParameter = new Date();
dummyData.objectParameter = {parm1:"hello",
parm2:"Kaiser Sosay",
parm3:12345};
dummyData.arrayParameter = new Array();
dummyData.arrayParameter.push(123);
dummyData.arrayParameter.push(45.6);
dummyData.arrayParameter.push("seven eight nine");
}
</mx:Script>
Notice the following important points in this example:
Find additional information about Echo in the FAST API documentation included with the FAST download in the Requirements section.