{"id":320,"date":"2008-06-17T09:16:46","date_gmt":"2008-06-17T00:16:46","guid":{"rendered":"http:\/\/hangunsworld.com\/blog\/?p=320"},"modified":"2008-06-24T12:43:48","modified_gmt":"2008-06-24T03:43:48","slug":"urlnavigator-has-been-modified","status":"publish","type":"post","link":"http:\/\/hangunsworld.com\/blog\/320","title":{"rendered":"URLNavigator has been modified."},"content":{"rendered":"<div class=\"korean\"><a href=\"http:\/\/hangunsworld.com\/classes\/com\/hangunsworld\/net\/URLNavigator\/\">URLNavigator<\/a> \ud074\ub798\uc2a4\ub97c \uc218\uc815\ud558\uc5ec \ub9c1\ud06c \uc774\ub3d9 \ubfd0 \uc544\ub2c8\ub77c, \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8\ub3c4 \uc2e4\ud589\uc774 \uac00\ub2a5\ud558\ub3c4\ub85d \uc218\uc815\ud558\uc600\uc2b5\ub2c8\ub2e4.<br \/>\n\uc544\ub798 \ucf54\ub4dc\uc640 \uac19\uc774 URLNavigator.callJS() \uba54\uc18c\ub4dc\ub97c \ud1b5\ud574\uc11c \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \ud568\uc218\ub97c \ud638\ucd9c \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/div>\n<div class=\"english\">I modified the <a href=\"http:\/\/hangunsworld.com\/classes\/com\/hangunsworld\/net\/URLNavigator\/\">URLNavigator<\/a> class to add calling JavaScript function feature. You can use URLNavigator.callJS() method to call a JavaScript function like this.<\/div>\n<div class=\"japanese\"><a href=\"http:\/\/hangunsworld.com\/classes\/com\/hangunsworld\/net\/URLNavigator\/\">URLNavigator<\/a>\u30af\u30e9\u30b9\u3092\u6539\u3081\u3066JavaScript\u51fd\u6570\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u51fa\u6765\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002\u4e0b\u306e\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306b\u3001URLNavigator.callJS()\u30e1\u30bd\u30c3\u30c9\u3092\u901a\u3058\u3066JavaScript\u51fd\u6570\u3092\u5b9f\u884c\u51fa\u6765\u307e\u3059\u3002<\/div>\n<pre lang=\"actionscript3\" line=\"1\">import com.hangunsworld.net.URLNavigator;\r\nvar un:URLNavigator = new URLNavigator();\r\nun.callJS(\"functionName\");\r\nun.callJS(\"functionName\", param1, param2, ..., paramN);<\/pre>\n<div class=\"korean\">\ub610\ub294 \ub2e4\uc74c\uacfc \uac19\uc774 \ub9c1\ud06c\uc640 \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8\uac00 \ud63c\uc7ac\ub418\uc5b4 \uc788\ub294 \uacbd\uc6b0, URLNavigator.analyze() \uba54\uc18c\ub4dc\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \uacbd\uc6b0 \ud0c0\uac9f\uc774 &#8220;javascript&#8221;\ub85c \uc124\uc815\ub41c \uacbd\uc6b0 \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \ud568\uc218\ub97c \uc2e4\ud589\ud558\uace0, \uc774 \uc678\uc758 \uacbd\uc6b0\uc5d0\ub294 \uc9c0\uc815\ub41c \ub9c1\ud06c\ub85c \uc774\ub3d9\ud569\ub2c8\ub2e4.<\/div>\n<div class=\"english\">If JavaScript calls are mixed with normal links, use URLNavigator.analyze() method. It calls callJS() method, when the target property is set to &#8220;javascript&#8221;, otherwise, it goes to the sepcified link.<\/div>\n<div class=\"japanese\">JavaScript\u30b3\u30eb\u3068\u4e00\u822c\u30ea\u30f3\u30af\u304c\u6df7\u3058\u3063\u3066\u3044\u308b\u5834\u5408\u3001URLNavigator.analyze()\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3048\u307e\u3059\u3002Target\u30d7\u30ed\u30d1\u30fc\u30c6\u30a3\u304c &#8220;javascript&#8221;\u306b\u8a2d\u5b9a\u3055\u308c\u308b\u3068\u3001JavaScrpt\u51fd\u6570\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u305d\u306e\u4ed6\u306e\u5834\u5408\u3001\u30ea\u30f3\u30af\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<\/div>\n<pre lang=\"actionscript3\" line=\"1\">import\tcom.hangunsworld.net.URLNavigator;\r\n\r\nvar un:URLNavigator = new URLNavigator();\r\n\r\nbtn1.addEventListener(MouseEvent.CLICK, listener);\r\nbtn1.num = 0;\r\nbtn2.addEventListener(MouseEvent.CLICK, listener);\r\nbtn2.num = 1;\r\nbtn3.addEventListener(MouseEvent.CLICK, listener);\r\nbtn3.num = 2;\r\n\r\nvar xml:XML = \r\n<sample>\r\n             <link>\r\n                           <link_url><![CDATA[http:\/\/hangunsworld.com]]><\/link_url>\r\n                           <link_target><![CDATA[_self]]><\/link_target>\r\n             <\/link>\r\n             <link>\r\n                           <link_url><![CDATA[test2]]><\/link_url>\r\n                           <link_target><![CDATA[javascript]]><\/link_target>\r\n             <\/link>\r\n             <link>\r\n                           <link_url><![CDATA[test^1^2^3]]><\/link_url>\r\n                           <link_target><![CDATA[javascript]]><\/link_target>\r\n             <\/link>\r\n<\/sample>;\r\n\r\n\r\nfunction listener(e:MouseEvent):void{\r\n\tvar mc:MovieClip = e.currentTarget as MovieClip;\r\n\tvar num:uint = mc.num;\r\n\t\r\n\tvar link:String = xml.link[num].link_url.toString();\r\n\tvar targ:String = xml.link[num].link_target.toString();\r\n\t\r\n\tun.analyze(link, targ, e.ctrlKey, e.altKey, \"^\");\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>URLNavigator \ud074\ub798\uc2a4\ub97c \uc218\uc815\ud558\uc5ec \ub9c1\ud06c \uc774\ub3d9 \ubfd0 \uc544\ub2c8\ub77c, \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8\ub3c4 \uc2e4\ud589\uc774 \uac00\ub2a5\ud558\ub3c4\ub85d \uc218\uc815\ud558\uc600\uc2b5\ub2c8\ub2e4. \uc544\ub798 \ucf54\ub4dc\uc640 \uac19\uc774 URLNavigator.callJS() \uba54\uc18c\ub4dc\ub97c \ud1b5\ud574\uc11c \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \ud568\uc218\ub97c \ud638\ucd9c \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. I modified the URLNavigator class to add calling JavaScript function feature. You can use URLNavigator.callJS() method to call a JavaScript function like this. URLNavigator\u30af\u30e9\u30b9\u3092\u6539\u3081\u3066JavaScript\u51fd\u6570\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u51fa\u6765\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002\u4e0b\u306e\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306b\u3001URLNavigator.callJS()\u30e1\u30bd\u30c3\u30c9\u3092\u901a\u3058\u3066JavaScript\u51fd\u6570\u3092\u5b9f\u884c\u51fa\u6765\u307e\u3059\u3002 import com.hangunsworld.net.URLNavigator; var un:URLNavigator = new URLNavigator(); un.callJS(&#8220;functionName&#8221;); [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[555,82,114],"class_list":["post-320","post","type-post","status-publish","format-standard","hentry","category-as3","tag-javascript","tag-net","tag-urlnavigator"],"_links":{"self":[{"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/posts\/320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/comments?post=320"}],"version-history":[{"count":0,"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/posts\/320\/revisions"}],"wp:attachment":[{"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/media?parent=320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/categories?post=320"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hangunsworld.com\/blog\/wp-json\/wp\/v2\/tags?post=320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}