<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8108831160894649386</id><updated>2011-11-27T19:43:02.199-05:00</updated><category term='flash'/><category term='url'/><category term='buttons'/><category term='stop'/><category term='address'/><category term='web'/><category term='clickable'/><category term='menus'/><category term='play'/><category term='programming'/><category term='open'/><category term='3'/><category term='adobe'/><category term='code'/><category term='actionscript'/><title type='text'>ActionScript 3 The Easy Way</title><subtitle type='html'>A blog where you may find tips and code snipets for ActionScript 3 for the Adobe Flash authoring software.  As I learn new things myself, I will be posting them here. This is the English version of the blog.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://actioncoding.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8108831160894649386/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://actioncoding.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>SomeNick</name><uri>http://www.blogger.com/profile/04055646178174066104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_duBRJ4xnLc0/SP9nh0BYQPI/AAAAAAAAAAU/kQVd4nkxNyw/S220/avatar100x100.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8108831160894649386.post-6584677573731413741</id><published>2008-12-10T11:36:00.008-05:00</published><updated>2008-12-10T11:51:23.764-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='url'/><category scheme='http://www.blogger.com/atom/ns#' term='open'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='3'/><category scheme='http://www.blogger.com/atom/ns#' term='actionscript'/><category scheme='http://www.blogger.com/atom/ns#' term='adobe'/><category scheme='http://www.blogger.com/atom/ns#' term='address'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>Opening an URL in ActionScript 3</title><content type='html'>&lt;span style="font-family:arial;"&gt;How to open an URL from ActionScript 3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;  Today, I will explain how to open an URL in flash using AS3.  Like many other things, this is also done a bit differently from what it used to be in AS2.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;  To open http://www.stormvideogames.com in AS3, for example, one would use the following code, either in a frame, or assigned to a button (check out the button tutorial in this blog if you need).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;var myURLhandler:URLRequest = new URLRequest("http://www.stormvideogames.com");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; try {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  navigateToURL(myURLhandler, '_blank');&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; } catch (e:Error) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   trace("Error occurred!");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; }   &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;font-family:arial;" &gt;Just replace the URL with the one you intend to use.  You may also append a ? to the end of the URL to send variables there via GET, as you would with any URL in HTML.&lt;/span&gt;&lt;span style="font-family: arial;"&gt;  For example, http://www.mega-website.com/index.php?go=1 is also a valid URL.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Hope this is helpful to you!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8108831160894649386-6584677573731413741?l=actioncoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://actioncoding.blogspot.com/feeds/6584677573731413741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8108831160894649386&amp;postID=6584677573731413741' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8108831160894649386/posts/default/6584677573731413741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8108831160894649386/posts/default/6584677573731413741'/><link rel='alternate' type='text/html' href='http://actioncoding.blogspot.com/2008/12/opening-url-in-actionscript-3.html' title='Opening an URL in ActionScript 3'/><author><name>SomeNick</name><uri>http://www.blogger.com/profile/04055646178174066104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_duBRJ4xnLc0/SP9nh0BYQPI/AAAAAAAAAAU/kQVd4nkxNyw/S220/avatar100x100.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8108831160894649386.post-7210483938867874510</id><published>2008-10-22T13:56:00.014-04:00</published><updated>2008-10-22T14:37:09.268-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stop'/><category scheme='http://www.blogger.com/atom/ns#' term='play'/><category scheme='http://www.blogger.com/atom/ns#' term='clickable'/><category scheme='http://www.blogger.com/atom/ns#' term='3'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='actionscript'/><category scheme='http://www.blogger.com/atom/ns#' term='menus'/><category scheme='http://www.blogger.com/atom/ns#' term='adobe'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><category scheme='http://www.blogger.com/atom/ns#' term='buttons'/><title type='text'>Buttons in Adobe Flash</title><content type='html'>&lt;span style="font-family:arial;"&gt;Well, this is my first post in this blog.  In ActionScript 3 for the Adobe Flash authoring tool or software, many commands have remained the same as in ActionScript 2, such as stop(); and play();  However, many things have also changed, greatly.  One of the most noticeable changes in ActionScript 3 is how buttons work.&lt;br /&gt;&lt;br /&gt;I will show you how to make clickable buttons in ActionScript 3 for Adobe Flash the easy way.  Previously, in ActionScript 2, to create a button to play the flash movie, one would simply assign the code to a button like this:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;on(release) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; play();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt; As already mentioned earlier, things have changed in ActionScript 3.  It is no longer possible to directly assign actions to buttons or movie clips anymore.  Instead, everything is written in the frames in the timeline, and from there, everything is controlled via instance names.  This helps keep code a bit more organized, avoiding the need to go button hunting or movie clip hunting if modifications are required later on.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;  To make a button like the previous one but in ActionScript 3, follow these steps:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;1) Create a button(Insert -&gt; New Symbol -&gt; Button), and give it a generic symbol name, like, "MyButton", which is how it will appear in the library.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;2) Place said button in the frame where it will appear.  Click it, and in properties (ussually in the bottom of the screen, but not always), give it an instance name.  It has to be different from the symbol name mentioned above.  Lets name it "startbutton".&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;3) In the timeline, in the same frame where the button appears, we use this actionscript.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;function start_my_movie(evt:MouseEvent) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;play();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;startbutton.addEventListener(MouseEvent.MOUSE_UP, start_my_movie);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Thats it. We have created a button in ActionScript 3 that, upon click, will issue a play() commands.  What we did, essentially, was create a function which receives a MouseEvent as parameter.  Inside this function, we issued a play() command.  Here you can add any code you want or need.  After creating the funcion, we added it to the event listener (see that we passed the funcion name to it?)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;If you want t create more buttons that do other different things, just create the respective functions as shown, and add the function names as shown, as many times as it is needed.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8108831160894649386-7210483938867874510?l=actioncoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://actioncoding.blogspot.com/feeds/7210483938867874510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8108831160894649386&amp;postID=7210483938867874510' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8108831160894649386/posts/default/7210483938867874510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8108831160894649386/posts/default/7210483938867874510'/><link rel='alternate' type='text/html' href='http://actioncoding.blogspot.com/2008/10/buttons-in-adobe-flash.html' title='Buttons in Adobe Flash'/><author><name>SomeNick</name><uri>http://www.blogger.com/profile/04055646178174066104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_duBRJ4xnLc0/SP9nh0BYQPI/AAAAAAAAAAU/kQVd4nkxNyw/S220/avatar100x100.jpg'/></author><thr:total>1</thr:total></entry></feed>
