flash on 2010-4-14

by kihon
♥0 | Line 22 | Modified 2010-04-14 01:30:13 | MIT License
play

ActionScript3 source code

/**
 * Copyright kihon ( http://wonderfl.net/user/kihon )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/ohtd
 */

package
{
	import flash.system.Security;
	import org.papervision3d.materials.BitmapFileMaterial;
	import org.papervision3d.materials.utils.MaterialsList;
	import org.papervision3d.objects.primitives.Cube;
	import org.papervision3d.view.*;
	import org.papervision3d.cameras.CameraType;
 
	[SWF(backgroundColor = "0x0")]
	public class Main extends BasicView
	{
		public function Main()
		{	
			super(640, 480, true, false, CameraType.DEBUG);
 
			Security.loadPolicyFile("http://farm1.static.flickr.com/crossdomain.xml");
			var material:BitmapFileMaterial = new BitmapFileMaterial("http://farm1.static.flickr.com/35/114088387_759a19e59a.jpg");
			var cube:Cube = new Cube(new MaterialsList( { all:material } ));
 
			scene.addChild(cube);
 
			startRendering();
		}
	}
}