Title: Flex3 example
Here is a simple demo of using one of the examples here in a Flex app.
XML:
-
<?xml version="1.0"?>
-
/**
-
v0.1 code by dehash.com 2008
-
Released as open source under the BSD License http://www.opensource.org/licenses/bsd-license.php
-
*/
-
-
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="0xFFFFFF" paddingTop="4" paddingBottom="4" paddingLeft="4" paddingRight="4" creationComplete="init()">
-
-
<mx:Script>
-
<![CDATA[
-
import com.dehash.pv3d.examples.interactivity.InteractivePlanesBoard;
-
import flash.events.Event;
-
import mx.core.UIComponent;
-
-
private var holder:UIComponent;
-
private var board:InteractivePlanesBoard;
-
-
private function init():void{
-
holder = new UIComponent();
-
board = new InteractivePlanesBoard();
-
holder.addChild(board);
-
board.x = -300;
-
pv3d.addChild(holder);
-
}
-
-
private function moveHolder():void {
-
holder.x = moveHolderSlider.value;
-
}
-
]]>
-
</mx:Script>
-
-
<mx:VBox>
-
-
<mx:Box id="pv3d"/>
-
-
<mx:HSlider minimum="-400" maximum="400" value="0" id="moveHolderSlider" liveDragging="true" dataTipPlacement="top" tickColor="black" tickInterval="50" labels="['-400',0,'400']" allowTrackClick="true" change="moveHolder()" />
-
-
</mx:VBox>
-
-
</mx:Application>