In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: UMap ってBitmapDataに撮れないんだね。クロスドメインか...

Get Adobe Flash player
by 9re 19 Nov 2009
/**
 * 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()
        }
    }
}