Test load "Terrain LOD" Alternativa3D library classes/app remotely
Test load "Terrain LOD" Alternativa3D library classes/app remotely
Test to load Alternative3D editor application, classes and objects remotely.
Use TAB to toggle debug mode to view wireframe of Terrain LOD and dynamic bsp invalidation.
You can paint textures on terrain too!
♥0 |
Line 26 |
Modified 2012-10-23 16:11:46 |
MIT License
archived:2017-03-10 09:43:28
ActionScript3 source code
/**
* Copyright Glidias ( http://wonderfl.net/user/Glidias )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/d3Cl
*/
package {
import flash.system.LoaderContext;
import flash.net.*;
import flash.display.*;
import flash.events.*;
import flash.system.SecurityDomain;
import alternativ7.engine3d.core.Object3D;
/**
* Test load "Terrain LOD" Alternativa3D library classes/app remotely
*/
public class Main extends Sprite {
public function Main() {
// write as3 code here..
var loader:Loader = new Loader();
addChild(loader); // comment alway to NOT start application.
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
loader.load( new URLRequest("http://glidias.freehostia.com/terrainclip_items.swf?axbbbaa"),
new LoaderContext(true, null, SecurityDomain.currentDomain ));
//
}
private function onLoadComplete(e:Event):void {
var loaderInfo:LoaderInfo = (e.currentTarget as LoaderInfo);
if (loaderInfo.content.parent == null) return;
var classe:Class = loaderInfo.applicationDomain.getDefinition("huachi.objects.Apple") as Class;
var untyped:* = loaderInfo.content;
var obj:Object3D = new classe();
obj.z = 1600;
untyped.addItem( obj);
}
}
}