{"id":16599,"date":"2012-04-05T06:56:46","date_gmt":"2012-04-05T10:56:46","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=16599"},"modified":"2013-04-17T08:21:15","modified_gmt":"2013-04-17T12:21:15","slug":"xml-flash-how-to-create-button-and-link-to-url-as3","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/xml-flash-how-to-create-button-and-link-to-url-as3.html","title":{"rendered":"XML Flash. How to create button and link to URL (AS3)"},"content":{"rendered":"<p>In this tutorial you will learn the way to create new button and link it to URL in XML Flash AS3 templates:<\/p>\r\n<p>1) First you need to locate the page to embed button, locate all pages symbol  <\/p>\r\n\r\n<a href=\"\/help\/wp-content\/uploads\/2012\/04\/img11.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/04\/img11-300x198.jpg\" alt=\"\" title=\"img1\" width=\"300\" height=\"198\" class=\"aligncenter size-medium wp-image-16600\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/04\/img11-300x198.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/04\/img11.jpg 583w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\r\n<p>2) When you are in the pages symbol you need to create new button or just drag&#8217;n&#8217;drop image you like, style or edit it as you need <\/p>\r\n\r\n<a href=\"\/help\/wp-content\/uploads\/2012\/04\/img2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/04\/img2-300x285.jpg\" alt=\"\" title=\"img2\" width=\"300\" height=\"285\" class=\"aligncenter size-medium wp-image-16601\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/04\/img2-300x285.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/04\/img2.jpg 548w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\r\n<p>3) When the image is proper size and on its place you need to select it and go to &quot;Modify &gt;&gt; Convert to Symbol&quot;, then select instance name you need (use &quot;button&quot; if you don&#8217;t have advanced flash knowledge) <\/p>\r\n\r\n<a href=\"\/help\/wp-content\/uploads\/2012\/04\/img3.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/04\/img3-300x169.jpg\" alt=\"\" title=\"img3\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-16602\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/04\/img3-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/04\/img3.jpg 449w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\r\n<p>4) Now you need to create new layer and add keyframe (f6) on your page frame.<\/p>\r\n<p>5) As soon as you add keyframe you need to select it and open actions tab (F9) to paste the following script:<\/p>\r\n\r\n<pre class=\"brush:as3\">urlButton.addEventListener(MouseEvent.CLICK, mouseClick);\r\n  \r\n  function mouseClick(e:MouseEvent) {\r\n  var url:String = &quot;http:\/\/www.template-help.com&quot;;\r\n  var request:URLRequest = new URLRequest(url);\r\n  try {\r\n  navigateToURL(request);\r\n  }\r\n  catch (e:Error) {\r\n  \/\/ handle error here\r\n  }\r\n  }\r\n  <\/pre>\r\n  \r\n  <p>6) The last step is to select your new button and assign following instance name: urlButton <\/p>\r\n\r\n<a href=\"\/help\/wp-content\/uploads\/2012\/04\/img4.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/04\/img4-300x271.jpg\" alt=\"\" title=\"img4\" width=\"300\" height=\"271\" class=\"aligncenter size-medium wp-image-16603\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/04\/img4-300x271.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/04\/img4.jpg 323w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\r\n<p>&nbsp;<\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n\r\n<a href=\"\/help\/files\/Flash\/how-create-button-and-assign-link-it.htm\" target=\"blank\">XML Flash. How to create button and link to URL (AS3)<\/a>","protected":false},"excerpt":{"rendered":"<p>In this tutorial you will learn the way to create new button and link it to URL in XML Flash AS3 templates<\/p>\n","protected":false},"author":29,"featured_media":16818,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[279,287],"tags":[536,486,521,1056,570],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/16599"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=16599"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/16599\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/16818"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=16599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=16599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=16599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}