forked from: UMap ってBitmapDataに撮れないんだね。クロスドメインか...
/**
* Copyright 9re ( http://wonderfl.net/user/9re )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/mTXR
*/
// forked from clockmaker's UMap ってBitmapDataに撮れないんだね。クロスドメインか...
// forked from mash's UMap AS3 test
package {
import flash.display.Sprite;
import com.afcomponents.umap.core.UMap;
import com.afcomponents.umap.types.LatLng;
import org.papervision3d.view.*
import org.papervision3d.materials.*
import org.papervision3d.objects.primitives.*
import flash.display.*
import flash.events.*
import flash.system.Security;
public class UMapAS3Test extends BasicView{
public function UMapAS3Test() {
// 力技ww
Security.loadPolicyFile("http://ecn.t0.tiles.virtualearth.net/crossdomain.xml");
Security.loadPolicyFile("http://ecn.t1.tiles.virtualearth.net/crossdomain.xml");
Security.loadPolicyFile("http://ecn.t2.tiles.virtualearth.net/crossdomain.xml");
Security.loadPolicyFile("http://ecn.t3.tiles.virtualearth.net/crossdomain.xml");
var umap :UMap = new UMap;
umap.setSize(465,465);
umap.setCenter(new LatLng(35,135), 1);
addChildAt( umap, 0 );
var b:BitmapData = new BitmapData(465,465)
var m:BitmapMaterial = new BitmapMaterial(b)
var s:Sphere = new Sphere(m, 300, 80, 80)
scene.addChild(s)
addEventListener(Event.ENTER_FRAME, function():void{
//try{
b.draw(umap) // だめ?
// }catch(e:Error){trace(e)}
s.yaw(1)
})
startRendering()
}
}
}