lookat blog: http://www.nascom.be/404/fp10-3d-features-partii-z-sorting-truly-simple-shader-nested-perspective
import mx.collections.ArrayCollection;
import be.nascom.flex.component.FlexSimpleTraceBox;
import be.nascom.flash.component.SimpleStatsView;
import be.nascom.flash10_tests.*;//yeah yeah yeah, NO WILDCARD IMPORTS?! OMG?! this is not a mission critical app simultaniously developed by a 1000 rocket scientists ;)
[Embed (source="graphic-player-10-cube-assets-nascom.png")]
private var NascomLogo:Class;
//create a new test in be.nascom.flash10_tests, and add to this array collection
[Bindable]
public var tests_list:ArrayCollection=new ArrayCollection( [
{name:"1) Rotation3dBehaviour",test_class:Rotation3dBehaviour},
{name:"2) Performance3dTest1",test_class:Performance3dTest1},
{name:"3) CubeTest",test_class:CubeTest},
{name:"4) CubeTestZsorting",test_class:CubeTestZsorting},
{name:"5) NestedPerspectiveTest",test_class:NestedPerspectiveTest},
{name:"6) CubeCheapShading",test_class:CubeCheapShading}
]);
public var current_test:AbstractFP10Test;
public function init():void{
//FlexSimpleTraceBox.
var s:SimpleStatsView=new SimpleStatsView(0xFFFFFF,0xB3191E);
stats_holder.addChild(s);
}
public function runTest():void{
//remove previous test
//it's up to the developer of the test to ensure that IFlashTest.destroy() cleans up shop properly
if(current_test!=null){
current_test.destroy();
removeChild(current_test);
}
current_test_label.text=tests_cb.selectedItem.name;
var test_class:Class=tests_cb.selectedItem.test_class;
current_test=new test_class();
addChild(current_test);
current_test.y=140;
current_test.run();
notes.htmlText=current_test.getNotes();
}
]]>