{"id":1286,"date":"2012-03-11T15:03:17","date_gmt":"2012-03-11T07:03:17","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/2341\/2012\/03\/11\/flash-as3-%e6%8c%89%e9%88%95%e6%97%8b%e8%bd%89%e7%89%a9%e4%bb%b6\/"},"modified":"2021-03-18T19:41:42","modified_gmt":"2021-03-18T11:41:42","slug":"flash-as3-%e6%8c%89%e9%88%95%e6%97%8b%e8%bd%89%e7%89%a9%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/2341\/2012\/03\/11\/flash-as3-%e6%8c%89%e9%88%95%e6%97%8b%e8%bd%89%e7%89%a9%e4%bb%b6\/","title":{"rendered":"[Flash As3] \u6309\u9215\u65cb\u8f49\u7269\u4ef6"},"content":{"rendered":"<p> \u00a0<\/p>\n<p>[@more@]<\/p>\n<div class=\"actionscript3\" style=\"font-family: monospace;color: #006;border: 1px solid #d0d0d0;background-color: #f0f0f0\">\n<ol>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\">setSquare<span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">addEventListener<\/span><span style=\"color: #000000\">(<\/span><a href=\"http:\/\/www.google.com\/search?q=mouseevent%20inurl:http:\/\/livedocs.adobe.com\/flex\/201\/langref\/%20inurl:mouseevent.html\"><span style=\"color: #004993\">MouseEvent<\/span><\/a><span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">MOUSE_DOWN<\/span><span style=\"color: #000066;font-weight: bold\">,<\/span> StartMove<span style=\"color: #000000\">)<\/span><span style=\"color: #000066;font-weight: bold\">;<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\">setSquare<span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">addEventListener<\/span><span style=\"color: #000000\">(<\/span><a href=\"http:\/\/www.google.com\/search?q=mouseevent%20inurl:http:\/\/livedocs.adobe.com\/flex\/201\/langref\/%20inurl:mouseevent.html\"><span style=\"color: #004993\">MouseEvent<\/span><\/a><span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">MOUSE_UP<\/span><span style=\"color: #000066;font-weight: bold\">,<\/span> StopMove<span style=\"color: #000000\">)<\/span><span style=\"color: #000066;font-weight: bold\">;<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\">rotation_btn<span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">addEventListener<\/span><span style=\"color: #000000\">(<\/span><a href=\"http:\/\/www.google.com\/search?q=mouseevent%20inurl:http:\/\/livedocs.adobe.com\/flex\/201\/langref\/%20inurl:mouseevent.html\"><span style=\"color: #004993\">MouseEvent<\/span><\/a><span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">MOUSE_DOWN<\/span><span style=\"color: #000066;font-weight: bold\">,<\/span> StartRotation<span style=\"color: #000000\">)<\/span><span style=\"color: #000066;font-weight: bold\">;<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\">rotation_btn<span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">addEventListener<\/span><span style=\"color: #000000\">(<\/span><a href=\"http:\/\/www.google.com\/search?q=mouseevent%20inurl:http:\/\/livedocs.adobe.com\/flex\/201\/langref\/%20inurl:mouseevent.html\"><span style=\"color: #004993\">MouseEvent<\/span><\/a><span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">MOUSE_UP<\/span><span style=\"color: #000066;font-weight: bold\">,<\/span> StopRotation<span style=\"color: #000000\">)<\/span><span style=\"color: #000066;font-weight: bold\">;<\/span><\/div>\n<\/li>\n<li style=\"font-weight: bold;vertical-align: top;color: #006060\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #339966;font-weight: bold\">function<\/span> StartMove<span style=\"color: #000000\">(<\/span>event<span style=\"color: #000066;font-weight: bold\">:<\/span><a href=\"http:\/\/www.google.com\/search?q=mouseevent%20inurl:http:\/\/livedocs.adobe.com\/flex\/201\/langref\/%20inurl:mouseevent.html\"><span style=\"color: #004993\">MouseEvent<\/span><\/a><span style=\"color: #000000\">)<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #000000\">{<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\">\u00a0 \u00a0 setSquare<span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">startDrag<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #0033ff;font-weight: bold\">true<\/span><span style=\"color: #000000\">)<\/span><span style=\"color: #000066;font-weight: bold\">;<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #000000\">}<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #339966;font-weight: bold\">function<\/span> StopMove<span style=\"color: #000000\">(<\/span>event<span style=\"color: #000066;font-weight: bold\">:<\/span><a href=\"http:\/\/www.google.com\/search?q=mouseevent%20inurl:http:\/\/livedocs.adobe.com\/flex\/201\/langref\/%20inurl:mouseevent.html\"><span style=\"color: #004993\">MouseEvent<\/span><\/a><span style=\"color: #000000\">)<\/span><\/div>\n<\/li>\n<li style=\"font-weight: bold;vertical-align: top;color: #006060\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #000000\">{<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\">\u00a0 \u00a0 setSquare<span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">stopDrag<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #000000\">)<\/span><span style=\"color: #000066;font-weight: bold\">;<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #000000\">}<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #009900;font-style: italic\">\/\/&#22914;&#26524;&#28369;&#40736;&#25353;&#19979;&#25353;&#37397;&#65292;&#23601;&#38283;&#22987;&#26059;&#36681;<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #339966;font-weight: bold\">function<\/span> StartRotation<span style=\"color: #000000\">(<\/span>event<span style=\"color: #000066;font-weight: bold\">:<\/span><a href=\"http:\/\/www.google.com\/search?q=mouseevent%20inurl:http:\/\/livedocs.adobe.com\/flex\/201\/langref\/%20inurl:mouseevent.html\"><span style=\"color: #004993\">MouseEvent<\/span><\/a><span style=\"color: #000000\">)<\/span><\/div>\n<\/li>\n<li style=\"font-weight: bold;vertical-align: top;color: #006060\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #000000\">{<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\">\u00a0 \u00a0 <span style=\"color: #004993\">stage<\/span><span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">addEventListener<\/span><span style=\"color: #000000\">(<\/span><a href=\"http:\/\/www.google.com\/search?q=event%20inurl:http:\/\/livedocs.adobe.com\/flex\/201\/langref\/%20inurl:event.html\"><span style=\"color: #004993\">Event<\/span><\/a><span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">ENTER_FRAME<\/span><span style=\"color: #000066;font-weight: bold\">,<\/span>addnum<span style=\"color: #000000\">)<\/span><span style=\"color: #000066;font-weight: bold\">;<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #000000\">}<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #009900;font-style: italic\">\/\/&#22686;&#21152;&#26059;&#36681;&#35282;&#24230;<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #339966;font-weight: bold\">function<\/span> addnum<span style=\"color: #000000\">(<\/span>event<span style=\"color: #000066;font-weight: bold\">:<\/span><a href=\"http:\/\/www.google.com\/search?q=event%20inurl:http:\/\/livedocs.adobe.com\/flex\/201\/langref\/%20inurl:event.html\"><span style=\"color: #004993\">Event<\/span><\/a><span style=\"color: #000000\">)<\/span><span style=\"color: #000066;font-weight: bold\">:<\/span><span style=\"color: #0033ff;font-weight: bold\">void<\/span><\/div>\n<\/li>\n<li style=\"font-weight: bold;vertical-align: top;color: #006060\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #000000\">{<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\">\u00a0 \u00a0 setSquare<span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">rotation<\/span> <span style=\"color: #000066;font-weight: bold\">+<\/span>= \u00a0<span style=\"color: #000000;font-weight: bold\">1<\/span><span style=\"color: #000066;font-weight: bold\">;<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #000000\">}<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #009900;font-style: italic\">\/\/&#28369;&#40736;&#25918;&#38283;&#25353;&#37397;&#26178;&#65292;&#32080;&#26463;&#26059;&#36681;<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #339966;font-weight: bold\">function<\/span> StopRotation<span style=\"color: #000000\">(<\/span>event<span style=\"color: #000066;font-weight: bold\">:<\/span><a href=\"http:\/\/www.google.com\/search?q=mouseevent%20inurl:http:\/\/livedocs.adobe.com\/flex\/201\/langref\/%20inurl:mouseevent.html\"><span style=\"color: #004993\">MouseEvent<\/span><\/a><span style=\"color: #000000\">)<\/span><\/div>\n<\/li>\n<li style=\"font-weight: bold;vertical-align: top;color: #006060\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #000000\">{<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\">\u00a0 \u00a0 <span style=\"color: #004993\">stage<\/span><span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">removeEventListener<\/span><span style=\"color: #000000\">(<\/span><a href=\"http:\/\/www.google.com\/search?q=event%20inurl:http:\/\/livedocs.adobe.com\/flex\/201\/langref\/%20inurl:event.html\"><span style=\"color: #004993\">Event<\/span><\/a><span style=\"color: #000066;font-weight: bold\">.<\/span><span style=\"color: #004993\">ENTER_FRAME<\/span><span style=\"color: #000066;font-weight: bold\">,<\/span>addnum<span style=\"color: #000000\">)<\/span><span style=\"color: #000066;font-weight: bold\">;<\/span><\/div>\n<\/li>\n<li style=\"font-weight: normal;vertical-align: top;font: normal normal 130% 'Courier New', Courier, monospace;color: #003030\">\n<div style=\"font: normal normal 1em\/1.2em monospace;margin: 0;padding: 0;background: none;vertical-align: top;color: #000020\"><span style=\"color: #000000\">}<\/span><\/div>\n<\/li>\n<\/ol>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 [@more@] setSquare.addEventListener(MouseEvent.MOUSE_&#8230; &raquo; <a class=\"read-more-link\" href=\"https:\/\/2blog.ilc.edu.tw\/2341\/2012\/03\/11\/flash-as3-%e6%8c%89%e9%88%95%e6%97%8b%e8%bd%89%e7%89%a9%e4%bb%b6\/\">\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-1286","post","type-post","status-publish","format-standard","hentry","category-c-50711"],"meta_key":{"lt_post_id":["266036"],"_jetpack_related_posts_cache":["a:1:{s:32:\"8f6677c9d6b0f903e98ad32ec61f8deb\";a:2:{s:7:\"expires\";i:1578968715;s:7:\"payload\";a:0:{}}}"],"_pingme":["1"],"_encloseme":["1"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/posts\/1286"}],"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=1286"}],"version-history":[{"count":1,"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/posts\/1286\/revisions"}],"predecessor-version":[{"id":1756,"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/posts\/1286\/revisions\/1756"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/media?parent=1286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/categories?post=1286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/2341\/wp-json\/wp\/v2\/tags?post=1286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}