<?xml version="1.0" encoding="utf-8"?>
<pyamf:ByteArrayExample xmlns:fx="http://ns.adobe.com/mxml/2009" 
						xmlns:s="library://ns.adobe.com/flex/spark" 
						xmlns:mx="library://ns.adobe.com/flex/mx"
				        xmlns:pyamf="org.pyamf.examples.bytearray.*"
					    backgroundColor="white">

	<pyamf:layout>
		<s:HorizontalLayout verticalAlign="middle" horizontalAlign="center"/>
	</pyamf:layout>

	<s:Panel title="ByteArray Example" backgroundAlpha="0">
		
		<s:layout>
			<s:VerticalLayout paddingTop="5" />
		</s:layout>
		
		<mx:TabNavigator backgroundColor="#e5e5e5" paddingBottom="5"
			             paddingLeft="5" paddingRight="5" borderVisible="false">
	
			<s:NavigatorContent label="Create">
				<s:layout>
					<s:VerticalLayout horizontalAlign="center"
										verticalAlign="middle" />
				</s:layout>
				
				<s:BorderContainer contentBackgroundColor="#000000">
					<mx:UIComponent id="videoWindow" width="320" height="240"/>
				</s:BorderContainer>
				
				<s:BorderContainer>
					<s:RichEditableText width="320" height="150" id="status_txt" textIndent="5"
										editable="false" backgroundColor="white" paddingTop="10"
										valueCommit="status_txt.scrollToRange(int.MAX_VALUE-1,int.MAX_VALUE)"/>
				</s:BorderContainer>
				
				<mx:ControlBar>
					<s:Label text="Type:"/>
					<s:ComboBox id="img_type"/>
					<s:Button id="btn" label="Create Snapshot" click="createSnapshot()"/>
				</mx:ControlBar>
			</s:NavigatorContent>
			
			<s:NavigatorContent label="View">
				<s:layout>
					<s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
				</s:layout>
				
				<s:DataGrid dataProvider="{ snapshots }" width="100%" height="100%"
							id="dg" caretChange="showPhoto()">
				</s:DataGrid>
				
				<s:BorderContainer contentBackgroundColor="#000000">
					<s:Image id="img" width="320" height="240" backgroundColor="white"/>
				</s:BorderContainer>
				
			</s:NavigatorContent>

		</mx:TabNavigator>
	</s:Panel>

</pyamf:ByteArrayExample>
