{"id":1288,"date":"2012-03-12T22:47:28","date_gmt":"2012-03-12T14:47:28","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/2341\/2012\/03\/12\/flash-as3-%e4%bb%a5%e5%a4%96%e9%83%a8-as-%e6%aa%94%e5%91%bc%e5%8f%ab%e5%85%83%e4%bb%b6%e5%ba%ab%e8%a3%a1%e7%9a%84%e5%bd%b1%e7%89%87%e7%89%87%e6%ae%b5\/"},"modified":"2012-03-12T22:47:28","modified_gmt":"2012-03-12T14:47:28","slug":"flash-as3-%e4%bb%a5%e5%a4%96%e9%83%a8-as-%e6%aa%94%e5%91%bc%e5%8f%ab%e5%85%83%e4%bb%b6%e5%ba%ab%e8%a3%a1%e7%9a%84%e5%bd%b1%e7%89%87%e7%89%87%e6%ae%b5","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/2341\/2012\/03\/12\/flash-as3-%e4%bb%a5%e5%a4%96%e9%83%a8-as-%e6%aa%94%e5%91%bc%e5%8f%ab%e5%85%83%e4%bb%b6%e5%ba%ab%e8%a3%a1%e7%9a%84%e5%bd%b1%e7%89%87%e7%89%87%e6%ae%b5\/","title":{"rendered":"[Flash AS3] \u4ee5\u5916\u90e8 as \u6a94\u547c\u53eb\u5143\u4ef6\u5eab\u88e1\u7684\u5f71\u7247\u7247\u6bb5"},"content":{"rendered":"<p>Actionscript 3\u00a0\u7269\u4ef6\u5c0e\u5411\u7684\u597d\u8655\u4e4b\u4e00\uff0c\u662f\u5c07\u7a0b\u5f0f\u78bc\u5beb\u5728\u5916\u90e8\u6587\u4ef6\u4e2d\uff0c\u5927\u90e8\u4efd\u7684\u66f8\u85c9\u90fd\u662f\u5beb\u5728\u5f71\u683c\u88e1\u505a\u4ecb\u7d39\u3002\u592a\u4e45\u6c92\u7df4\u7fd2\u6703\u5fd8\u8a18\u9019\u7c21\u55ae\u7684\u6b65\u9a5f\uff0c\u5728\u6b64\u505a\u4e9b\u8a18\u9304\u3002<\/p>\n<p>\u9996\u5148\uff0c\u5efa\u7acb\u4e00\u500b\u7a7a\u767d\u7684 abc.fla\u00a0\u6a94\u6848\uff0c\u4e26\u5728\u5c6c\u6027\u88e1\u7684\u985e\u5225\u547d\u540d Abc\u3002\u9019\u6642\u5019\u53e6\u5916\u65b0\u589e\u4e00\u500b Abc.as\u00a0\u7684\u6a94\u6848(\u901a\u5e38 as\u00a0\u985e\u5225\u6a94\u7684\u7b2c\u4e00\u500b\u5b57\u6bcd\u7fd2\u6163\u7528\u5927\u5beb)\u3002\u7136\u5f8c\u5728\u88e1\u9762\u8f38\u5165\u4ee5\u4e0b\u7a0b\u5f0f\u78bc\uff1a<\/p>\n<pre style=\"color: #000000; background: #f1f0f0;\"><span style=\"color: #400000; font-weight: bold;\">package<\/span> \n<span style=\"color: #806030;\">{<\/span>\n    <span style=\"color: #400000; font-weight: bold;\">import<\/span> flash<span style=\"color: #806030;\">.<\/span>display<span style=\"color: #806030;\">.<\/span>MovieClip<span style=\"color: #806030;\">;<\/span>\n    <span style=\"color: #400000; font-weight: bold;\">public<\/span> <span style=\"color: #400000; font-weight: bold;\">class<\/span> Abc <span style=\"color: #400000; font-weight: bold;\">extends<\/span> MovieClip\n    <span style=\"color: #806030;\">{<\/span>\n        <span style=\"color: #400000; font-weight: bold;\">private<\/span> <span style=\"color: #400000; font-weight: bold;\">var<\/span> blankk<span style=\"color: #806030;\">:<\/span>Blankk <span style=\"color: #806030;\">=<\/span> <span style=\"color: #400000; font-weight: bold;\">new<\/span> Blankk()  <span style=\"color: #806030;\">;<\/span>\n        <span style=\"color: #400000; font-weight: bold;\">public<\/span> function Abc(<span style=\"color: #806030;\">)<\/span>\n        <span style=\"color: #806030;\">{<\/span>\n            addChild<span style=\"color: #806030;\">(<\/span>blankk<span style=\"color: #806030;\">)<\/span><span style=\"color: #806030;\">;<\/span>\n        <span style=\"color: #806030;\">}<\/span>\n    <span style=\"color: #806030;\">}<\/span>\n<span style=\"color: #806030;\">}<\/span>\n<\/pre>\n<p>[@more@]<\/p>\n<p>\u53ea\u8981\u57f7\u884c abc.fla\u00a0\u767c\u4f48\u7684 abc.swf\u00a0\u6a94\uff0c\u7b49\u65bc\u57f7\u884c abc.fla + Abc.as\u00a0\u9019\u5169\u500b\u6a94\u6848\u3002\u4e5f\u5c31\u662f\u8aaa\uff0cabc.fla\u00a0\u6703\u81ea\u52d5\u547c\u53eb Abc.as\u00a0\u88e1\u9762\u7684 function Abc()\u00a0\u88e1\u9762\u7a0b\u5f0f\u3002<\/p>\n<p>\u5047\u8a2d\u5143\u4ef6\u5eab\u88e1\u5df2\u65b0\u589e\u4e00\u500b\u9ed1\u8272\u7684\u65b9\u584a\uff0c\u540d\u7a31\u70ba blankk\uff0c\u540c\u6642\u6307\u5b9a\u5176\u985e\u5225\u70ba Blankk\uff0c\u9019\u6a23\u5c31\u53ef\u4ee5\u5728 abc.swf\u00a0\u4e2d\u7684\u5de6\u4e0a\u89d2\u51fa\u73fe\u4e00\u500b\u9ed1\u8272\u7684\u65b9\u584a\u4e86\u3002\u4e5f\u53ef\u4ee5\u53e6\u5916\u8a2d\u5b9a\u4e00\u500b Blankk.as\u00a0\u7684\u6a94\u6848\uff0c\u63a7\u5236 blankk \u5143\u4ef6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Actionscript 3\u00a0\u7269\u4ef6\u5c0e\u5411\u7684\u597d\u8655\u4e4b\u4e00\uff0c\u662f\u5c07\u7a0b\u5f0f\u78bc\u5beb\u5728\u5916\u90e8\u6587\u4ef6\u4e2d\uff0c\u5927\u90e8\u4efd\u7684\u66f8\u85c9\u90fd\u662f\u5beb\u5728\u5f71\u683c\u88e1\u505a\u4ecb\u7d39\u3002&#8230; &raquo; <a class=\"read-more-link\" href=\"https:\/\/2blog.ilc.edu.tw\/2341\/2012\/03\/12\/flash-as3-%e4%bb%a5%e5%a4%96%e9%83%a8-as-%e6%aa%94%e5%91%bc%e5%8f%ab%e5%85%83%e4%bb%b6%e5%ba%ab%e8%a3%a1%e7%9a%84%e5%bd%b1%e7%89%87%e7%89%87%e6%ae%b5\/\">\u95b1\u8b80\u5168\u6587<\/a><\/p>\n","protected":false},"author":76,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38],"tags":[],"class_list":["post-1288","post","type-post","status-publish","format-standard","hentry","category-c-50711"],"meta_key":{"lt_post_id":["266450"],"_jetpack_related_posts_cache":["a:1:{s:32:\"8f6677c9d6b0f903e98ad32ec61f8deb\";a:2:{s:7:\"expires\";i:1579243716;s:7:\"payload\";a:0:{}}}"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/posts\/1288"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/users\/76"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/comments?post=1288"}],"version-history":[{"count":0,"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/posts\/1288\/revisions"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/media?parent=1288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/categories?post=1288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/tags?post=1288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}