<?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'><id>tag:blogger.com,1999:blog-4936679048645236623</id><updated>2010-01-03T11:39:13.711-08:00</updated><title type='text'>ilike2Flash</title><subtitle type='html'>Flash tutorials</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default?start-index=26&amp;max-results=25'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>178</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-1202231355624338336</id><published>2010-01-03T09:42:00.001-08:00</published><updated>2010-01-03T09:44:50.242-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Articles'/><title type='text'>Flash CS4 Easter eggs</title><content type='html'>In Flash CS4 there are some Easter eggs which I will reveal you. Easter eggs are basically hidden messages or features purposefully left by the developers as some kind of funny prank.&lt;br /&gt;&lt;br /&gt;To find the Easter eggs you need to open up Flash CS4. Choose an AS3 Flash file then from the menu bar select &lt;span style="font-weight: bold;"&gt;Help &gt; About Adobe Flash CS4&lt;/span&gt;. The following window should appear.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i47.tinypic.com/rsc608.jpg"&gt;&lt;img style="cursor: pointer; width: 418px; height: 213px;" src="http://i47.tinypic.com/rsc608.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You will notice the credits of the Flash developers appearing from the bottom of the window. Now click on the following three places shown below and “Easter eggs” will be revealed. The first EE will reverse the credits from appearing; the second EE will speed up the credits and the third EE will show a slideshow of the developers.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i49.tinypic.com/m8jvwm.jpg"&gt;&lt;img style="cursor: pointer; width: 289px; height: 80px;" src="http://i49.tinypic.com/m8jvwm.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you know any more Easter egg, feel free to leave any comments below.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-1202231355624338336?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/1202231355624338336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=1202231355624338336&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/1202231355624338336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/1202231355624338336'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2010/01/flash-cs4-easter-eggs.html' title='Flash CS4 Easter eggs'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-1446053733919791572</id><published>2009-12-31T07:13:00.000-08:00</published><updated>2010-01-03T11:39:13.723-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Basics'/><title type='text'>Customise the Tools panel in Flash CS4</title><content type='html'>I previously wrote a post on the &lt;a href="http://www.ilike2flash.com/2009/12/tools-panel-in-flash-cs4.html"&gt;tools panel in Flash CS4&lt;/a&gt;. In this post I will show you how to customise the tools panel in Flash CS4. Customising the tools panel can involve rearranging the tools to different locations, or removing the tools you don’t use.&lt;br /&gt;&lt;br /&gt;To customise the tools panel, you need to go to &lt;span style="font-weight: bold;"&gt;Edit &gt; Customise Tool panel&lt;/span&gt; from the menu bar. The following window should appear.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/customise-tools-panel-1.jpg"&gt;&lt;img style="cursor: pointer; width: 412px; height: 238px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/customise-tools-panel-1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You now select the tool you want to modify on the left side of the window. The selected tool will appear in a red outline. If you want to add another tool to the current selection, simply choose the tool and hit the ‘Add’ button. You can add as many other tools to the selection as you wish. If you want to remove a tool from the tools panel, you select the tool and hit the ‘Remove’ button. This will leave an empty space on the tools panel as shown below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/customise-tools-panel-2.jpg"&gt;&lt;img style="cursor: pointer; width: 61px; height: 259px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/customise-tools-panel-2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To return the tools panel back to the default settings. You can select the ‘Restore Default’ button which will revert back to the default.&lt;br /&gt;&lt;br /&gt;&lt;object width="560" height="340"&gt;&lt;param name="movie" value="http://www.youtube.com/v/C7SX9_BjDAo&amp;amp;hl=en_GB&amp;amp;fs=1&amp;amp;hd=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/C7SX9_BjDAo&amp;amp;hl=en_GB&amp;amp;fs=1&amp;amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-1446053733919791572?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/1446053733919791572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=1446053733919791572&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/1446053733919791572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/1446053733919791572'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/12/customise-tools-panel-in-flash-cs4.html' title='Customise the Tools panel in Flash CS4'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-2950405979023461920</id><published>2009-12-29T15:24:00.000-08:00</published><updated>2009-12-29T15:28:31.725-08:00</updated><title type='text'>The tools panel in Flash CS4</title><content type='html'>This is an update from the &lt;a href="http://www.ilike2flash.com/2008/05/tool-panel-in-detail.html"&gt;tools panel in detail&lt;/a&gt; post. The tools panel is Flash CS4 has been updated with six new tools since I’ve written the previous post. Most of the twenty three tools should be familiar if you have used Flash 8 or Flash CS3 before.&lt;br /&gt;&lt;br /&gt;In Flash CS4 there are many more tools available, so some of the tools share the same space. If you see a black triangle at the lower right of a tool, you can click it to access the other tools which share the same space. The tools panel can be displayed as one long column or a combination of two. It can also be collapsed or hidden from view. Below is an example of the tools panel. Note the names which have asterisks contain multiple tools.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/tools-panel-cs4.jpg"&gt;&lt;img style="cursor: pointer; width: 390px; height: 324px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/tools-panel-cs4.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;1. &lt;span style="font-weight: bold;"&gt;Selection&lt;/span&gt; – Selecting and moving objects.&lt;br /&gt;2. &lt;span style="font-weight: bold;"&gt;Subselection&lt;/span&gt; – Picking points on a path.&lt;br /&gt;3. &lt;span style="font-weight: bold;"&gt;Free transform&lt;/span&gt; – Resizing, rotating and skewing objects.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Gradient transform&lt;/span&gt; - Applying gradient fills to an object.&lt;br /&gt;4. &lt;span style="font-weight: bold;"&gt;3D Rotation&lt;/span&gt; – Rotating the X, Y and Z positions of an object. (New tool)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3D Translation&lt;/span&gt; – Moving an object in the X, Y, and Z direction. (New tool)&lt;br /&gt;5. &lt;span style="font-weight: bold;"&gt;Lasso&lt;/span&gt; – Selecting objects like a lasso.&lt;br /&gt;6. &lt;span style="font-weight: bold;"&gt;Pen&lt;/span&gt; – Adding and deleting paths.&lt;br /&gt;7. &lt;span style="font-weight: bold;"&gt;Text&lt;/span&gt; – Adding text to a fla file.&lt;br /&gt;8. &lt;span style="font-weight: bold;"&gt;Line &lt;/span&gt;– Drawing straight lines.&lt;br /&gt;9. &lt;span style="font-weight: bold;"&gt;Rectangle/Oval/Polystar&lt;/span&gt; – Drawing various primitive shapes.&lt;br /&gt;10. &lt;span style="font-weight: bold;"&gt;Pencil&lt;/span&gt; – Drawing freehand lines.&lt;br /&gt;11. &lt;span style="font-weight: bold;"&gt;Brush &lt;/span&gt;– Similar to the pen tool, you can draw brush strokes.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SprayBrush&lt;/span&gt; – Create graffiti style sprays to a fla file. (New tool)&lt;br /&gt;12. &lt;span style="font-weight: bold;"&gt;Deco&lt;/span&gt; – Create various flowering vine and leaf patterns. (New tool)&lt;br /&gt;13. &lt;span style="font-weight: bold;"&gt;Bone&lt;/span&gt; – This is for adding bones to animate an object using inverse kinematic (IK) animations. (New tool)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Bind &lt;/span&gt;– This is to be used in conjunction with the bone tool where you bind points from the bone tool. (New tool)&lt;br /&gt;14. &lt;span style="font-weight: bold;"&gt;Paint bucket&lt;/span&gt; – Filling objects with colours.&lt;br /&gt;15. &lt;span style="font-weight: bold;"&gt;Eye dropper&lt;/span&gt; – Selecting a sample colour.&lt;br /&gt;16. &lt;span style="font-weight: bold;"&gt;Eraser&lt;/span&gt; – Erasing parts of objects.&lt;br /&gt;17. &lt;span style="font-weight: bold;"&gt;Hand&lt;/span&gt; – Moving to different part of the document.&lt;br /&gt;18. &lt;span style="font-weight: bold;"&gt;Zoom&lt;/span&gt; – Zooming in and out of a document.&lt;br /&gt;19. &lt;span style="font-weight: bold;"&gt;Stroke colour&lt;/span&gt; – This is for changing the outline of an object.&lt;br /&gt;20. &lt;span style="font-weight: bold;"&gt;Fill colour &lt;/span&gt;– This is fill the inside of an object.&lt;br /&gt;21. &lt;span style="font-weight: bold;"&gt;No colour&lt;/span&gt; – Removing the current colour.&lt;br /&gt;22. &lt;span style="font-weight: bold;"&gt;Swap Colour &lt;/span&gt;– Switching the fill and stroke colours around.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-2950405979023461920?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/2950405979023461920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=2950405979023461920&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/2950405979023461920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/2950405979023461920'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/12/tools-panel-in-flash-cs4.html' title='The tools panel in Flash CS4'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-1662535394040715548</id><published>2009-12-23T04:42:00.000-08:00</published><updated>2009-12-23T04:56:26.082-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Freebies'/><title type='text'>Free Flash page flip effect</title><content type='html'>A Flash page flip effect gives the illusion of a realistic page turn of a book. This effect mimics the real way of browsing an actual document, so you would have to drag the mouse to turn over a page, or you could click a link to jump to a certain page. Many websites charge money for this effect, but I will provide three websites which offer this effect of free. You have to be aware that these free versions contain no advanced functionalities. However, for most people the basic version will work just fine.&lt;br /&gt;&lt;br /&gt;1.    &lt;a style="font-weight: bold;" href="http://bit.ly/pageflip"&gt;Pageflip&lt;/a&gt; – Apparently the most professional and realistic free Flash book. Some of the features include: update via XML, page flip sounds, hard cover and many more.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.    &lt;a style="font-weight: bold;" href="http://bit.ly/pixelwit"&gt;Pixelwit&lt;/a&gt; – A powerful page flip which include the following features: adding page, resizing page, multiple page flip, and many more.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3.    &lt;a href="http://bit.ly/flashpageflip"&gt;&lt;span style="font-weight: bold;"&gt;Flashpageflip&lt;/span&gt;&lt;/a&gt; – Another free Flash page flip with similar features to the above two links.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you know any free Flash page flip effects, feel free to leave any comments below&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-1662535394040715548?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/1662535394040715548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=1662535394040715548&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/1662535394040715548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/1662535394040715548'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/12/free-flash-page-flip-effect.html' title='Free Flash page flip effect'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-6751996346312430683</id><published>2009-12-20T05:56:00.000-08:00</published><updated>2009-12-20T06:03:34.800-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 3'/><title type='text'>Limit stage boundaries in AS3</title><content type='html'>I previously wrote a post called &lt;a href="http://ilike2flash.com/2008/11/limit-movements-on-stage.html"&gt;limit movements on the stage&lt;/a&gt; in Actionscript 2 where an object was limited to the edges of the stage boundaries. In this tutorial I will provide the code for the Actionscript 3 version. Before attempting this tutorial make sure you have completed the &lt;a href="http://www.ilike2flash.com/2009/09/keyboard-controls-in-as3-part-2.html"&gt;Key controls in AS3&lt;/a&gt; as code will be added to this tutorial.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Limit stage boundaries in AS3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Open up the &lt;a href="http://www.ilike2flash.com/2009/09/keyboard-controls-in-as3-part-2.html"&gt;Keyboard control AS3&lt;/a&gt; tutorial.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On the timeline select the Actions layer and then open up the Actions panel and enter the following code:&lt;br /&gt;&lt;pre class="source-code"&gt;function limitStageBorder(object:MovieClip) {&lt;br /&gt;   //1.&lt;br /&gt;   var objectHalfWidth:uint=object.width/2;&lt;br /&gt;   var objectHalfHeight:uint=object.height/2;&lt;br /&gt; &lt;br /&gt;   //2.&lt;br /&gt;   if (object.x+objectHalfWidth&gt;stage.stageWidth) {&lt;br /&gt;       object.x=stage.stageWidth-objectHalfWidth;&lt;br /&gt;   }&lt;br /&gt;   else if (object.x -  objectHalfWidth &lt;0) {        &lt;br /&gt;       object.x=0+objectHalfWidth;    &lt;br /&gt;   }     &lt;br /&gt;&lt;br /&gt;   //3.    &lt;br /&gt;   if (object.y-objectHalfHeight&lt;0) {        &lt;br /&gt;       object.y=0+objectHalfHeight;    &lt;br /&gt;   }    &lt;br /&gt;   else if (object.y + objectHalfHeight &gt; stage.stageHeight) {&lt;br /&gt;       object.y=stage.stageHeight-objectHalfHeight;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Code:&lt;br /&gt;1.This creates two local variables which store half the objects width and height.&lt;br /&gt;2.If the object moves over the stage width then the objects get pushed back by adding or subtracting the height/width of the object.&lt;br /&gt;3.If the object moves over the stage height then the objects get pushed back by adding or subtracting the height/width of the object.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You now need to add the limitStageBorder() function to enable the limiting of the stage boundaries. Place the following line of code inside moveObect() function.&lt;br /&gt;&lt;pre class="source-code"&gt;limitStageBorder(lemon_mc);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 4 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Test your movie clip &lt;span style="font-weight: bold;"&gt;Ctrl + Enter&lt;/span&gt;. You should now notice the object cannot move outside of the stage area.&lt;br /&gt;&lt;br /&gt;&lt;embed type="application/x-shockwave-flash" src="http://ilike2flash.host56.com/swf/limit%20stage%20boundaries.swf" pluginspage=" http://www.macromedia.com/go/getflashplayer" height="200" width="400"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-6751996346312430683?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/6751996346312430683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=6751996346312430683&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/6751996346312430683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/6751996346312430683'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/12/limit-stage-boundaries-in-as3.html' title='Limit stage boundaries in AS3'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-2698361857981105722</id><published>2009-12-18T09:56:00.000-08:00</published><updated>2009-12-18T10:00:35.022-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Articles'/><title type='text'>Flash CS5 preview</title><content type='html'>Lee Brimelow from gotoandlearn.com has posted a video showing all the new features of the new Flash CS5. You can watch the video &lt;a href="http://gotoandlearn.com/play?id=118"&gt;here&lt;/a&gt;. The video is over 20 minutes long with the new features and improvements all being mentioned.&lt;br /&gt;&lt;br /&gt;Some of the new features of Flash CS5 include:&lt;br /&gt;• Some of the new features include:&lt;br /&gt;• iphone packager which will allow you to publish iphone applications.&lt;br /&gt;• Faster start up window that will not be displayed on top of every program.&lt;br /&gt;• New video player skins.&lt;br /&gt;• New text engine with improved character embedding panel, text control, styling, advanced text options etc.&lt;br /&gt;• New XFL format which will replace the FLA format. The XFL format is a XML representation of the data in your project.&lt;br /&gt;• New code snippets panel for faster Actionscript coding. You will now be able to generate many lines of code with a single click which should help with the learning of Actionscript 3.&lt;br /&gt;• Actionscript custom class recognition with code hinting and completion.&lt;br /&gt;• Redesigned Compiles Error panel.&lt;br /&gt;• Integration with Flash builder.&lt;br /&gt;• New brushes in the Deco tool.&lt;br /&gt;&lt;br /&gt;(Checkout the &lt;a href="http://gotoandlearn.com/play?id=118"&gt;video&lt;/a&gt; to find out the other features of the new Flash CS5).&lt;br /&gt;&lt;br /&gt;Unfortunately there will not be a public beta as Adobe has decided not to release it. This is because Adobe have changed there plans from all the positive feedback they have received, so are instead trying to provide an earlier release date for the final CS5 software. The full post from Adobe can be found &lt;a href="http://blogs.adobe.com/flashplatform/2009/12/there_will_not_be_a_beta_for_f.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-2698361857981105722?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/2698361857981105722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=2698361857981105722&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/2698361857981105722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/2698361857981105722'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/12/flash-cs5-preview.html' title='Flash CS5 preview'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-9013277598886829884</id><published>2009-12-14T15:03:00.000-08:00</published><updated>2009-12-20T03:20:35.135-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Games'/><title type='text'>Number guessing game in AS3</title><content type='html'>In this Flash tutorial you will learn how to create a number guessing game in Actionscript 3.0. A number guessing game is where you have to guess a randomly selected number. If you guess the number wrong you will be prompted to select another number and if you guess the correct number, an appropriate message will appear.&lt;br /&gt;&lt;br /&gt;I will be creating this game in two parts. The first part will create the game interface which will consist of creating the buttons and text fields, as well as adding the main Actionscript code for the game. The second part of the game will deal with adding additional features to the game such as limiting the amount of guesses and displaying the number of guesses.&lt;br /&gt;&lt;br /&gt;Some knowledge of &lt;a href="http://www.ilike2flash.com/2008/06/basic-buttons_5407.html"&gt;basic buttons&lt;/a&gt; will be needed for this tutorial.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Number guessing game in AS3 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1 – Game title&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Open a new Flash AS3 file. Then select the Text tool (T) with static text and type the following message shown below. I have also given my message a &lt;a href="http://www.ilike2flash.com/2009/05/double-knocked-out-text-effect.html"&gt;double knocked out effect&lt;/a&gt; which is optional.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/number-guess-1.jpg"&gt;&lt;img style="cursor: pointer; width: 377px; height: 47px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/number-guess-1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2 – Create dynamic text fields&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Select the Text tool (T) with &lt;span style="font-style: italic; font-weight: bold;"&gt;dynamic text&lt;/span&gt; and drag a rectangular text field below your message. Then choose the format option ‘Align Center’ and give your dynamic text the instance name: message_txt. If your dynamic text characters look uneven, you may need to embed the following character glyphs: Uppercase, lowercase, numerals and punctuation.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/number-guess-2.jpg"&gt;&lt;img style="cursor: pointer; width: 312px; height: 48px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/number-guess-2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3 – Create input text fields&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This time select the Text tool (T) with &lt;span style="font-style: italic; font-weight: bold;"&gt;input text&lt;/span&gt; and drag an input text field below the dynamic text field. Make sure your input text field has enough room for three characters. I have selected the option ‘Show border around text’ which displays a black border around the input text field as shown below. I have also set the paragraph behavior to 'single line' and changed the 'Max Char' to 3 which will stop the more than three characters appearing.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/number-guess-3.jpg"&gt;&lt;img style="cursor: pointer; width: 101px; height: 60px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/number-guess-3.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now give your input text field the instance name: input_txt.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 4 – Create buttons&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Create two buttons on the stage below the input text field. If you don’t know how to create buttons checkout the &lt;a href="http://www.ilike2flash.com/2008/06/basic-buttons_5407.html"&gt;basic buttons tutorial&lt;/a&gt;. You can alternatively use two &lt;a href="http://www.ilike2flash.com/2009/09/button-components-in-actionscript-30.html"&gt;button components&lt;/a&gt;, or the &lt;a href="http://www.ilike2flash.com/2008/09/built-in-button-library.html"&gt;built in button library&lt;/a&gt;. One of the buttons should have the name “Guess” and the other with the name “Play Again” like below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/number-guess-4.jpg"&gt;&lt;img style="cursor: pointer; width: 267px; height: 32px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/number-guess-4.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Give the buttons the following instance name respectively: guess_btn and playagain_btn.&lt;br /&gt;&lt;br /&gt;So, the game interface should now look like below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/number-guess-5.jpg"&gt;&lt;img style="cursor: pointer; width: 393px; height: 178px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/number-guess-5.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 5 – Add code &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On the timeline insert a new layer called ‘Actions’ then open up the Actions panel and enter the following code:&lt;br /&gt;&lt;pre class="source-code"&gt;//Declares variables.&lt;br /&gt;var beginMessage:String;&lt;br /&gt;var randomNumber:uint;&lt;br /&gt;var my_guess:uint;&lt;br /&gt;&lt;br /&gt;function init():void {&lt;br /&gt; //Initally disables the play again button, and enables the guess button.&lt;br /&gt; playagain_btn.enabled =false;&lt;br /&gt; guess_btn.enabled = true;&lt;br /&gt;&lt;br /&gt; //Display a begining message in the message_txt dynamic text field.&lt;br /&gt; beginMessage="Choose a number between 1 - 100.";&lt;br /&gt; message_txt.text=beginMessage;&lt;br /&gt;&lt;br /&gt; //Restrict the characters in the message_txt text field, so only the&lt;br /&gt; //numbers 0 - 9 can be entered.&lt;br /&gt; message_txt.restrict="0-9";&lt;br /&gt;&lt;br /&gt; //Clears the input text field.&lt;br /&gt; input_txt.text="";&lt;br /&gt;&lt;br /&gt; //This stores a random number between 1 - 100 to the variable randomNumber.&lt;br /&gt; randomNumber = Math.floor(Math.random() * 100 + 1);&lt;br /&gt;&lt;br /&gt; //Adds an event listener to the guess button.&lt;br /&gt; guess_btn.addEventListener(MouseEvent.CLICK, yourGuess);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function yourGuess(event:MouseEvent):void {&lt;br /&gt; //This stores data from the input text field to the variable my_guess.&lt;br /&gt; my_guess=uint(input_txt.text);&lt;br /&gt;&lt;br /&gt; //This checks if the guessed number is greater than the random number.&lt;br /&gt; if (my_guess &gt; randomNumber) {&lt;br /&gt;     message_txt.text = "Your guess, " +  my_guess + " is too high.";&lt;br /&gt; }&lt;br /&gt; //This checks if the guessed number is lower than the random number.&lt;br /&gt; else if (my_guess &lt; randomNumber) {                   &lt;br /&gt;     message_txt.text = "Your guess, " +  my_guess + " is too low.";         &lt;br /&gt; }   &lt;br /&gt; //This displays a message when the correct number is guessed.  &lt;br /&gt; else{     &lt;br /&gt;    message_txt.text = "Well done, the number is " + randomNumber + ".";                    &lt;br /&gt;    winGame();        &lt;br /&gt; }&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;function winGame():void{        &lt;br /&gt;//Disables the guess button and enables the play again button.       &lt;br /&gt;   guess_btn.enabled = false;       &lt;br /&gt;   playagain_btn.enabled = true;        &lt;br /&gt;&lt;br /&gt;  //Removes the listener from the guess button, and adds a listener to the        &lt;br /&gt;  //play again button.       &lt;br /&gt;  guess_btn.removeEventListener(MouseEvent.CLICK, yourGuess);        &lt;br /&gt;  playagain_btn.addEventListener(MouseEvent.CLICK, guessAgain);&lt;br /&gt;}   &lt;br /&gt;&lt;br /&gt;function guessAgain(event:MouseEvent):void{        &lt;br /&gt;  //Runs the init() method.        &lt;br /&gt;  init();&lt;br /&gt;}  &lt;br /&gt;&lt;br /&gt;//Runs the init() method.&lt;br /&gt;init(); &lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 6 – Test &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Test your number guessing game &lt;span style="font-weight: bold;"&gt;Ctrl + Enter&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;embed type="application/x-shockwave-flash" src="http://ilike2flash.host56.com/swf/number%20guessing.swf" pluginspage=" http://www.macromedia.com/go/getflashplayer" height="200" width="400"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;You should now have number guessing game in Actionscript 3.0. Remember to &lt;a href="http://feeds2.feedburner.com/blogspot/YLDd"&gt;subscribe&lt;/a&gt; for part 2 where I will be limiting the number of guesses in the game.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-9013277598886829884?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/9013277598886829884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=9013277598886829884&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/9013277598886829884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/9013277598886829884'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/12/number-guessing-game-in-as3.html' title='Number guessing game in AS3'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-3434427098082485978</id><published>2009-12-09T08:53:00.000-08:00</published><updated>2009-12-14T15:15:35.095-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 3'/><title type='text'>Display date in Actionscript 3</title><content type='html'>In this tutorial you will learn how to display the date in Actionscript 3. This is an update from the &lt;a href="http://www.ilike2flash.com/2008/06/display-date.html"&gt;display date tutorial&lt;/a&gt; in AS2. To display the date you need to use the Date class which will retrieve all date details such as the months, the years and the days. If you have completed the AS2 tutorial all the code below should look familiar to you.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Display date in Actionscript 3 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Open a new Flash AS3 file.&lt;br /&gt;Select the Text tool (T) with dynamic text and create a small rectangle shape on the stage like below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/display-date-as3--1.jpg"&gt;&lt;img style="cursor: pointer; width: 350px; height: 86px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/display-date-as3--1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You may need to embed the following glyphs by selecting the ‘Character Embedding’ button: Uppercase, Lowercase, Numerals and Punctuation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Give your dynamic text field the following instance name shown below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/display-date-as3--2-1.jpg"&gt;&lt;img style="cursor: pointer; width: 281px; height: 83px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/display-date-as3--2-1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On the timeline create a new layer called ‘Actions’, and open up actions panel (&lt;span style="font-weight: bold;"&gt;F9&lt;/span&gt;) and enter the following code.&lt;br /&gt;&lt;br /&gt;&lt;pre class="source-code"&gt;//Array to hold a list of the weekdays.&lt;br /&gt;var weekdays:Array = new Array ("Sunday","Monday","Tuesday","Wednesday",&lt;br /&gt;"Thursday","Friday","Saturday");&lt;br /&gt;&lt;br /&gt;//Array to hold a list of the months.&lt;br /&gt;var months:Array = new Array ("Jan","Feb","Mar","Apr","May","Jun","Jul",&lt;br /&gt;"Aug", "Sep", "Oct","Nov","Dec");&lt;br /&gt;&lt;br /&gt;//Adds an event listener to the dymanic text field.&lt;br /&gt;the_date.addEventListener(Event.ENTER_FRAME,showDate);&lt;br /&gt;&lt;br /&gt;function showDate(event:Event):void {&lt;br /&gt;//Create a new instance of the date class.&lt;br /&gt;var myDate:Date = new Date();&lt;br /&gt;&lt;br /&gt;//Retrieve the day, month and year from the date class.&lt;br /&gt;var theDay=weekdays[myDate.getDay()];&lt;br /&gt;var theMonth=months[myDate.getMonth()];&lt;br /&gt;var theDate=myDate.getDate();&lt;br /&gt;var theYear=myDate.getFullYear();&lt;br /&gt;&lt;br /&gt;//Display the date in the dynamic text field.&lt;br /&gt;the_date.text=theDay+", "+theMonth+" "+theDate+", "+theYear;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 4 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Test your movie clip &lt;span style="font-weight: bold;"&gt;Ctrl + Enter&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;embed type="application/x-shockwave-flash" src="http://ilike2flash.host56.com/swf/display%20date%20as3.swf" pluginspage=" http://www.macromedia.com/go/getflashplayer" height="100" width="400"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;You should now be able to display the date in Actionscript 3.0.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-3434427098082485978?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/3434427098082485978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=3434427098082485978&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/3434427098082485978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/3434427098082485978'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/12/display-date-in-actionscript-3.html' title='Display date in Actionscript 3'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-7469123139223243808</id><published>2009-12-08T14:43:00.000-08:00</published><updated>2009-12-08T14:44:39.946-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Articles'/><title type='text'>Good programming practices for AS3</title><content type='html'>When you are coding Actionscript code it’s always good to use some coding practises to make your life simpler. Below is a list of some good coding practices that people should be aware of. If you have any suggestions leave a comment below.&lt;br /&gt;&lt;br /&gt;•    &lt;span style="font-weight: bold;"&gt;Naming conventions&lt;/span&gt; – When you are naming a function or variable you should make sure you use a name that describes what the function or variable does.&lt;br /&gt;&lt;br /&gt;•    &lt;span style="font-weight: bold;"&gt;Formatting&lt;/span&gt; – The layout of the code should be consistent with the whole AS file, as a badly formatted layout can be difficult to read.&lt;br /&gt;&lt;br /&gt;•    &lt;span style="font-weight: bold;"&gt;Comments&lt;/span&gt; – Add comments to your code so it is clear exactly what your code does. If you need to return to your code after many years, you should be easily able to identity your code. Good comments also allow other users to figure out what your code does.&lt;br /&gt;&lt;br /&gt;•    &lt;span style="font-weight: bold;"&gt;Reused code&lt;/span&gt; – Always think of ways you can reuse code. For example, a function that can be used in more than one place.&lt;br /&gt;&lt;br /&gt;•   &lt;span style="font-weight: bold;"&gt; Program modular&lt;/span&gt; – Separate large pieces of code into smaller pieces to help with reusability. This will also help if you need to modify your code later on.&lt;br /&gt;&lt;br /&gt;•    &lt;span style="font-weight: bold;"&gt;Simplify&lt;/span&gt; – Don’t over complicate your code. Always find ways of minimising coding. For example, if a coding activity can be accomplished with ten lines of code. Don’t write code which takes up 20 lines of code.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-7469123139223243808?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/7469123139223243808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=7469123139223243808&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/7469123139223243808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/7469123139223243808'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/12/good-programming-practices-for-as3.html' title='Good programming practices for AS3'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-6994169621245589598</id><published>2009-12-07T04:39:00.000-08:00</published><updated>2009-12-07T04:42:36.103-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Actionscript 3 - 1120 error</title><content type='html'>An error 1120 is ‘Access of undefined property’ which can means two things. Firstly, you are trying to access an undefined variable, and secondly you have not given a correct instance name to a movie clip or button.&lt;br /&gt;&lt;br /&gt;To solve this problem you need to make sure the instance name field is not empty and contains a valid instance name with correct spelling.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/error-1120---1.jpg"&gt;&lt;img style="cursor: pointer; width: 282px; height: 116px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/error-1120---1.jpg" alt="" border="0" /&gt;&lt;/a&gt;         &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/error-1120---2.jpg"&gt;&lt;img style="cursor: pointer; width: 283px; height: 116px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/error-1120---2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You also need to make sure you make the correct reference to the instance name as shown below.&lt;br /&gt;&lt;pre class="source-code"&gt;myMovieClip.addEventListener(MouseEvent.CLICK, test);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This should solve an 1120 AS3 error.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-6994169621245589598?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/6994169621245589598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=6994169621245589598&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/6994169621245589598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/6994169621245589598'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/12/actionscript-3-1120-error.html' title='Actionscript 3 - 1120 error'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-3207131734688119143</id><published>2009-12-02T08:22:00.000-08:00</published><updated>2009-12-02T16:23:32.069-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 3'/><title type='text'>Display 24 hour time in Actionscript 3</title><content type='html'>In this tutorial I will show you how to display a 24 hour time in Actionscript 3.0. This method is similar to the &lt;a href="http://www.ilike2flash.com/2009/09/display-time-in-actionscript-3.html"&gt;display time in AS3 tutorial&lt;/a&gt; as only some small modifications are needed. The time is displayed using the Date class which gets the time and date information from the users computer. The following steps should be very familiar if you have completed the display time in AS3 tutorial.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Display 24 hour time in Actionscript 3 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Open a new Flash AS3 file. Then select the Text tool and create a dynamic text field on the stage like below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/time-24--1.jpg"&gt;&lt;img style="cursor: pointer; width: 286px; height: 88px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/time-24--1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After you have created a dynamic text field, select the ‘Character Embedding’ button and add the following glyphs: Numerals and Punctuation. You need to hold down the &lt;span style="font-weight: bold;"&gt;Ctrl&lt;/span&gt; key on the keyboard to select more than one glyph.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Select your Dynamic text field and give it the following instance name as shown below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/time-24--2.jpg"&gt;&lt;img style="cursor: pointer; width: 282px; height: 81px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/time-24--2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On the timeline insert a new layer called ‘Actions’ then open up the Actions panel and enter the following code:&lt;br /&gt;&lt;pre class="source-code"&gt;//Add an event listener to the dynamic text field.&lt;br /&gt;the24Time.addEventListener(Event.ENTER_FRAME,show24Time);&lt;br /&gt;&lt;br /&gt;function show24Time(event:Event):void {&lt;br /&gt; //Creates a new instances of the date class&lt;br /&gt; var myTime:Date = new Date();&lt;br /&gt; //This returns the hour, minutes, and seconds.&lt;br /&gt; var theSeconds=myTime.getSeconds();&lt;br /&gt; var theMinutes=myTime.getMinutes();&lt;br /&gt; var theHours=myTime.getHours();&lt;br /&gt;&lt;br /&gt; //This adds '0' to the hours if there is only one digit.&lt;br /&gt; if (String(theHours).length == 1) {&lt;br /&gt;     theHours="0"+theHours;&lt;br /&gt; }&lt;br /&gt; //This adds '0' to the minutes if there is only one digit.&lt;br /&gt; if (String(theMinutes).length == 1) {&lt;br /&gt;    theMinutes="0"+theMinutes;&lt;br /&gt; }&lt;br /&gt; //This adds '0' to the seconds if there is only one digit.&lt;br /&gt; if (String(theSeconds).length == 1) {&lt;br /&gt;    theSeconds="0"+theSeconds;&lt;br /&gt;  }&lt;br /&gt; //Display the 24 time in the dynamic text field.&lt;br /&gt; the24Time.text =theHours+":"+theMinutes+":"+theSeconds;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;**The 24 hour Actionsript code has basically remove nine lines of code from the &lt;a href="http://www.ilike2flash.com/2009/09/display-time-in-actionscript-3.html"&gt;display time in AS3 tutorial&lt;/a&gt;, so should look very similar.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 4 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Test your 24 hour time &lt;span style="font-weight: bold;"&gt;Ctrl + Enter&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;embed type="application/x-shockwave-flash" src="http://ilike2flash.host56.com/swf/display%20time%20%2024%20in%20AS3.swf" pluginspage=" http://www.macromedia.com/go/getflashplayer" height="100" width="400"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;You should now have a 24 hour time in Actionscript 3.0. If you want a 12 hour time take a look at &lt;a href="http://www.ilike2flash.com/2009/09/display-time-in-actionscript-3.html"&gt;this&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-3207131734688119143?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/3207131734688119143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=3207131734688119143&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/3207131734688119143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/3207131734688119143'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/12/display-24-hour-time-in-actionscript-3.html' title='Display 24 hour time in Actionscript 3'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-6324792443198524258</id><published>2009-12-01T07:13:00.000-08:00</published><updated>2009-12-30T11:15:13.499-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reviews'/><title type='text'>Creative movieFX V2 – review</title><content type='html'>I mentioned in a &lt;a href="http://www.ilike2flash.com/2009/11/creative-textfx-v2-review.html"&gt;previous post&lt;/a&gt; that I had been given a copy of the &lt;a href="http://bit.ly/creativetextfxv2"&gt;Creative textFX&lt;/a&gt; component to review, but I had also been given a copy of the &lt;a href="http://bit.ly/creativemoviefxv2"&gt;Creative movieFX&lt;/a&gt;, so in this post I will be reviewing this component. Creative movieFX is a Flash component that gives you over 280 movie clip effects which are available in three different kinds of transitions. The three transitions are fully customisable from the user interface, or from using Actionscript code.&lt;br /&gt;&lt;br /&gt;The installation of this component is similar to the Creative TextFX component. If you are unsure of how to install this component then take a look at the post on &lt;a href="http://www.ilike2flash.com/2009/09/install-extension-in-flash-cs4.html"&gt;installing extensions&lt;/a&gt;. When you have installed the component, create a movie clip on the stage and give it the instance name: movieFxExample_mc. I have converted the following free stock image into a movie clip.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/movieFx-example-1.jpg"&gt;&lt;img style="cursor: pointer; width: 297px; height: 196px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/movieFx-example-1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After select &lt;span style="font-weight: bold;"&gt;Window &gt; Components&lt;/span&gt; then drag an instance of the Creative MovieFX onto the stage.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/movieFx-example-2.jpg"&gt;&lt;img style="cursor: pointer; width: 217px; height: 177px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/movieFx-example-2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now open up the MovieFx panel by selecting &lt;span style="font-weight: bold;"&gt;Windows &gt; Other Panels &gt; MovieFx V2 Panel&lt;/span&gt;. At the bottom of this panel you should see the ‘Other options’ menu which displays your movie clips instance as the target name automatically. This means your movie clip instance is the target object to receive the movie clip effects.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/movieFx-example-3.jpg"&gt;&lt;img style="cursor: pointer; width: 369px; height: 175px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/movieFx-example-3.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The movieFx panel as shown below is similar to the TextFx Panel. There are three different types of transition effects you can choose from which are: wait effects, in effects and out effects. These transition effects can easily be created from the intuitive and easy to use interface. An addition benefit is that every effect is fully customisable, so you can change the duration, easing type, fade, angle, rotations and many more effects without using any Actionscript code. There is also a filters effect panel for you to add visual enhancements to move clips, and an actions panel for adding custom behaviours.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/movieFx-example-4.jpg"&gt;&lt;img style="cursor: pointer; width: 382px; height: 271px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/movieFx-example-4.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To sum up, Creative MovieFX is very easy to use, a unique movie clip effects can be created literally within minutes without using Actionscript code. The intuitive interface makes customising an effect very simple as you can select the option parameters from drop down menu. Below are some examples of movie clip effects using the Creative MovieFX.&lt;br /&gt;&lt;br /&gt;&lt;embed type="application/x-shockwave-flash" src="http://ilike2flash.host56.com/swf/movieFx%20example.swf" pluginspage=" http://www.macromedia.com/go/getflashplayer" height="200" width="300"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;For more information checkout the &lt;a href="http://bit.ly/creativemoviefxv2"&gt;Creative MovieFX&lt;/a&gt; component at extendstudio.com.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-6324792443198524258?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/6324792443198524258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=6324792443198524258&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/6324792443198524258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/6324792443198524258'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/12/creative-moviefx-v2-review.html' title='Creative movieFX V2 – review'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-659696189425179357</id><published>2009-11-28T07:57:00.000-08:00</published><updated>2009-12-30T11:13:19.825-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reviews'/><title type='text'>Creative TextFX V2 – review</title><content type='html'>The kind people over at &lt;a href="http://extendstudio.com/"&gt;extendstudio.com&lt;/a&gt; have given me copy of the &lt;a href="http://bit.ly/creativetextfxv2"&gt;Creative TextFX V2&lt;/a&gt; to review. Firstly, Creative TextFX V2 is a Flash component that gives you access to over 300 text effects. These text effects are fully customisable from the user interface and also from using Actionscript code.&lt;br /&gt;&lt;br /&gt;The installation of the Creative TextFX is very straight forward. If you don’t know how to install components then checkout the post on &lt;a href="http://www.ilike2flash.com/2009/09/install-extension-in-flash-cs4.html"&gt;installing extensions&lt;/a&gt;. After you have installed the component, you go to &lt;span style="font-weight: bold;"&gt;Window &gt; Components&lt;/span&gt; then drag an instance of the Creative TextFX on the stage.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/creative-textfx-1.jpg"&gt;&lt;img style="cursor: pointer; width: 214px; height: 165px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/creative-textfx-1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You now need to open up the TextFx panel by going to &lt;span style="font-weight: bold;"&gt;Window &gt; Other Panel &gt; TextFX panel &lt;/span&gt;making sure you have selected the component on the stage. The following panel should appear.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/creative-textfx-2.jpg"&gt;&lt;img style="cursor: pointer; width: 422px; height: 290px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/creative-textfx-2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The numbers of different text effects you can create are practically limitless only your imagination can hold you back. There are three main types of text effects you can created which are: in effects, wait effects, and out effects. The ‘in/out’ effects create transitions in and from the stage, while the ‘wait’ effects create the transitions in one place. You can also add filters and custom actions to the text effects.&lt;br /&gt;&lt;br /&gt;Overall, Creative TextFX is very simple and intuitive to use. The interface is easy to understand and you have the ability to fully customise every aspect of a text effect without using any Actionscript code. However, for those users who are Actionscript geeks, you can also use Actionscript code to dynamically create text effects. Below are some examples I created using the Creative TextFX component.&lt;br /&gt;&lt;br /&gt;&lt;embed type="application/x-shockwave-flash" src="http://ilike2flash.host56.com/swf/textfx%20example.swf" pluginspage=" http://www.macromedia.com/go/getflashplayer" height="200" width="400"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;For more information checkout the &lt;a href="http://bit.ly/creativetextfxv2"&gt;Creative TextFX&lt;/a&gt; component at extendstudio.com.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-659696189425179357?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/659696189425179357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=659696189425179357&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/659696189425179357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/659696189425179357'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/11/creative-textfx-v2-review.html' title='Creative TextFX V2 – review'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-33288678818540911</id><published>2009-11-24T05:42:00.000-08:00</published><updated>2009-11-29T05:44:37.406-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Articles'/><title type='text'>Remove an event listener in Actionscript 3</title><content type='html'>If you want to remove or delete an event listener from an event in Actionscript 3, you need to use the removeEventListener() method. Removing an event is similar to adding an event as you need to include the type and listener for the parameters. So, the method would look something like below:&lt;br /&gt;&lt;br /&gt;&lt;pre class="source-code"&gt;eventTargetInstance.removeEventListener(type,listener);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The example of this method below removes the mouse click event from the stage instance.&lt;br /&gt;&lt;br /&gt;&lt;pre class="source-code"&gt;stage.removeEventListener(MouseEvent.CLICK, clickingExample);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Removing an event listener reduces memory and processor usage, so it’s good coding practice to remove an eventListener when it is no longer needed in a program. You need to again include the event type and the listener parameters.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-33288678818540911?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/33288678818540911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=33288678818540911&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/33288678818540911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/33288678818540911'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/11/remove-event-listener-in-actionscript-3.html' title='Remove an event listener in Actionscript 3'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-7172853322784273625</id><published>2009-11-22T08:22:00.000-08:00</published><updated>2009-11-22T08:33:27.026-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Numericstepper component in Actionscript 3</title><content type='html'>In this tutorial you will learn how to use the Numericstepper component in Actionscript 3. The Numericstepper component displays a series of numbers which step up and down incrementally. This component contains an input text field and two arrow buttons that step through the values. When the arrow buttons are selected the numbered value can either increase or decrease incrementally, until the minimum or maximum value is reached. The Numeric stepper uses the change event to detect when a change has occurred. For more information checkout the AS3 &lt;a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/NumericStepper.html"&gt;NumericStepper component reference&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I will be showing a brief overview of the stepper components properties, and then I will show a practical example of this component.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Brief overview&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Open up a Flash AS3 file.&lt;br /&gt;&lt;br /&gt;2. Select &lt;span style="font-weight: bold;"&gt;Window &gt; Components &lt;/span&gt;and drag a NumericStepper component onto the stage. After select the text tool and drag a dynamic text field above the component as show below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stepper-component-1.jpg"&gt;&lt;img style="cursor: pointer; width: 317px; height: 112px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stepper-component-1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3.    Give the following instance names for the component and text field accordingly: my_ns and my_text.&lt;br /&gt;&lt;br /&gt;4.    On timeline create a new layer called Action then open up the Actions panel (&lt;span style="font-weight: bold;"&gt;F9&lt;/span&gt;) and enter the following code:&lt;br /&gt;&lt;br /&gt;This code basically increases and decreases the number value on the stepper and text&lt;br /&gt;field using the ‘value’ property.&lt;br /&gt;&lt;pre class="source-code"&gt;my_ns.addEventListener(Event.CHANGE, updateText);&lt;br /&gt;&lt;br /&gt;function updateText(event:Event):void{&lt;br /&gt;my_text.text = "The NumericStepper value is " +  my_ns.value;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;You can set the maximum and minimum value on the stepper by using the&lt;br /&gt;‘maximum’ and ‘minimum’ properties.&lt;br /&gt;&lt;pre class="source-code"&gt;my_ns.minimum = 5;&lt;br /&gt;my_ns.maximum = 50;&lt;br /&gt;&lt;br /&gt;my_ns.addEventListener(Event.CHANGE, updateText);&lt;br /&gt;&lt;br /&gt;function updateText(event:Event):void{&lt;br /&gt;my_text.text = "The NumericStepper value is " +  my_ns.value;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can set the next unit change of the stepper using the ‘stepSize’ property.&lt;br /&gt;&lt;pre class="source-code"&gt;my_ns.minimum = 5;&lt;br /&gt;my_ns.maximum = 45;&lt;br /&gt;my_ns.stepSize = 15;&lt;br /&gt;&lt;br /&gt;my_ns.addEventListener(Event.CHANGE, updateText);&lt;br /&gt;&lt;br /&gt;function updateText(event:Event):void{&lt;br /&gt;my_text.text = "The NumericStepper value is " +  my_ns.value;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Checkout the AS3 &lt;a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/NumericStepper.html"&gt;NumericStepper component reference&lt;/a&gt; for a list of the other properties.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Practical example &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Open a new Flash AS3 file.&lt;br /&gt;Select the Oval tool with any colour and drag an oval shape on the stage like below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stepper-component-2.jpg"&gt;&lt;img style="cursor: pointer; width: 237px; height: 141px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stepper-component-2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Convert your oval shape into movie clip (&lt;span style="font-weight: bold;"&gt;F8&lt;/span&gt;) with the registration point at the top left and give the instance name: my_oval.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On the timeline insert a new layer called “Components” then select &lt;span style="font-weight: bold;"&gt;Windows &gt; Components&lt;/span&gt; and drag three stepper components on the stage. Now select the Text tool with static text and type the following message above the components.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stepper-component-3.jpg"&gt;&lt;img style="cursor: pointer; width: 261px; height: 74px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stepper-component-3.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 4 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Give each of the components the following instance names accordingly: my_x and my_y.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 5 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On the timeline insert a new layer called “Actions”. Then open up the Actions panel and enter the following code:&lt;br /&gt;&lt;pre class="source-code"&gt;//Sets the minimum (x) and maximum (x) values of the stepper,&lt;br /&gt;//then sets the ovals position to the stepper.&lt;br /&gt;my_x.minimum=0;&lt;br /&gt;my_x.maximum=stage.stageWidth - my_oval.width;&lt;br /&gt;my_x.value=my_oval.x;&lt;br /&gt;&lt;br /&gt;//Sets the minium (y) and maximum (y) values of the stepper,&lt;br /&gt;//then sets the ovals position to the stepper.&lt;br /&gt;my_y.minimum=0;&lt;br /&gt;my_y.maximum=stage.stageHeight - my_oval.height;&lt;br /&gt;my_y.value=my_oval.y;&lt;br /&gt;&lt;br /&gt;//Event listeners to for the steppers.&lt;br /&gt;my_x.addEventListener(Event.CHANGE, moveXOval);&lt;br /&gt;my_y.addEventListener(Event.CHANGE, moveYOval);&lt;br /&gt;&lt;br /&gt;//This moves the oval in the x direction according to the stepper.&lt;br /&gt;function moveXOval(event:Event):void{&lt;br /&gt;my_oval.x=event.target.value;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//This moves the oval in the y direction according to the stepper.&lt;br /&gt;function moveYOval(event:Event):void{&lt;br /&gt;my_oval.y=event.target.value;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 6 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Test your steppers &lt;span style="font-weight: bold;"&gt;Ctrl + Enter&lt;/span&gt;. Now change the values of the steppers and you should notice the oval shape move.&lt;br /&gt;&lt;br /&gt;&lt;embed type="application/x-shockwave-flash" src="http://ilike2flash.host56.com/swf/numericstepper%20component.swf" pluginspage=" http://www.macromedia.com/go/getflashplayer" height="250" width="400"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;You should now be able to use the Numericstepper component in Actionscript 3&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-7172853322784273625?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/7172853322784273625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=7172853322784273625&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/7172853322784273625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/7172853322784273625'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/11/numericstepper-component-in.html' title='Numericstepper component in Actionscript 3'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-511916946673545279</id><published>2009-11-20T09:39:00.000-08:00</published><updated>2009-11-20T09:50:10.112-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Navigation'/><title type='text'>Glow button menu in Actionscript 3</title><content type='html'>In this tutorial you will learn how to create a glow button menu effect in Actionscript 3. The menu buttons will show a glow effect when the mouse is over the menu items, and the glow effect will disappear when the mouse is off the menu items. You will need the tweenMax plug-in for this tutorial which can be downloaded from blog.greensock.com/tweenmaxas3. If you down know how to install tweenMax checkout this &lt;a href="http://www.ilike2flash.com/2009/11/how-to-install-tweenlite-or-tweenmax.html"&gt;tutorial&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Glow button menu in Actionscript 3 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Open a new Flash AS3 file.&lt;br /&gt;Select the Rectangle tool (R) and create your buttons on the stage. I have used # #99FF32 colour for my buttons, but you can use whatever colour you wish. When you have created one button, simply duplicate the number of buttons you want. I have placed my buttons horizontally you can place them vertically if you wish.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/glow-button-1.jpg"&gt;&lt;img style="cursor: pointer; width: 399px; height: 86px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/glow-button-1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Select the Text tool (T) and enter the name of the menu item you want inside the rectangle. I have used Tahoma bold font with #0000FF colour.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/glow-button-2.jpg"&gt;&lt;img style="cursor: pointer; width: 398px; height: 87px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/glow-button-2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Convert each of your menu items in movie clips (F8). The select each item in turn and give them the following instance names accordingly: menu1_mc, menu2_mc and menu3_mc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 4 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On the timeline insert a new layer called Actions. Then open up the Actions panel and enter the following code:&lt;br /&gt;&lt;pre class="source-code"&gt;//Import the packages needed.&lt;br /&gt;import gs.*;&lt;br /&gt;import gs.easing.*;&lt;br /&gt;&lt;br /&gt;//Array to hold all the button instances.&lt;br /&gt;var buttonArr:Array = new Array(menu1_mc,menu2_mc,menu3_mc);&lt;br /&gt;&lt;br /&gt;//Loop through all the button instance using the ‘for loop’.&lt;br /&gt;for (var i =0; i &lt; buttonArr.length; i++) {&lt;br /&gt;    buttonArr[i].addEventListener(MouseEvent.MOUSE_OVER, glow);&lt;br /&gt;    buttonArr[i].addEventListener(MouseEvent.MOUSE_OUT, noGlow);&lt;br /&gt;    buttonArr[i].buttonMode = true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//Function to create glow effect.&lt;br /&gt;function glow(event:MouseEvent):void {&lt;br /&gt;TweenMax.to(event.currentTarget, 1, {glowFilter:{color:0x0000ff, alpha:1, blurX:30, blurY:30,strength:1}});&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//Function to remove glow effect.&lt;br /&gt;function noGlow(event:MouseEvent):void {&lt;br /&gt;TweenMax.to(event.currentTarget, 1, {glowFilter:{alpha:0}});;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 5 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Test your glow button menu &lt;span style="font-weight: bold;"&gt;Ctrl + Enter&lt;/span&gt;. Now move your mouse over the menu items and you should see a glow effect around the button.&lt;br /&gt;&lt;br /&gt;&lt;embed type="application/x-shockwave-flash" src="http://ilike2flash.host56.com/swf/glow%20button.swf" pluginspage=" http://www.macromedia.com/go/getflashplayer" height="150" width="420"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;You should now have a glow button menu in Actionscript 3.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-511916946673545279?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/511916946673545279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=511916946673545279&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/511916946673545279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/511916946673545279'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/11/glow-button-menu-in-actionscript-3.html' title='Glow button menu in Actionscript 3'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-4773728866562036522</id><published>2009-11-17T03:43:00.000-08:00</published><updated>2009-11-17T03:46:00.327-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Change text direction in Flash CS4</title><content type='html'>Everyone knows you can type horizontal text in Flash CS4, but did you know you can change the direction of the text to vertical. You can change the direction of the text without using the transform tool, or repeatedly pressing the enter key to form a vertical line.&lt;br /&gt;&lt;br /&gt;Firstly, you need to select the Text tool (T) then locate the ‘Paragraph’ section on the properties panel. If you can see the properties panel, select &lt;span style="font-weight: bold;"&gt;Window &gt; Properties&lt;/span&gt; (&lt;span style="font-weight: bold;"&gt;Ctrl + F3&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/text-direction-1.jpg"&gt;&lt;img style="cursor: pointer; width: 292px; height: 157px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/text-direction-1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now select the ‘orientation’ button as shown above. You can either select the vertical left to right, or the vertical right to left. Both of these options set the text vertical, but change the reading point of view as shown below. As you can see below the ‘vertical left to right’ expands the text field to the right. While the ‘vertical right to left’ expand the text field to the left. This is a great feature for people using different languages because you can easily change the character flow from left to right.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/text-direction-2.jpg"&gt;&lt;img style="cursor: pointer; width: 245px; height: 301px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/text-direction-2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The orientation button also lets you switch between horizontal and vertical text which avoids you having to manually edit the text. You can change the default text setting to vertical in the Flash preferences by choosing &lt;span style="font-weight: bold;"&gt;Edit &gt; Preferences &gt; Text&lt;/span&gt; then checking the ‘Default text orientation’ box. You also have the option of change the text work flow and disabling the kerning.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/text-direction-3.jpg"&gt;&lt;img style="cursor: pointer; width: 383px; height: 217px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/text-direction-3.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-4773728866562036522?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/4773728866562036522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=4773728866562036522&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/4773728866562036522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/4773728866562036522'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/11/change-text-direction-in-flash-cs4.html' title='Change text direction in Flash CS4'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-2904311319630688872</id><published>2009-11-15T05:01:00.000-08:00</published><updated>2009-12-23T04:45:53.029-08:00</updated><title type='text'>Freebies</title><content type='html'>This freebies section contains a collection of free Flash related goodies. Everything available on this page can be downloaded for free. Remember to &lt;a href="http://feeds2.feedburner.com/blogspot/YLDd"&gt;subscribe&lt;/a&gt; to keep updated with the latest freebies. If you have any suggestions for any freebies, feel free to leave any comments below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ilike2flash.com/2009/09/freebies-at-flabell.html"&gt;Freebies at Flabell&lt;/a&gt; - Flash component freebies for both AS2 and AS3.&lt;br /&gt;&lt;a href="http://www.ilike2flash.com/2009/11/free-flash-templates.html"&gt;Free Flash templates &lt;/a&gt;- 6 Free Flash template websites.&lt;br /&gt;&lt;a href="http://www.ilike2flash.com/2009/12/free-flash-page-flip-effect.html"&gt;Free Flash page flip effect&lt;/a&gt; – Three places where you can find a free page flip effect.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-2904311319630688872?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/2904311319630688872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=2904311319630688872&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/2904311319630688872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/2904311319630688872'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/11/freebies.html' title='Freebies'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-6764300385604485595</id><published>2009-11-14T16:33:00.001-08:00</published><updated>2009-12-30T11:11:33.298-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Freebies'/><title type='text'>Free Flash templates</title><content type='html'>Flash websites are becoming more popular, so I have compiled a small list of websites which provides free Flash templates. If you have any suggestions for more websites, feel free to leave a comment below.&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://bit.ly/flashvillage"&gt;flashvillage&lt;/a&gt; – All of the templates on this website are completely free. There is a tutorial section on the website which teaches you to modify the Flash templates.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bit.ly/flashvillage"&gt;&lt;img style="cursor: pointer; width: 350px; height: 220px;" src="http://i34.tinypic.com/1zcnuoo.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. &lt;a href="http://bit.ly/FlashMo"&gt;flashmo&lt;/a&gt; – A popular website with many styles of templates. There is also a premium section where you can purchase templates.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bit.ly/FlashMo"&gt;&lt;img style="cursor: pointer; width: 350px; height: 212px;" src="http://i38.tinypic.com/27wys7.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. &lt;a href="http://bit.ly/flashtemplatetoday"&gt;flash-templates-today&lt;/a&gt; – Unique template designs that can be downloaded for free. There are currently 34 templates that can be downloaded.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bit.ly/flashtemplatetoday"&gt;&lt;img style="cursor: pointer; width: 350px; height: 203px;" src="http://i34.tinypic.com/2d6mwpf.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. &lt;a href="http://bit.ly/flashtemplatedesign"&gt;flashtemplatesdesign&lt;/a&gt; – Many different categories of Flash templates.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bit.ly/flashtemplatedesign"&gt;&lt;img style="cursor: pointer; width: 350px; height: 197px;" src="http://i34.tinypic.com/2cgzk8w.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5. &lt;a href="http://bit.ly/massivetemplates"&gt;massivetemplates&lt;/a&gt;- Massive amounts of free templates.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bit.ly/massivetemplates"&gt;&lt;img style="cursor: pointer; width: 350px; height: 200px;" src="http://i36.tinypic.com/2v9w7rs.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6. &lt;a href="http://bit.ly/templatesbox"&gt;templatesbox&lt;/a&gt;- Contains a large collection of free Flash templates.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bit.ly/templatesbox"&gt;&lt;img style="cursor: pointer; width: 350px; height: 200px;" src="http://i36.tinypic.com/343g3mp.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-6764300385604485595?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/6764300385604485595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=6764300385604485595&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/6764300385604485595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/6764300385604485595'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/11/free-flash-templates.html' title='Free Flash templates'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-2958965465603656357</id><published>2009-11-13T10:24:00.000-08:00</published><updated>2009-11-13T10:37:01.776-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Navigation'/><title type='text'>Stretch menu effect in Actionscript 3</title><content type='html'>In this tutorial you will learn how to create a stretch menu effect in Actionscript 3.0.&lt;br /&gt;The menu effect will stretch horizontally when the mouse is over the menu items, and will shrink when the mouse is off the menus items. This stretching effect is created using motion tweens in the timeline. I have created this tutorial in Flash CS4, but it should still work for CS3.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Stretch menu effect in Actionscript 3.0 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Open a new Flash AS3 file.&lt;br /&gt;Select the Rectangle tool (R) and drag a small rectangle shape on the stage like below. I have placed the rectangle shape at the left most edge of the stage. The dimensions for my rectangle shape are 35 width &amp;amp; 35 height.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stretch-menu-effect-1.jpg"&gt;&lt;img style="cursor: pointer; width: 296px; height: 178px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stretch-menu-effect-1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Convert your rectangle shape into a move clip (&lt;span style="font-weight: bold;"&gt;F8&lt;/span&gt;). Then double click on the movie clip to enters its timeline and replicate the following layers. The first layer will hold the Actions and has a stop() method in the 1st and 20th frames. The second layer will hold the text and the third layer will hold the menu items.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stretch-menu-effect-2.jpg"&gt;&lt;img style="cursor: pointer; width: 362px; height: 101px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stretch-menu-effect-2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Right click on the rectangle shape and select ‘Create Motion Tween’ from the drop down menu. If a warning message appears click OK. This will convert the rectangle shape into a movie clip.&lt;br /&gt;&lt;br /&gt;On the timeline select the 13th frame. Then select the free transform tool and change the width to 130 from the properties panel. Your rectangle shape should look like below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stretch-menu-effect-3.jpg"&gt;&lt;img style="cursor: pointer; width: 296px; height: 170px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stretch-menu-effect-3.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 4 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On the timeline, lock the ‘Menu Item’ layer and then select the ‘Text’ layer and insert a key frame (&lt;span style="font-weight: bold;"&gt;F6&lt;/span&gt;) on the 12th frame.&lt;br /&gt;&lt;br /&gt;Type some text on the menu items as show below. I have used Arial font with 15pt size.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stretch-menu-effect-4.jpg"&gt;&lt;img style="cursor: pointer; width: 281px; height: 179px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stretch-menu-effect-4.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Right click on your text message and select ‘Convert to Motion tween’ from the drop down menu. On the timeline select the 18th frame and then move your text message slightly to the right. This will create a moving effect for the text when the menu item is stretching.&lt;br /&gt;&lt;br /&gt;Select the 11th frame, then click the message on the stage and change the alpha to 0% on the colour effect panel. Your timeline should eventually look like below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stretch-menu-effect-5.jpg"&gt;&lt;img style="cursor: pointer; width: 366px; height: 96px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/stretch-menu-effect-5.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 5 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Return to the main timeline. From the library panel duplicate as many menu items as you wish by right clicking on the item and selecting ‘Duplicate’. Remember to change the text message movie clips for each menu item, or the text will remain the same. After you have finished duplicating the menu items drag them onto the stage.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 6&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Give each of your menu items the following instance names: menu1, menu2, menu3 and menu4 accordingly.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 7 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On the timeline create a new layer called ‘Actions’ then open up the Actions panel and enter the following code.&lt;br /&gt;&lt;pre class="source-code"&gt;//Array to hold all the button instances.&lt;br /&gt;var menuArr:Array=new Array(menu1,menu2,menu3,menu4);&lt;br /&gt;&lt;br /&gt;//This loops through all the buttons and adds event listeners to each button.&lt;br /&gt;for (var i = 0; i &lt; menuArr.length; i++) {    &lt;br /&gt;menuArr[i].addEventListener(MouseEvent.MOUSE_OVER, stretchOut);   &lt;br /&gt;menuArr[i].addEventListener(MouseEvent.MOUSE_OUT, stretchIn);    &lt;br /&gt;menuArr[i].buttonMode = true; }  &lt;br /&gt;&lt;br /&gt;//This function plays the stretch effect.&lt;br /&gt;function stretchOut (event:MouseEvent):void {    &lt;br /&gt;event.currentTarget.gotoAndPlay("2");&lt;br /&gt;}  &lt;br /&gt;&lt;br /&gt;//This function returns the menu to its original position.&lt;br /&gt;function stretchIn(event:MouseEvent):void {    &lt;br /&gt;event.currentTarget.gotoAndStop("1");&lt;br /&gt;} &lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 8 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Test your stretch menu effect &lt;span style="font-weight: bold;"&gt;Ctrl + Enter&lt;/span&gt;. Now move your mouse over each menu item and you should see it stretch.&lt;br /&gt;&lt;br /&gt;&lt;embed type="application/x-shockwave-flash" src="http://ilike2flash.host56.com/swf/sliding%20out%20menu2.swf" pluginspage=" http://www.macromedia.com/go/getflashplayer" height="200" width="400"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;You should now have a stretch menu effect. Remember to &lt;a href="http://feeds2.feedburner.com/blogspot/YLDd"&gt;subscribe &lt;/a&gt;or &lt;a href="http://www.twitter.com/ilike2flash"&gt;follow me&lt;/a&gt; to keep updated with the latest tutorials.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-2958965465603656357?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/2958965465603656357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=2958965465603656357&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/2958965465603656357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/2958965465603656357'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/11/stretch-menu-effect-in-actionscript-3.html' title='Stretch menu effect in Actionscript 3'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-2700394340419057226</id><published>2009-11-10T14:58:00.000-08:00</published><updated>2009-11-10T15:11:23.108-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Games'/><title type='text'>Magic 8 ball tutorial in AS3</title><content type='html'>In this tutorial you will learn how create a magic 8 ball game in Actionscript 3.0. A magic 8 ball is a classic toy used for telling the future by answering your questions. You would normally ask a question to the 8 ball, shake it and turn it over to reveal the predicted answer. The standard magic 8 ball has twenty predicted answers: ten positives, five negatives and five maybes. I will be reducing the number of answers to ten in this tutorial.&lt;br /&gt;&lt;br /&gt;I will be creating this tutorial in two parts. The first part will deal with creating the initially magic 8 ball game, and the second part will deal with adding the special effects such as the movements and sounds.&lt;br /&gt;&lt;br /&gt;You will need the &lt;a href="http://www.ilike2flash.com/2009/11/how-to-install-tweenlite-or-tweenmax.html"&gt;tweenLite plug-in&lt;/a&gt; for this tutorial which can be downloaded from: blog.greensock.com/tweenlite/.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Magic 8 ball tutorial in AS3 – part 1 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Open a new Flash AS3 file and then replicate the timeline shown below. I have created three layers on the timeline. The first layer is called ‘actions’ and is used for holding the Actionscript code. The second layer is called ‘labels’ and has two keys frames with different names. To add these names you select the appropriate key frames and change the name in the properties panel. The final layer is called ‘Magic 8 ball’ and is used display the magic 8 ball.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/magic-8-ball-1.jpg"&gt;&lt;img style="cursor: pointer; width: 352px; height: 95px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/magic-8-ball-1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On the timeline, select the ‘Magic 8 ball’ layer then the first frame.&lt;br /&gt;Create the following magic 8 ball as shown below using the Oval tool. The magic 8 ball is simply two oval shapes inside each other with a letter in the centre.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/magic-8-ball-3.jpg"&gt;&lt;img style="cursor: pointer; width: 251px; height: 230px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/magic-8-ball-3.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Convert your magic 8 ball into a movie clip (&lt;span style="font-weight: bold;"&gt;F8&lt;/span&gt;). Then give the movie clip the instance name: “magic8Front_mc”.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Select the text tool with input text and drag an input text field below the magic 8 ball. Make sure you select the ‘&lt;span style="font-weight: bold;"&gt;check border around text&lt;/span&gt;’ button, and change the behaviour to “&lt;span style="font-weight: bold;"&gt;Single line&lt;/span&gt;”. Then select the input text box and give the instance name: “question_txt”. You may also wish to embed the uppercase, lowercase and punctuation characters into the input text field&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/magic-8-ball-4.jpg"&gt;&lt;img style="cursor: pointer; width: 325px; height: 249px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/magic-8-ball-4.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 5 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On the timeline, select the ‘Magic 8 ball’ layer then the tenth frame.&lt;br /&gt;Create the reverse of the magic 8 ball as shown below using the Oval tools. I have added a linear gradient to the outer oval shape, and have used a solid black colour for liner oval shape with a #CCCCCC stroke.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/magic-8-ball-5.jpg"&gt;&lt;img style="cursor: pointer; width: 254px; height: 243px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/magic-8-ball-5.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 6 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Convert the reverse of the magic 8 ball into a movie clip (&lt;span style="font-weight: bold;"&gt;F8&lt;/span&gt;), and then give the instance name: “magic8Back_mc”&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 7 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Double click on the reverse magic 8 ball to enter its timeline. Then insert a new layer and create the following triangle shape inside the inner oval. I have given the triangle a radial gradient and a #2739A9  coloured stroke.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/magic-8-ball-6.jpg"&gt;&lt;img style="cursor: pointer; width: 250px; height: 238px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/magic-8-ball-6.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 8 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Convert the triangle shape into a movie clip (&lt;span style="font-weight: bold;"&gt;F8&lt;/span&gt;), and select the centre registration point and then give the following instance name: “output_mc”.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 9&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Double click on the triangle to enter its timeline. Then insert a new layer and select the text tool with dynamic text, and drag a dynamic text field on top of the triangle shape like below. I have given the dynamic text field a white colour and ‘align centre’ for the format.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/magic-8-ball-7.jpg"&gt;&lt;img style="cursor: pointer; width: 254px; height: 238px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/magic-8-ball-7.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Select the dynamic text field and give the following instance name: “answer_txt”.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Return to the main timeline. On the Actions layer select the first frame and then open up the Actionscript panel and enter the following code.&lt;br /&gt;&lt;pre class="source-code"&gt;//Imports the tweenlite packages.&lt;br /&gt;import gs.*;&lt;br /&gt;import gs.easing.*;&lt;br /&gt;&lt;br /&gt;//Stops the timeline playhead.&lt;br /&gt;stop();&lt;br /&gt;&lt;br /&gt;//Adds the click event listener to magic 8 ball.&lt;br /&gt;magic8Front_mc.addEventListener(MouseEvent.CLICK, showNext);&lt;br /&gt;&lt;br /&gt;function showNext(event:MouseEvent):void {  &lt;br /&gt;   //A prompt is displayed if no question is entered.&lt;br /&gt;   if (question_txt.text==""|| question_txt.text=="Enter Question") {&lt;br /&gt;       question_txt.text="Enter Question";&lt;br /&gt;   } else {&lt;br /&gt;       gotoAndStop("Answer");&lt;br /&gt;       showAnswers();&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function showAnswers() {&lt;br /&gt;   //Create a new array with all the responses.&lt;br /&gt;   var responseArr:Array = new Array();&lt;br /&gt;   responseArr[0]="YES";&lt;br /&gt;   responseArr[1]="MOST LIKELY";&lt;br /&gt;   responseArr[2]="IT IS CERTAIN";&lt;br /&gt;   responseArr[3]="OUTLOOK GOOD";&lt;br /&gt;   responseArr[4]="NO";&lt;br /&gt;   responseArr[5]="DOUBTFUL";&lt;br /&gt;   responseArr[6]="REPY IS NO";&lt;br /&gt;   responseArr[7]="ASK AGAIN";&lt;br /&gt;   responseArr[8]="TRY AGAIN";&lt;br /&gt;   responseArr[9]="BETTER NOT";&lt;br /&gt;   responseArr[10]="MAYBE";&lt;br /&gt;&lt;br /&gt;   //Chooses a random number in the array.&lt;br /&gt;   var r:int=Math.floor(Math.random()*responseArr.length);&lt;br /&gt;&lt;br /&gt;   //Display the random response in the text field.&lt;br /&gt;   magic8Back_mc.output_mc.answer_txt.text=responseArr[r];&lt;br /&gt; &lt;br /&gt;   //Set the answer triangle initially invisible.&lt;br /&gt;   magic8Back_mc.output_mc.alpha = 0;&lt;br /&gt; &lt;br /&gt;   //Displays a slight random position of the triangle shape.&lt;br /&gt;   magic8Back_mc.output_mc.rotation=Math.random()*30;&lt;br /&gt;&lt;br /&gt;   //This creates the appearing effect with tweenlite.&lt;br /&gt;   TweenLite.to(magic8Back_mc.output_mc, 3, {autoAlpha:1});&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 11&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Test the magic 8 ball &lt;span style="font-weight: bold;"&gt;Ctrl + Enter.&lt;/span&gt; Now type your question in the input field and click on the magic 8 ball,  a response will appear.&lt;br /&gt;&lt;br /&gt;&lt;embed type="application/x-shockwave-flash" src="http://ilike2flash.host56.com/swf/magic%208%20ball%203.swf" pluginspage=" http://www.macromedia.com/go/getflashplayer" height="350" width="400"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;You should have a magic 8 ball in Actionscript 3.0. Remember to &lt;a href="http://feeds2.feedburner.com/blogspot/YLDd"&gt;subscribe&lt;/a&gt; to stay tuned to part 2 where I will be adding movement and sound effects to the magic 8 ball.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-2700394340419057226?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/2700394340419057226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=2700394340419057226&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/2700394340419057226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/2700394340419057226'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/11/magic-8-ball-tutorial-in-as3.html' title='Magic 8 ball tutorial in AS3'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-6506435153118283815</id><published>2009-11-08T06:14:00.000-08:00</published><updated>2009-11-08T06:18:42.800-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActionScript 3'/><title type='text'>Load external SWF in AS3</title><content type='html'>In this Flash tutorial you will learn how to load an external SWF file using Actionscript 3.0. In Actionscript 2.0 you could use the MovieClipLoader class or the loadMovie command to load an external SWF file, but now in AS3 you have to use the Loader class. The Loader class was also used in a previous tutorial which &lt;a href="http://www.ilike2flash.com/2009/07/load-external-text-in-actionscript-3.html"&gt;loaded external text&lt;/a&gt; into a dynamic text field.&lt;br /&gt;&lt;br /&gt;There are several advantages of loading external SWF files. Firstly, a large project can be broken into multiple movies, each of the SWF files will be smaller and therefore more memory efficient and faster. Also, multiple SWF files can be played in series without the need to refresh the html page.&lt;br /&gt;&lt;br /&gt;You will need a SWF file for this tutorial. This file should be placed in the same directory as your fla file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Load external SWF in AS3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Open up a Flash AS3 file and then select first frame on the timeline. Open up the Actions panel and enter the following code. Make sure the SWF you want to load is in the same directory as your fla file.&lt;br /&gt;&lt;pre class="source-code"&gt;//This creates a new instance of the loader object and adds it to the stage.&lt;br /&gt;var my_Loader:Loader = new Loader();&lt;br /&gt;addChild(my_Loader);&lt;br /&gt;&lt;br /&gt;//This creates a new instance of the URLRequest object that contains the path&lt;br /&gt;//to the external swf. The load method then loads the SWF file into the loader&lt;br /&gt;//object.&lt;br /&gt;var my_url:URLRequest=new URLRequest("example.swf");&lt;br /&gt;my_Loader.load(my_url);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The code above loads the SWF file to the default location (0, 0) on the stage. If you want to change the position of the SWF, you can adjust the x and y properties of the loader instance.&lt;br /&gt;This is because the Loader class is a subclass of the DisplayObject which means you access the properties.&lt;br /&gt;&lt;pre class="source-code"&gt;//This will offset the load SWF file, so be appear at (20, 20) on the stage.&lt;br /&gt;my_Loader.x = 20;&lt;br /&gt;my_Loader.y = 20;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The above method for loading an external SWF file is not the best as it does not wait until the file is completed loading. So, to fix this problem the code will need to be modified. An event listener will have to be attached to the loader instance to listen to when the file has completed loading. I have also added a listener to detect any errors when loading a file, so a message will be displayed if the file is not found.&lt;br /&gt;&lt;pre class="source-code"&gt;//This creates a new instance of the loader object.&lt;br /&gt;var my_Loader:Loader = new Loader();&lt;br /&gt;&lt;br /&gt;//This creates a new instance of the URLRequest object that contains the&lt;br /&gt;//path to the external SWF.&lt;br /&gt;var my_url:URLRequest=new URLRequest("example.swf");&lt;br /&gt;&lt;br /&gt;//These listeners detect when the file has finished loading, and if the&lt;br /&gt;//correct file is loaded.&lt;br /&gt;my_Loader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading);&lt;br /&gt;my_Loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);&lt;br /&gt;&lt;br /&gt;//The load method then loads the SWF file into the loader object.&lt;br /&gt;my_Loader.load(my_url);&lt;br /&gt;&lt;br /&gt;//This function adds the external SWF to the stage.&lt;br /&gt;function finishLoading(loadEvent:Event) {&lt;br /&gt;addChild(loadEvent.currentTarget.content);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//This function displays a message if the file is not found.&lt;br /&gt;function errorHandler(errorEvent:Event):void {&lt;br /&gt;trace("file missing");&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note&lt;/span&gt;: The loaded SWF file will have the same fps as the parent movie. So, if the parent movie is 25fps the loaded SWF will also be 25fps.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-6506435153118283815?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/6506435153118283815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=6506435153118283815&amp;isPopup=true' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/6506435153118283815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/6506435153118283815'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/11/load-external-swf-in-as3.html' title='Load external SWF in AS3'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-3395655814148895357</id><published>2009-11-04T04:56:00.000-08:00</published><updated>2009-11-21T05:00:37.515-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Articles'/><title type='text'>Preloader showcase</title><content type='html'>I found a showcase of preloaders from past and present websites over at &lt;a href="http://1fe496c5.tinybucks.net/"&gt;prettyloaded.com&lt;/a&gt;. This website contains an archive of preloaders which basically load preloader after preloader. If you are a Flash designer then this website can provide you with some inspiration. There is also an option to submit a preloader, so if you spot a unique preloader then why not submit it to the website.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i49.tinypic.com/1zb6l3c.jpg"&gt;&lt;img style="cursor: pointer; width: 369px; height: 266px;" src="http://i49.tinypic.com/1zb6l3c.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;So what exactly is a preloader? A preloader is basically a visual cue to show information about the download of a file. The preloader can be made to look attractive to keep the user engaged while the data is being loaded in the background.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-3395655814148895357?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/3395655814148895357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=3395655814148895357&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/3395655814148895357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/3395655814148895357'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/11/preloader-showcase.html' title='Preloader showcase'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-6022684614895483204</id><published>2009-11-03T07:27:00.000-08:00</published><updated>2009-11-03T07:31:41.329-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>How to install tweenLite or tweenMax</title><content type='html'>Many of my tutorials use the tweenLite or tweenMax plug-ins for tweening effects. A common question I get asked all the time is, how to do you install tweenLite or tweenMax? Below is a quick tutorial on how to set up tweenLite or tweenMax.&lt;br /&gt;&lt;br /&gt;1. Go to &lt;a href="http://blog.greensock.com/"&gt;blog.greensock.com&lt;/a&gt; and download the tweenLite or tweenMax zip file. Unzip the file and place the ‘gs’ folder inside the same folder as your Fla file. This means Flash will be able to find the class files from the ‘gs’ folder when you publish your swf file.&lt;br /&gt;&lt;br /&gt;You can also set up classpath which means you can place the ‘gs’ folder anywhere on your hard drive, but you need to make sure Flash has a reference to the folder. Go to &lt;span style="font-weight: bold;"&gt;Edit &gt; Preferences &gt; Actionscript &gt; Actionscript 3.0 settings&lt;/span&gt; and then select the ‘add new path’ button and browse to the location of your class files then click ok.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/install-tweenlite.jpg"&gt;&lt;img style="cursor: pointer; width: 400px; height: 196px;" src="http://i290.photobucket.com/albums/ll261/ilike2/ilike2flash/install-tweenlite.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.Before tweenLite or tweenMax will work you need to import the class files. This is so that Flash knows where to look for the files. The most common import statements are show below.&lt;br /&gt;&lt;pre class="source-code"&gt;//Imports the tweenLite class&lt;br /&gt;import gs.TweenLite;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="source-code"&gt;&lt;br /&gt;//Imports all the classes in the gs folder.&lt;br /&gt;import gs.*;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The tweenLite and tweenMax plug-ins come with two demo files that show exactly which statements you need to import for each property, so be sure to keep these files for reference.&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-6022684614895483204?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/6022684614895483204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=6022684614895483204&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/6022684614895483204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/6022684614895483204'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/11/how-to-install-tweenlite-or-tweenmax.html' title='How to install tweenLite or tweenMax'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4936679048645236623.post-7801597185682410504</id><published>2009-11-02T10:23:00.000-08:00</published><updated>2009-11-02T13:27:27.370-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Special effect'/><title type='text'>Black &amp; white gallery part 2</title><content type='html'>This is a small update from the &lt;a href="http://www.ilike2flash.com/2009/06/black-white-gallery-effect.html"&gt;black and white gallery&lt;/a&gt; tutorial. In the previous tutorial you had to use the timeline to add key frames to adjust the saturation property of the movie clip which created the black and white effect. However, I discovered that this effect can be achieved purely using Actionscript code, so step 5 from the previous tutorial can be completely missed out. For this non-timeline effect to work, you will need to use a plugin called tweenMax which can be downloaded from blog.greensock.com/tweenmax. You can of course use the ColorMatrixFilter and Abjustcolor classes from Actionscript 3.0 to create the same effect, but I prefer using tweenMax because you only need five additional lines of code.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Black &amp;amp; white gallery - part 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Make sure you have completed Step 1 – 4 from the Black &amp;amp; white gallery before you attempt this tutorial as this is a continuation from Step 4. I have removed step 5 from previous tutorial and replaced it with the following step.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 5 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On the timeline create a new layer called Actions. Then open up the Actions panel and enter the following code:&lt;br /&gt;&lt;br /&gt;&lt;pre class="source-code"&gt;//Import the packages needed.&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;import gs.*; &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;import gs.easing.*;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;//1.Array to hold all the picture instances.&lt;br /&gt;var picArr:Array=new Array(pic1_mc,pic2_mc,pic3_mc,pic4_mc,pic5_mc,&lt;br /&gt;pic6_mc,pic7_mc,pic8_mc,pic9_mc);&lt;br /&gt;&lt;br /&gt;//2.Function to control the rollover and rollout effect&lt;br /&gt;function rollBW(picture:MovieClip):void {&lt;br /&gt;picture.addEventListener(MouseEvent.MOUSE_OVER, over);&lt;br /&gt;picture.addEventListener(MouseEvent.MOUSE_OUT, out);&lt;br /&gt;&lt;br /&gt;function over(event:MouseEvent):void {&lt;br /&gt;   &lt;span style="color: rgb(255, 0, 0);"&gt; TweenMax.to(picture, 1, {colorMatrixFilter:{}});&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function out(event:MouseEvent):void {&lt;br /&gt;    &lt;span style="color: rgb(255, 0, 0);"&gt;TweenMax.to(picture, 1, {colorMatrixFilter:{colorize:0xFFFFFF}});&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//3.For loop to call move images, and initally set the set images black and white&lt;br /&gt;for (var i = 0; i &lt; picArr.length; i++) {  &lt;br /&gt;rollBW(picArr[i]);   &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;TweenMax.to(picArr[i], 0, {colorMatrixFilter:{colorize:0xFFFFFF}}); &lt;/span&gt;&lt;br /&gt;} &lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 6 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Test your black and white gallery effect &lt;span style="font-weight: bold;"&gt;Ctrl + Enter&lt;/span&gt;. Now move your mouse over each of the images and you should notice them turning into colour images.&lt;br /&gt;&lt;br /&gt;&lt;embed type="application/x-shockwave-flash" src="http://ilike2flash.host56.com/swf/b%20&amp;amp;w%20mouseover2.swf" pluginspage=" http://www.macromedia.com/go/getflashplayer" height="280" width="480"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;Copyright © 2009 ilike2flash. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. No unauthorized copying allowed.&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4936679048645236623-7801597185682410504?l=www.ilike2flash.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ilike2flash.com/feeds/7801597185682410504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=4936679048645236623&amp;postID=7801597185682410504&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/7801597185682410504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4936679048645236623/posts/default/7801597185682410504'/><link rel='alternate' type='text/html' href='http://www.ilike2flash.com/2009/11/black-white-gallery-part-2.html' title='Black &amp; white gallery part 2'/><author><name>iliketo</name><uri>http://www.blogger.com/profile/04312871714411762939</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12158314976685393344'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>