<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
backgroundColor="0xFFFFFF"
xmlns:car="com.renaun.objects.*" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import com.renaun.objects.CarMonitorEvent;
[Bindable]
public var console:String = "";
]]>
</mx:Script>
<car:Car id="myCar" source="@Embed(source='truck.jpg')"
TurnLeft="console += 'Turning Left Now!\n';"
TurnRight="console += 'Turning Left Now!\n';"
CarMonitor="console += CarMonitorEvent( event ).message + '\n';" />
<mx:HBox>
<mx:Button label="Start the Truck" click="console += 'Turning Key On!\n';myCar.turnKey( true )" enabled="{ !myCar.isRunning }" />
<mx:Button label="Stop the Truck" click="console += 'Turning Key Off!\n';myCar.turnKey( false )" enabled="{ myCar.isRunning }" />
<mx:Button label="Put into Drive" click="console += 'Put into Drive!\n';myCar.putIntoDrive()" enabled="{ myCar.isRunning }"/>
</mx:HBox>
<mx:TextArea text="{ console }" width="600" height="300"/>
<mx:Label color="0x777777" text="More Flex By Example by Renaun Erickson located at http://renaun.com/flex2/" />
<mx:Label color="0x777777" text="Image from http://jeep.com" />
</mx:Application>