<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" xmlns:preso="com.dcholth.preso.*"
creationComplete="handleCreationComplete()"
width="520" height="520"
xmlns:parts="com.dcholth.preso.parts.*" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import com.dcholth.preso.AbstractPresoView;
public static var DEPTH_MANAGEMENT_ON : Boolean = true;
[Bindable]
protected var gridVisible : Boolean = false;
protected function handlePresoChanged( event:Event):void
{
if( _currentPreso != null )
_currentPreso.deactivate();
_currentPreso = event.currentTarget.selectedItem.data;
_currentPreso.activate();
presoViews.selectedChild = _currentPreso;
}
protected function handleCreationComplete():void
{
(presoViews.selectedChild as AbstractPresoView).activate();
}
protected var _currentPreso : AbstractPresoView;
]]>
</mx:Script>
<mx:Style source="assets/css/preso_style.css" />
<parts:Grid id="grid"
visible="{ gridVisible }"
width="100%" height="100%" />
<mx:HBox>
<mx:ComboBox id="combo" change="{handlePresoChanged(event)}" >
<mx:ArrayCollection>
<mx:Object label="Spinng Cards" data="{rotatingCards}" />
<mx:Object label="Simple Rotation Controls" data="{simpleRotation}" />
<mx:Object label="Focal Length" data="{focalLenght}" />
<mx:Object label="Field Of View" data="{fieldOfView}" />
<mx:Object label="Bouncing Balls Field of View" data="{bouncingBalls}" />
<mx:Object label="Projection Center Change" data="{projectionCenterTest}" />
<mx:Object label="Projection Panel" data="{panelTest}" />
<mx:Object label="Mask: Positioner applied to Mask" data="{maskPosition}" />
<mx:Object label="Mask: Positioner applied to Maskee" data="{maskeePosition}" />
<mx:Object label="Good Masking" data="{correctMask}" />
<mx:Object label="Proxy Masking" data="{superMask}" />
<mx:Object label="Bouncing Balls Field of View" data="{bouncingBalls}" />
<mx:Object label="Flipping Card" data="{flippingCard}" />
<mx:Object label="A Cube" data="{cubeDepthTest}" />
<mx:Object label="Cube Within Cube" data="{cubeWithinCube}" />
<mx:Object label="Gimbal Lock" data="{gimbalLock}" />
</mx:ArrayCollection>
</mx:ComboBox>
<mx:CheckBox id="depthManagementOn"
label="Depth Management On: "
selected="true"
change="{ DEPTH_MANAGEMENT_ON = depthManagementOn.selected }" />
<mx:CheckBox id="gridVisibleCb"
label="Grid Visible"
selected="true"
change="{ gridVisible = gridVisibleCb.selected}"/>
</mx:HBox>
<mx:HRule width="100%" y="45" />
<mx:ViewStack id="presoViews"
top="50" bottom="0"
right="0" left="0">
<preso:RotatingCards id="rotatingCards" />
<preso:BouncingBalls id="bouncingBalls" />
<preso:GimbalLock id="gimbalLock" />
<preso:CubeWithinCube id="cubeWithinCube" />
<preso:CubeDepths id="cubeDepthTest" />
<preso:FlippingCard id="flippingCard" />
<preso:ProxyImageMask id="superMask" />
<preso:MaskPositioned id="maskPosition" />
<preso:MaskeePositioned id="maskeePosition" />
<preso:CorrectMasking id="correctMask" />
<preso:PerspectiveProjectionDraggable id="projectionCenterTest" />
<preso:FIeldOfView id="fieldOfView" />
<preso:FocalLength id="focalLenght" />
<preso:SimpleRotation id="simpleRotation" />
<preso:PanelTest id="panelTest"/>
</mx:ViewStack>
</mx:Application>