{"id":549,"date":"2008-10-04T19:36:39","date_gmt":"2008-10-04T10:36:39","guid":{"rendered":"http:\/\/clockmaker.jp\/blog\/?p=549"},"modified":"2008-10-04T19:36:39","modified_gmt":"2008-10-04T10:36:39","slug":"astro_filereference","status":"publish","type":"post","link":"https:\/\/clockmaker.jp\/blog\/2008\/10\/astro_filereference\/","title":{"rendered":"Flash Player 10\u3067PV3D\u4e0a\u306e\u843d\u66f8\u304d\u3092\u4fdd\u5b58\u3057\u3066\u307f\u308b"},"content":{"rendered":"<p class=\"photo\"><a href=\"http:\/\/clockmaker.jp\/labs\/081004_astro_3d\/bin\/\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/clockmaker.jp\/blog\/wp-content\/uploads\/2008\/10\/081004_paint_01.jpg\" alt=\"papervision3d\u4e0a\u3067\u843d\u66f8\u304d\u3057\u3066\u307f\u308b\" width=\"460\" height=\"200\" \/><\/a><\/p>\n<p>\u6700\u8fd1\u306f\u672c\u696d\u3067\u306a\u304b\u306a\u304b\u5fd9\u3057\u304b\u3063\u305f\u306e\u3067\u4e45\u3057\u3076\u308a\u306e\u6295\u7a3f\u3067\u3059\u3002\u305d\u308d\u305d\u308dFlash Player 10(Astro)\u306e\u52c9\u5f37\u3082\u518d\u958b\u3057\u306a\u3051\u308c\u3070\u3068\u601d\u3044\u3001\u65b0\u3057\u304f\u306a\u3063\u305fFileReference\u3092\u984c\u6750\u306b\u30b5\u30f3\u30d7\u30eb\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002PV3D\u4e0a\u3067\u843d\u66f8\u304d\u3057\u305f\u30c6\u30af\u30b9\u30c1\u30e3\u3092\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u5b58\u3057\u305f\u308a\u3001\u518d\u5ea6\u8aad\u307f\u8fbc\u3093\u3067\u518d\u7de8\u96c6\u3082\u3067\u304d\u308b\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<\/p>\n<ul>\n<li><a href=\"\/labs\/081004_astro_3d\/bin\/\">demo<\/a> (require <a href=\"http:\/\/labs.adobe.com\/technologies\/flashplayer10\/\">Flash Player 10<\/a>)<\/li>\n<li>src\n<ul>\n<li><a href=\"\/labs\/081004_astro_3d\/src\/Main.mxml\">Main.mxml<\/a><\/li>\n<li><a href=\"\/labs\/081004_astro_3d\/src\/World.txt\">World.as<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u4ed5\u69d8\u3068\u3057\u3066\u6a2a1000x\u7e26500px\u306e\u753b\u50cf\u3067\u3074\u3063\u305f\u308a\u7403\u9762\u306b\u5f35\u308a\u4ed8\u304d\u307e\u3059\u3002<a href=\"http:\/\/planetpixelemporium.com\/earth.html\">Planet Earth Texture Maps<\/a>\u306e\u4f4e\u89e3\u50cf\u5ea6\u306e\u753b\u50cf(\u30d5\u30ea\u30fc)\u304c\u304a\u52e7\u3081\u3067\u3001\u3053\u308c\u3092\u4f7f\u3046\u3068\u5730\u7403\u5100\u306b\u843d\u66f8\u304d\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<h3>FileReference.load\u3067\u753b\u50cf\u3092\u8aad\u307f\u8fbc\u3080<\/h3>\n<p>\u65b0\u3057\u304f\u306a\u3063\u305fFileReference\u3067\u306f\u30ed\u30fc\u30ab\u30eb\u3067\u9078\u629e\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u76f4\u63a5Flash Player\u306b\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u5f93\u6765\u306e\u30d0\u30fc\u30b8\u30e7\u30f39\u307e\u3067\u306e\u30d7\u30ec\u30a4\u30e4\u30fc\u3067\u306f\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u306e\u76f4\u63a5\u8aad\u307f\u8fbc\u307f\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fc\u4e0a\u5bfe\u5fdc\u3057\u3066\u304a\u3089\u305a\u3001\u4e00\u5ea6\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u3092\u7d4c\u7531\u3057\u3066\u8aad\u307f\u8fbc\u3080\u9762\u5012\u306a\u624b\u9806\u304c\u5fc5\u8981\u3067\u3057\u305f\u3002<\/p>\n<p>\u305d\u3093\u306a\u4fbf\u5229\u306b\u306a\u3063\u305fFileReference\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3002<\/p>\n<ul>\n<li>(1)\u30d5\u30a1\u30a4\u30eb\u30d6\u30e9\u30a6\u30ba\u3092\u547c\u3073\u51fa\u3059<\/li>\n<li>(2)Event.SELECT\u306e\u30a4\u30d9\u30f3\u30c8\u5185\u3067load\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059<\/li>\n<li>(3)Event.COMPLETE\u306e\u30a4\u30d9\u30f3\u30c8\u5185\u3067Loader\u3067\u753b\u50cf\u5909\u63db\u3059\u308b(\u8aad\u307f\u8fbc\u307e\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u30d0\u30a4\u30ca\u30ea\u306a\u306e\u3067Loader.loadBytes\u3092\u4f7f\u3063\u3066\u753b\u50cf\u5909\u63db\u3059\u308b)<\/li>\n<li>(4)Loader.contentLoaderInfo\u306eEvent.INIT\u5185\u3067\u753b\u50cf\u306e\u30b5\u30a4\u30ba\u53d6\u5f97\u3084BitmapData\u8aad\u307f\u8fbc\u307f\u304c\u3067\u304d\u308b<\/li>\n<\/ul>\n<p><strong>\u30b9\u30c6\u30c3\u30d7(1)(2)<\/strong><\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nprivate function loadImage():void\n{\n\u00a0\u00a0\u00a0 fl = new FileReference();\n\u00a0\u00a0\u00a0 fl.addEventListener(Event.SELECT, function(e:Event):void { FileReference(e.target).load(); } );\n\u00a0\u00a0\u00a0 fl.addEventListener(Event.COMPLETE, loadCompleteHandler);\n\u00a0\u00a0\u00a0 fl.browse();\n}\n<\/pre>\n<p><strong>\u30b9\u30c6\u30c3\u30d7(3)<\/strong><\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nprivate function loadCompleteHandler(e:Event):void\n{\n\u00a0\u00a0\u00a0 loader = new Loader();\n\u00a0\u00a0\u00a0 loader.contentLoaderInfo.addEventListener(Event.INIT, initImage);\n\u00a0\u00a0\u00a0 loader.loadBytes(FileReference(e.target).data);\n}\n<\/pre>\n<p>\u30b9\u30c6\u30c3\u30d7(4)<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nprivate function initImage(e:Event):void\n{\n\u00a0\u00a0\u00a0 trace(Bitmap(loader.content).bitmapData);\n}\n<\/pre>\n<p>\u3061\u306a\u307f\u306b\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u30a4\u30d9\u30f3\u30c8\u5185\u3067\u306a\u3044\u3068FileReference\u304c\u8d77\u52d5\u3057\u306a\u3044\u6761\u4ef6\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<h3>FileReference.save\u3067\u753b\u50cf\u3092\u4fdd\u5b58\u3059\u308b<\/h3>\n<p>\u753b\u50cf\u3092\u4fdd\u5b58\u3059\u308b\u307b\u3046\u306f\u8aad\u307f\u8fbc\u3080\u306e\u306b\u5bfe\u3057\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u3002\u624b\u9806\u3068\u3057\u3066\u306f\u4ee5\u4e0b\u306e3\u30b9\u30c6\u30c3\u30d7\u3002<\/p>\n<ul>\n<li>(1)BitmapData\u3067\u30ad\u30e3\u30d7\u30c1\u30e3\u3092\u3068\u308b<\/li>\n<li>(2)<a href=\"http:\/\/www.adobe.us\/livedocs\/flex\/3_jp\/langref\/mx\/graphics\/codec\/PNGEncoder.html\">PNGEncoder<\/a>\u3092\u4f7f\u3063\u3066BitmapData\u3092\u753b\u50cf\u30d0\u30a4\u30ca\u30ea\u306b\u5909\u63db\u3059\u308b<\/li>\n<li>(3)FileReference.save\u3067\u4fdd\u5b58\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059<\/li>\n<\/ul>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nvar capture:BitmapData = new BitmapData(world.texture.width, world.texture.height, true, 0x00000000);\ncapture.draw(world.texture);\n\nvar encoder:PNGEncoder = new PNGEncoder();\nvar byteArray:ByteArray = encoder.encode(capture);\n\nfl = new FileReference();\nfl.save(byteArray, &quot;astro_image.png&quot;);\n<\/pre>\n<h3>Papervision3D\u4e0a\u3067\u843d\u66f8\u304d\u3059\u308b<\/h3>\n<p>SVN\u3067\u843d\u3068\u3057\u305fPapervision3D AS3\u306eExsamples\u306e\u4e2d\u306b\u7403\u9762\u306b\u843d\u66f8\u304d\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u304c\u3042\u3063\u305f\u306e\u3067\u305d\u308c\u3092\u6539\u826f\u3057\u3066\u5229\u7528\u3002\u3053\u3061\u3089\u306f<a href=\"http:\/\/blog.r3c7.net\/?p=92\">note.x\u5148\u751f\u306e\u30d6\u30ed\u30b0<\/a>\u3067\u30bd\u30fc\u30b9\u3064\u304d\u3067\u89e3\u8aac\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u53c2\u8003\u306b\u306a\u308b\u304b\u3082\u3002<\/p>\n<p><a href=\"https:\/\/clockmaker.jp\/blog\/wp-content\/uploads\/2008\/10\/081004_paint_02.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-552\" title=\"Flash\u4e0a\u30673D\u306b\u843d\u66f8\u304d\" src=\"https:\/\/clockmaker.jp\/blog\/wp-content\/uploads\/2008\/10\/081004_paint_02-460x345.jpg\" alt=\"\" width=\"460\" height=\"345\" \/><\/a><\/p>\n<h3>\u30c6\u30af\u30b9\u30c1\u30e3\u3092\u8aad\u307f\u8fbc\u307f\u3001\u4fdd\u5b58\u306e\u5bfe\u8c61\u306b<\/h3>\n<p>\u30dd\u30a4\u30f3\u30c8\u306fMovieMaterial\u3067\u30c6\u30af\u30b9\u30c1\u30e3\u3092\u4f5c\u6210\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3059\u3002MovieMaterial.movie\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u3092\u4f7f\u3048\u3070\u30c6\u30af\u30b9\u30c1\u30e3\u306e\u5143\u3068\u306a\u308bMovieClip\u306e\u53c2\u7167\u304c\u3068\u308c\u308b\u306e\u3067\u3001\u305d\u308c\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u306e\u5bfe\u8c61\u306b\u3057\u307e\u3059\u3002\u3061\u306a\u307f\u306b\u4fdd\u5b58\u3057\u305f\u753b\u50cf\u306f\u3053\u3093\u306a\u611f\u3058\u3002\u3053\u308c\u3092\u518d\u5ea6\u8aad\u307f\u8fbc\u3081\u3070\u518d\u7de8\u96c6\u304c\u3044\u304f\u3089\u3067\u3082\u3067\u304d\u307e\u3059\u304cPNG\u306e\u30ed\u30b9\u30ec\u30b9\u5727\u7e2e\u306a\u306e\u3067\u753b\u50cf\u52a3\u5316\u304c\u306a\u3044\u3068\u3053\u308d\u304c\u30df\u30bd\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/clockmaker.jp\/blog\/wp-content\/uploads\/2008\/10\/081004_paint_03.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-553\" title=\"Astro\u306e\u6a5f\u80fd\u3067\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u8fbc\u307f\u30fb\u4fdd\u5b58\u3082\u3067\u304d\u307e\u3059\" src=\"https:\/\/clockmaker.jp\/blog\/wp-content\/uploads\/2008\/10\/081004_paint_03-460x229.jpg\" alt=\"\" width=\"460\" height=\"229\" \/><\/a><\/p>\n<h3>MXML\u3067PV3D\u3092\u52d5\u304b\u3059<\/h3>\n<p>\u672c\u984c\u3068\u306f\u76f4\u63a5\u95a2\u4fc2\u3042\u308a\u307e\u305b\u3093\u304c\u3001Flex\u4e0a\u3067Papervision3D\u3092\u52d5\u304b\u3057\u3066\u307f\u307e\u3057\u305f\u3002Flex\u3067DisplayObject\u3092\u7d99\u627f\u3057\u305fAS\u30af\u30e9\u30b9\u3092\u3069\u3046\u3084\u3063\u3066\u52d5\u304b\u3059\u306e\u304b\u308f\u304b\u3089\u305a\u306b\u3044\u305f\u306e\u3067\u3059\u304c\u3001<a href=\"http:\/\/d.hatena.ne.jp\/haru-komugi\/searchdiary?word=%2a%5bPapervision3D%5d\">haru-komugi\u3055\u3093<\/a>\u306e\u30bd\u30fc\u30b9\u3067\u7121\u4e8b\u89e3\u6c7a\u3002\u65b9\u6cd5\u306fmx:Image\u306baddChild\u3059\u308b\u3060\u3051\u3067\u3059\u3002Flex\u306f\u4fbf\u5229\u306a\u5236\u5fa1\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u5909\u66f4\u3059\u308b\u3088\u3046\u306a\u30b5\u30f3\u30d7\u30eb\u3092\u4f5c\u308b\u3068\u304d\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<h3>\u53c2\u8003\u8a18\u4e8b<\/h3>\n<ul>\n<li><a href=\"http:\/\/blog.boreal-kiss.com\/2008\/10\/02173100.html\">[AIR] Mac\u3068Windows\u3067\u753b\u50cf\u30c9\u30e9\u30c3\u30b0&amp;\u30c9\u30ed\u30c3\u30d7\u306e\u6319\u52d5\u304c\u9055\u3046 : boreal-kiss.com<\/a><\/li>\n<li><a href=\"http:\/\/blog.boreal-kiss.com\/2008\/05\/27014850.html\">FileReference.load\u3067\u753b\u50cf\u3092\u8aad\u307f\u8fbc\u3080\u3068\u30a4\u30e1\u30fc\u30b8\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u308f\u304b\u3089\u305a\u8d85\u4e0d\u4fbf(\u89e3\u6c7a\u6e08\u307f) : boreal-kiss.com<\/a><\/li>\n<li><a href=\"http:\/\/rx8.cocolog-nifty.com\/blog\/2008\/05\/flashplayer10_3b20.html\">FLASH+\u03b1: FlashPlayer10 \u30ed\u30fc\u30ab\u30eb\u306e\u753b\u50cf\u3092\u8aad\u307f\u8fbc\u307f\u2192\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30eb\u30bf\u2192\u5225\u540d\u4fdd\u5b58<\/a><\/li>\n<li><a href=\"http:\/\/blog.hi-farm.net\/2008\/06\/26\/astro-filereference-astro%E3%81%A7%E3%81%AEfilereference\/\">Hi-farm blog \u00bb Blog Archive \u00bb [astro filereference] astro\u3067\u306eFileReference<\/a><\/li>\n<\/ul>\n<h3>\u95a2\u9023\u8a18\u4e8b<\/h3>\n<ul>\n<li><a href=\"https:\/\/clockmaker.jp\/blog\/2008\/10\/flex_datagrid\/\" title=\"\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u304c\u7de8\u96c6\u3067\u304d\u308bFlex\u88fd\u306e\u8868\u8a08\u7b97\u30a2\u30d7\u30ea\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f | ClockMaker Blog\">\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u304c\u7de8\u96c6\u3067\u304d\u308bFlex\u88fd\u306e\u8868\u8a08\u7b97\u30a2\u30d7\u30ea\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u306f\u672c\u696d\u3067\u306a\u304b\u306a\u304b\u5fd9\u3057\u304b\u3063\u305f\u306e\u3067\u4e45\u3057\u3076\u308a\u306e\u6295\u7a3f\u3067\u3059\u3002\u305d\u308d\u305d\u308dFlash Player 10(Astro)\u306e\u52c9\u5f37\u3082\u518d\u958b\u3057\u306a\u3051\u308c\u3070\u3068\u601d\u3044\u3001\u65b0\u3057\u304f\u306a\u3063\u305fFileReference\u3092\u984c\u6750\u306b\u30b5\u30f3\u30d7\u30eb\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002PV3D\u4e0a\u3067 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,4],"tags":[],"_links":{"self":[{"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/posts\/549"}],"collection":[{"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/comments?post=549"}],"version-history":[{"count":0,"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/posts\/549\/revisions"}],"wp:attachment":[{"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/media?parent=549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/categories?post=549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clockmaker.jp\/blog\/wp-json\/wp\/v2\/tags?post=549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}