<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3335221968081944600</id><updated>2011-10-23T10:40:22.160-06:00</updated><title type='text'>Flash ActionScript 3 (AS3) Snippets for Mortals</title><subtitle type='html'>Very simple snippets that tell you just what you need to solve everyday ActionScript tasks.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>31</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-4508534777032640352</id><published>2010-11-02T14:55:00.000-06:00</published><updated>2010-11-02T14:55:47.332-06:00</updated><title type='text'>Putting a PayPal Donation Button In Flash</title><content type='html'>This was a real mysterious one but I think I figured it out. &lt;br /&gt;&lt;br /&gt;Here is the code for donating a fixed amount. This option adds an item at the dollar amount you set to the PayPal cart:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var variables:URLVariables = new URLVariables();&lt;br /&gt;variables.cmd = "_cart";&lt;br /&gt;variables.add = "1";&lt;br /&gt;variables.amount = String(  TOTAL DOLLAR AMOUNT HERE  );&lt;br /&gt;variables.business = "  YOUR PAYPAL EMAIL HERE  ";&lt;br /&gt;variables.item_name = "Item 1";&lt;br /&gt;variables.item_number = "123456789";&lt;br /&gt;variables.tax = "0";&lt;br /&gt;variables.currency_code = "USD";&lt;br /&gt;variables.page_style = "PayPal";&lt;br /&gt;variables.no_shipping = "0";&lt;br /&gt;variables.undefined_quantity = "1";&lt;br /&gt;variables.rn = "1";&lt;br /&gt;variables.shipping = "0";&lt;br /&gt;variables.shopping_url = "http://www.salvationarmyusa.org";&lt;br /&gt;var request:URLRequest = new URLRequest("https://www.paypal.com/cgi-bin/webscr");&lt;br /&gt;request.method = URLRequestMethod.POST;&lt;br /&gt;request.data = variables;&lt;br /&gt;navigateToURL(request, "_self");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here is the code for donating an amount decided by user:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var variables:URLVariables = new URLVariables();&lt;br /&gt;variables.cmd = "_donations";&lt;br /&gt;variables.add = "1";&lt;br /&gt;variables.business = "YOUR PAYPAL EMAIL GOES HERE";&lt;br /&gt;variables.item_name = "Donation to Salvation Army";&lt;br /&gt;variables.item_number = "123456789";&lt;br /&gt;variables.tax = "0";&lt;br /&gt;variables.currency_code = "USD";&lt;br /&gt;variables.page_style = "PayPal";&lt;br /&gt;variables.no_shipping = "0";&lt;br /&gt;variables.undefined_quantity = "1";&lt;br /&gt;variables.rn = "1";&lt;br /&gt;variables.shipping = "0";&lt;br /&gt;variables.shopping_url = "http://www.salvationarmyusa.org";&lt;br /&gt;var request:URLRequest = new URLRequest("https://www.paypal.com/cgi-bin/webscr");&lt;br /&gt;request.method = URLRequestMethod.POST;&lt;br /&gt;request.data = variables;&lt;br /&gt;navigateToURL(request, "_self");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And &lt;a href="https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&amp;content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables"&gt;here is PayPal's description of the variables&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-4508534777032640352?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/4508534777032640352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=4508534777032640352' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/4508534777032640352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/4508534777032640352'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2010/11/putting-paypal-donation-button-in-flash.html' title='Putting a PayPal Donation Button In Flash'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-4835109394373753378</id><published>2010-10-11T04:41:00.000-06:00</published><updated>2010-10-11T04:41:45.057-06:00</updated><title type='text'>AS3 Shuffle Array</title><content type='html'>This reorders the elements of an array into a random order.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var anArray:Array = [1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4];&lt;br /&gt;anArray=shuffleArray(anArray);&lt;br /&gt;&lt;br /&gt;function shuffleArray(arr:Array):Array{&lt;br /&gt; var arr2:Array = [];&lt;br /&gt; while (arr.length &gt; 0){&lt;br /&gt;  arr2.push(gendersArray.splice(Math.round(Math.random() * (arr.length - 1)), 1)[0]);&lt;br /&gt; }&lt;br /&gt; return arr2;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-4835109394373753378?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/4835109394373753378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=4835109394373753378' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/4835109394373753378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/4835109394373753378'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2010/10/as3-shuffle-array.html' title='AS3 Shuffle Array'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-6628867248750049284</id><published>2009-11-04T10:54:00.006-07:00</published><updated>2009-11-04T11:15:15.084-07:00</updated><title type='text'>Convert a String into an Array Using Actionscript 3</title><content type='html'>I was trying to pass an array through SWFObject flashvars and realized it can't be done. Instead you need to use a string for your array, pass it into Flash , then convert it to an array using the actionscript "split" function.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;//the string to turn into an array&lt;br /&gt;var arrayString:String="1,2,3"; &lt;br /&gt;&lt;br /&gt;//convert the string to an array using the "," as a divider (aka delimiter)&lt;br /&gt;var newArray:Array= arrayString.split(",")  &lt;br /&gt;&lt;br /&gt;//convert the array items from strings to numbers&lt;br /&gt;var n=newArray.length;&lt;br /&gt; while (n--) {&lt;br /&gt;  newArray[n]=Number(newArray[n])&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;//test: to make sure conversion to numbers worked&lt;br /&gt;trace(String(trainCubesArray[0]+1)); //test: result is 2   &lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-6628867248750049284?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/6628867248750049284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=6628867248750049284' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/6628867248750049284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/6628867248750049284'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2009/11/i-was-trying-to-pass-array-through.html' title='Convert a String into an Array Using Actionscript 3'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-6888275022512152119</id><published>2009-10-29T10:03:00.002-06:00</published><updated>2009-10-29T10:05:10.286-06:00</updated><title type='text'>SWFObject Wizard Generator</title><content type='html'>&lt;div&gt;This page is a wizard that lets you enter values and it creates a SWFObject embed for you. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://www.bobbyvandersluis.com/swfobject/generator/index.html"&gt;http://www.bobbyvandersluis.com/swfobject/generator/index.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-6888275022512152119?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/6888275022512152119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=6888275022512152119' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/6888275022512152119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/6888275022512152119'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2009/10/swfobject-wizard-generator.html' title='SWFObject Wizard Generator'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-6669408364953581140</id><published>2009-10-29T09:47:00.004-06:00</published><updated>2009-10-29T10:37:20.352-06:00</updated><title type='text'>Detecting when mouse leaves stage</title><content type='html'>This is how you detect if the mouse leaves Flash and rolls over to web page:&lt;div&gt;&lt;pre&gt;stage.addEventListener( Event.MOUSE_LEAVE, mouseLeaveListener );&lt;/pre&gt;&lt;/div&gt;Additionally you can also tell when the flash movie gains and loses focus, which you couldn't do in AS 2, by listening for Event.ACTIVATE and Event.DEACTIVATE.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is some code that detects enter/exit. Just paste into main timeline, compile, then view embedded in an html page:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;//draw a box for demonstration purposes&lt;br /&gt;var c:Sprite = new Sprite();&lt;br /&gt;c.graphics.beginFill(0xFF);&lt;br /&gt;c.graphics.drawRect(0, 0, 200, 200);&lt;br /&gt;addChild(c);&lt;br /&gt;&lt;br /&gt;//NOTE this only works embedded in a web page&lt;br /&gt;//detect mouse leaving flash and rolling over web page&lt;br /&gt;stage.addEventListener(Event.MOUSE_LEAVE, cursorHide);&lt;br /&gt;&lt;br /&gt;//there is no mouse exit so you need to use this&lt;br /&gt;stage.addEventListener(MouseEvent.MOUSE_MOVE, cursorFollow);&lt;br /&gt;&lt;br /&gt;function cursorHide(evt:Event):void {&lt;br /&gt; c.alpha=.2&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function cursorFollow(evt:MouseEvent):void {&lt;br /&gt; c.alpha=1&lt;br /&gt; evt.updateAfterEvent();&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-6669408364953581140?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/6669408364953581140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=6669408364953581140' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/6669408364953581140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/6669408364953581140'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2009/10/detecting-when-mouse-leaves-stage.html' title='Detecting when mouse leaves stage'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-5292499773333734788</id><published>2009-08-05T11:10:00.001-06:00</published><updated>2009-08-05T11:12:05.931-06:00</updated><title type='text'>Link navigateToURL that pops a new window with dimensions</title><content type='html'>&lt;pre&gt;&lt;br /&gt;safePromo_mc.addEventListener(MouseEvent.MOUSE_DOWN, safeClick);&lt;br /&gt;function safeClick(e:MouseEvent):void {&lt;br /&gt;  var jscommand:String = "window.open('http://www.adobe.com','win','height=200,&lt;br /&gt;           width=300,toolbar=no,scrollbars=yes');"; &lt;br /&gt;  var url:URLRequest = new URLRequest("javascript:" + jscommand + " void(0);"); &lt;br /&gt;  navigateToURL(url, "_self"); &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-5292499773333734788?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/5292499773333734788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=5292499773333734788' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/5292499773333734788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/5292499773333734788'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2009/08/link-navigatetourl-that-pops-new-window.html' title='Link navigateToURL that pops a new window with dimensions'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-2810337456689203772</id><published>2009-02-24T09:26:00.000-07:00</published><updated>2009-02-24T09:27:11.164-07:00</updated><title type='text'>Blur Using AS3</title><content type='html'>&lt;pre&gt;var blur:BlurFilter = new BlurFilter();&lt;br /&gt;blur.blurX=20;&lt;br /&gt;blur.blurY=20;&lt;br /&gt;blur.quality=BitmapFilterQuality.LOW;&lt;br /&gt;displayObjectToBlur_mc.filters=[blur];&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-2810337456689203772?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/2810337456689203772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=2810337456689203772' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/2810337456689203772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/2810337456689203772'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2009/02/blur-using-as3.html' title='Blur Using AS3'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-4093962052154135878</id><published>2009-02-09T07:18:00.003-07:00</published><updated>2009-02-09T07:19:46.472-07:00</updated><title type='text'>AS3 full screen mode</title><content type='html'>Heres a function to toggle full screen mode using AS3. Note that in fullscreen mode that only the "non-printing" keys work (arrows, shift, etc). &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function toggleFullScreenMode(e:MouseEvent):void {&lt;br /&gt; if (viewingFullScreen==false) {&lt;br /&gt;  viewingFullScreen=true;&lt;br /&gt;  navsNorthMultiPage_mc.tween_mc.eastButtons_mc.fullScreenAnim_mc.gotoAndPlay("full");&lt;br /&gt;  navsSouthMultiPage_mc.tween_mc.eastButtons_mc.fullScreenAnim_mc.gotoAndPlay("full");&lt;br /&gt;  stage.displayState="fullScreen";&lt;br /&gt; } else {&lt;br /&gt;  viewingFullScreen=false;&lt;br /&gt;  navsNorthMultiPage_mc.tween_mc.eastButtons_mc.fullScreenAnim_mc.gotoAndPlay("out");&lt;br /&gt;  navsSouthMultiPage_mc.tween_mc.eastButtons_mc.fullScreenAnim_mc.gotoAndPlay("out");&lt;br /&gt;  stage.displayState="normal";&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-4093962052154135878?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/4093962052154135878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=4093962052154135878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/4093962052154135878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/4093962052154135878'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2009/02/heres-function-to-toggle-full-screen.html' title='AS3 full screen mode'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-7511880884893016644</id><published>2008-12-19T09:09:00.004-07:00</published><updated>2008-12-19T09:13:36.567-07:00</updated><title type='text'>AS3 Disable Yellow Tab Rectangles</title><content type='html'>Are you wondering why when you hit tab in your Flash site you get those nasty yellow rectangles around your links? Here's how to disable them:&lt;br /&gt;&lt;br /&gt;If you have a movieclip with a bunch of buttons inside it and you want to disable all of them with one line of code use this:&lt;br /&gt;&lt;pre&gt;MC_Container_Name.tabChildren = false;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Or to just disable the yellow box on a single movieclip use this:&lt;br /&gt;&lt;pre&gt;MC_Name.tabEnabled = false;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-7511880884893016644?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/7511880884893016644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=7511880884893016644' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/7511880884893016644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/7511880884893016644'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/12/as3-disable-yellow-tab-rectangles.html' title='AS3 Disable Yellow Tab Rectangles'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-3298241825847031365</id><published>2008-12-19T09:00:00.002-07:00</published><updated>2008-12-19T09:09:09.809-07:00</updated><title type='text'>AS3 Smooth Loaded Bitmaps</title><content type='html'>Loaded bitmaps (jpgs, pngs, etc) look bad in flash when scaling unless you smooth them. This function seems to replicate the bitmap "smoothng" setting in the library pallette. I still see tons of FLash sites out there that arent aware of this awesome setting. It makes bitmaps look great when they scale.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;//create a new loader object and put it on the stage&lt;br /&gt;var slideLoader:Loader=new Loader();&lt;br /&gt;this.addChild(slideLoader);&lt;br /&gt;&lt;br /&gt;//load picture into loader object&lt;br /&gt;slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, scaleContentForPicture);&lt;br /&gt;slideLoader.load(new URLRequest("images/tree.jpg"));&lt;br /&gt;&lt;br /&gt;//smooth it once loaded&lt;br /&gt;function scaleContentForPicture() {&lt;br /&gt;var smoother_bm=Bitmap(slideLoader.content);&lt;br /&gt;smoother_bm.smoothing=true;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-3298241825847031365?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/3298241825847031365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=3298241825847031365' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/3298241825847031365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/3298241825847031365'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/12/as3-smooth-loaded-bitmaps.html' title='AS3 Smooth Loaded Bitmaps'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-3964312259333089409</id><published>2008-12-15T11:00:00.002-07:00</published><updated>2008-12-15T11:02:03.983-07:00</updated><title type='text'>Slideshow with autoplay and reset delay</title><content type='html'>This code starts with a long pause then starts looping through images. If the user interacts with the slideshow, the timer is reset then starts playing again later if the user hasnt interacted.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;//setup---------------------------------------------&lt;br /&gt;var resetTime:uint=5000;&lt;br /&gt;var pauseBetweenSlides:uint=5000;&lt;br /&gt;var slideCounter:uint=1;&lt;br /&gt;var prevSlide:uint=0;&lt;br /&gt;&lt;br /&gt;var startShowTimer:Timer=new Timer(resetTime,1);&lt;br /&gt;startShowTimer.addEventListener(TimerEvent.TIMER, setUpTimer);&lt;br /&gt;var slideShowTimer:Timer=new Timer(pauseBetweenSlides,0);&lt;br /&gt;slideShowTimer.addEventListener(TimerEvent.TIMER, autoAdvance);&lt;br /&gt;&lt;br /&gt;//auto advance&lt;br /&gt;function autoAdvance(e:TimerEvent):void {&lt;br /&gt; nexttSlide();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//next&lt;br /&gt;function nexttSlide():void {&lt;br /&gt; prevSlide=slideCounter;&lt;br /&gt; slideCounter++;&lt;br /&gt; if (slideCounter==6) {&lt;br /&gt;  slideCounter=1;&lt;br /&gt; }&lt;br /&gt; goToSlide();&lt;br /&gt;}&lt;br /&gt;//prev&lt;br /&gt;function prevvSlide():void {&lt;br /&gt; prevSlide=slideCounter;&lt;br /&gt; slideCounter--;&lt;br /&gt; if (slideCounter==0) {&lt;br /&gt;  slideCounter=5;&lt;br /&gt; }&lt;br /&gt; goToSlide();&lt;br /&gt;}&lt;br /&gt;//display next slide and hide previous&lt;br /&gt;function goToSlide():void {&lt;br /&gt; slideshow_mc["slide"+slideCounter+"_mc"].gotoAndPlay("show");&lt;br /&gt; if (prevSlide&gt;0) {&lt;br /&gt;  slideshow_mc["slide"+prevSlide+"_mc"].gotoAndPlay("hide");&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;//pause slideshow and reset timer&lt;br /&gt;function resetTimer():void {&lt;br /&gt; slideShowTimer.stop();&lt;br /&gt; startShowTimer.reset();&lt;br /&gt; startShowTimer.start();&lt;br /&gt;}&lt;br /&gt;//called when reset pause is finished&lt;br /&gt;function setUpTimer(e:TimerEvent):void {&lt;br /&gt; startShowTimer.reset();&lt;br /&gt; slideShowTimer.start();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;resetTimer();&lt;br /&gt;goToSlide();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//Controls--------&lt;br /&gt;function showControls():void {&lt;br /&gt; slideShowPrev_mc.gotoAndPlay("show");&lt;br /&gt; slideShowNext_mc.gotoAndPlay("show");&lt;br /&gt;}&lt;br /&gt;function hideControls():void {&lt;br /&gt; slideShowPrev_mc.gotoAndPlay("hide");&lt;br /&gt; slideShowNext_mc.gotoAndPlay("hide");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;slideShowNext_mc.addEventListener(MouseEvent.CLICK, invokeNextSlide);&lt;br /&gt;function invokeNextSlide(e:MouseEvent):void {&lt;br /&gt; resetTimer();&lt;br /&gt; nexttSlide();&lt;br /&gt;}&lt;br /&gt;slideShowPrev_mc.addEventListener(MouseEvent.CLICK, invokePrevSlide);&lt;br /&gt;function invokePrevSlide(e:MouseEvent):void {&lt;br /&gt; resetTimer();&lt;br /&gt; prevvSlide();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-3964312259333089409?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/3964312259333089409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=3964312259333089409' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/3964312259333089409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/3964312259333089409'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/12/slideshow-with-autoplay-and-reset-delay.html' title='Slideshow with autoplay and reset delay'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-3305357748709246904</id><published>2008-12-15T10:53:00.002-07:00</published><updated>2008-12-15T10:55:59.373-07:00</updated><title type='text'>Mouse enter and leave a movieclip using the Point object</title><content type='html'>Detect mouse entering and exiting a movieclip. Using this will allow rollover/out fuctionality without messing up mouse interaction of nested clips. &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;slideshow_mc.arrowsHotspots_mc.addEventListener(Event.ENTER_FRAME, watchForMouseEntry);&lt;br /&gt;var point1:Point=new Point(0,0);&lt;br /&gt;var mouseAlreadyInside:Boolean=false;&lt;br /&gt;function watchForMouseEntry(e:Event):void {&lt;br /&gt; point1.x=mouseX;&lt;br /&gt; point1.y=mouseY;&lt;br /&gt; var hs:Object=e.target;&lt;br /&gt; &lt;br /&gt; if (hs.hitTestPoint(point1.x,point1.y,true)) {&lt;br /&gt;  if (mouseAlreadyInside==false) {&lt;br /&gt;   mouseAlreadyInside=true;&lt;br /&gt;   showControls()&lt;br /&gt;  }&lt;br /&gt; } else {&lt;br /&gt;  if (mouseAlreadyInside==true) {&lt;br /&gt;   mouseAlreadyInside=false;&lt;br /&gt;   hideControls()&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-3305357748709246904?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/3305357748709246904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=3305357748709246904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/3305357748709246904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/3305357748709246904'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/12/mouse-enter-and-leave-movieclip-using.html' title='Mouse enter and leave a movieclip using the Point object'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-7686987487323320278</id><published>2008-11-20T09:38:00.003-07:00</published><updated>2008-11-20T09:48:52.067-07:00</updated><title type='text'>Loading external images and reacting to load complete and smoothing bitmap</title><content type='html'>&lt;pre&gt;var slideLoader:Loader=new Loader();&lt;br /&gt;csHostRef.addChild(slideLoader);&lt;br /&gt;&lt;br /&gt;slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, slidePreloaded);&lt;br /&gt;slideLoader.load(new URLRequest(xml.slide[currentSlide].mediaURL));&lt;br /&gt;&lt;br /&gt;function slidePreloaded(){&lt;br /&gt;     //do stuff here now that pict has loaded&lt;br /&gt;&lt;br /&gt;     //...and this will smooth the bitmap so it doesnt look crappy scaling&lt;br /&gt;     var smoother_bm=Bitmap(slideLoader.content);&lt;br /&gt;     smoother_bm.smoothing=true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-7686987487323320278?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/7686987487323320278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=7686987487323320278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/7686987487323320278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/7686987487323320278'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/11/loading-external-images-and-reacting-to.html' title='Loading external images and reacting to load complete and smoothing bitmap'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-6151905199964919328</id><published>2008-11-12T13:31:00.002-07:00</published><updated>2008-11-12T13:38:14.076-07:00</updated><title type='text'>Measuring the Stage in AS3</title><content type='html'>In AS2 you could measure the stage using Stage.width. in AS3 things are different. &lt;br /&gt;&lt;br /&gt;In AS3 stage.width works BUT it gives you the measurement of all the items in the stage - not the width of the player window.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.iheartactionscript.com/stage-access-outside-of-documentroot-in-as3/"&gt;This person&lt;/a&gt; has an interesting workaround. Basically you create an empty movieclip, convert it to a Stage, then measure it. Because there is nothing in it, it measures what it can, so measures the player window!&lt;br /&gt;&lt;br /&gt;At least that is how I understand it. Here is the code:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var myMC:MovieClip = new MovieClip();&lt;br /&gt;addChild(myMC);&lt;br /&gt;var _stage:Stage = myMC.stage;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then you use this to get the measurement:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;_stage.stageWidth&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This even works in SWFs that are loaded in a parent shell SWF.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-6151905199964919328?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/6151905199964919328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=6151905199964919328' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/6151905199964919328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/6151905199964919328'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/11/measuring-stage-in-as3.html' title='Measuring the Stage in AS3'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-821044567849285031</id><published>2008-11-06T11:58:00.005-07:00</published><updated>2008-11-06T12:15:09.356-07:00</updated><title type='text'>Simple AS3 Video FLV Player</title><content type='html'>Here are the basics for loading an external FLV and reading progress.&lt;br /&gt;&lt;pre&gt;var vid:Video=new Video(320,240);&lt;br /&gt;videoPlayerHost.addChild(vid);&lt;br /&gt;&lt;br /&gt;var nc:NetConnection=new NetConnection  ;&lt;br /&gt;nc.connect(null);&lt;br /&gt;&lt;br /&gt;var ns:NetStream=new NetStream(nc);&lt;br /&gt;vid.attachNetStream(ns);&lt;br /&gt;&lt;br /&gt;var infoContainer:Object;&lt;br /&gt;var listener:Object=new Object  ;&lt;br /&gt;listener.onMetaData=function(info:Object):void {&lt;br /&gt;   trace("metadata: duration=" + info.duration + " width=" + info.width + " height=" + info.height + " framerate=" + info.framerate);&lt;br /&gt;   tmrDisplay.start();&lt;br /&gt;   infoContainer=info;&lt;br /&gt;};&lt;br /&gt;ns.client=listener;&lt;br /&gt;ns.play("myVideo.flv");&lt;br /&gt;&lt;br /&gt;var tmrDisplay:Timer=new Timer(10);&lt;br /&gt;tmrDisplay.addEventListener(TimerEvent.TIMER,updateDisplay);&lt;br /&gt;var playbackPercentComplete:Number=0;&lt;br /&gt;&lt;br /&gt;function updateDisplay(e:TimerEvent):void {&lt;br /&gt; playbackPercentComplete=ns.time/infoContainer.duration;&lt;br /&gt; trace("PLAYING... elapsed time="+ns.time+", video length="+infoContainer.duration+", percent complete="+playbackPercentComplete);&lt;br /&gt; if (ns.time&gt;infoContainer.duration) {&lt;br /&gt;  playbackPercentComplete=0;&lt;br /&gt;  tmrDisplay.stop();&lt;br /&gt;  trace("done playing")&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//ns.pause()    will pause the video&lt;br /&gt;//ns.resume()   will resume the video&lt;br /&gt;//ns.seek(0)     will jump the playhead to the beginning&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-821044567849285031?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/821044567849285031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=821044567849285031' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/821044567849285031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/821044567849285031'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/11/simple-as3-video-flv-player.html' title='Simple AS3 Video FLV Player'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-7673776093883687377</id><published>2008-11-05T09:28:00.001-07:00</published><updated>2008-11-05T09:33:30.699-07:00</updated><title type='text'>Simple AS3 Button Click</title><content type='html'>&lt;pre&gt;visit_btn.addEventListener(MouseEvent.CLICK, visit);&lt;br /&gt;function visit(e:MouseEvent):void {&lt;br /&gt; var request:URLRequest=new URLRequest("http://www.thrillbilliestrailer.com");&lt;br /&gt; navigateToURL(request, "_self");&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-7673776093883687377?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/7673776093883687377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=7673776093883687377' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/7673776093883687377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/7673776093883687377'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/11/simple-as3-button-click.html' title='Simple AS3 Button Click'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-7138110138352837818</id><published>2008-11-03T10:00:00.004-07:00</published><updated>2008-11-03T10:15:25.221-07:00</updated><title type='text'>Creating Dynamic Tween Variables In a Timed Sequence</title><content type='html'>Say you want to have a number of tweens perform in a sequence but you don't want to type out all the tweens. Here is how you do it using a timer to animate some menus one at a time with a delay of 50 milliseconds between each:&lt;br /&gt;&lt;pre&gt;import fl.transitions.Tween;&lt;br /&gt;import fl.transitions.easing.*;&lt;br /&gt;import fl.transitions.TweenEvent;&lt;br /&gt;&lt;br /&gt;var timerCounter:uint=0;&lt;br /&gt;var theTimer:Timer=new Timer(50,6);/&lt;br /&gt;theTimer.start();&lt;br /&gt;theTimer.addEventListener(TimerEvent.TIMER, display);&lt;br /&gt; &lt;br /&gt;function display(e:TimerEvent):void {&lt;br /&gt;timerCounter++;&lt;br /&gt;var thisLoopNode:Object=menu_mc.getChildByName("node"+timerCounter);&lt;br /&gt;this["tweenx"+timerCounter]=new Tween(thisLoopNode,"x",Regular.easeOut,0,100,1,true);&lt;br /&gt;this["tweeny"+timerCounter]=new Tween(thisLoopNode,"y",Regular.easeOut,0,timerCounter*10,1,true);&lt;br /&gt;this["tweenalpha"+timerCounter]=new Tween(thisLoopNode,"alpha",Regular.easeOut,0,1,1,true);&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-7138110138352837818?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/7138110138352837818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=7138110138352837818' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/7138110138352837818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/7138110138352837818'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/11/creating-dynamic-tween-variables-in-for.html' title='Creating Dynamic Tween Variables In a Timed Sequence'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-5551881495033205767</id><published>2008-10-30T17:05:00.000-06:00</published><updated>2008-10-30T17:06:12.480-06:00</updated><title type='text'>Tweening in AS3 Part II</title><content type='html'>&lt;pre&gt;import fl.transitions.Tween;&lt;br /&gt;import fl.transitions.easing.*;&lt;br /&gt;import fl.transitions.TweenEvent;&lt;br /&gt;&lt;br /&gt;var myTween:Tween=new Tween(test_mc,"x",Elastic.easeOut,0,300,3,true);&lt;br /&gt;&lt;br /&gt;myTween.addEventListener(TweenEvent.MOTION_CHANGE,checkPos);&lt;br /&gt;function checkPos(tevt:TweenEvent):void {&lt;br /&gt; trace(test_mc.x);&lt;br /&gt;}&lt;br /&gt;myTween.addEventListener(TweenEvent.MOTION_FINISH,finished);&lt;br /&gt;function finished(tevt:TweenEvent):void {&lt;br /&gt; trace("done");&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-5551881495033205767?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/5551881495033205767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=5551881495033205767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/5551881495033205767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/5551881495033205767'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/10/tweening-in-as3-part-ii.html' title='Tweening in AS3 Part II'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-6642738247854049325</id><published>2008-10-29T22:48:00.000-06:00</published><updated>2008-10-29T23:14:55.348-06:00</updated><title type='text'>Calling Parent Variables and Functions from a Loaded SWF</title><content type='html'>Let's say I have one SWF (child.swf) that I want to load into another SWF (parent.swf), then I want to call a function that is in parent.swf from the child.swf. In AS2 you could just do _parent._parent as many times as needed to reach up the tree to get to the parent's top level. In AS3 you need to use this code below instead. Put it inside the child.swf. I have no idea what this line of code means, but is magic:&lt;br /&gt;&lt;pre&gt;MovieClip(parent.parent).ParentFunction();&lt;/pre&gt;...then this sample code goes inside the parent.swf on its main timeline:&lt;br /&gt;&lt;pre&gt;//this sample code loads the external SWF into the Parent SWF&lt;br /&gt;var indexSwfRequest:URLRequest = new URLRequest("index.swf");&lt;br /&gt;var indexSwfLoader:Loader = new Loader();&lt;br /&gt;indexSwfLoader.load(indexSwfRequest);&lt;br /&gt;addChild(indexSwfLoader);&lt;br /&gt;//This is the parent function that can be called from the command that is inside the child.swf&lt;br /&gt;function ParentFunction():void{&lt;br /&gt;trace("It worked!");&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-6642738247854049325?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/6642738247854049325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=6642738247854049325' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/6642738247854049325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/6642738247854049325'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/10/accessing-variables-and-functions-from.html' title='Calling Parent Variables and Functions from a Loaded SWF'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-4367569688559291418</id><published>2008-10-23T15:09:00.001-06:00</published><updated>2008-10-29T22:47:14.956-06:00</updated><title type='text'>Tweening in AS3</title><content type='html'>This uses the built-in Tween and easing classes. I don't like juggling external classes from 3rd parties if I can help it.&lt;br /&gt;&lt;br /&gt;//Tweens wont work without these:&lt;br /&gt;import fl.transitions.Tween;&lt;br /&gt;import fl.transitions.easing.*;&lt;br /&gt;&lt;br /&gt;//This creates the tween&lt;br /&gt;var myTween:Tween;&lt;br /&gt;myTween = new Tween(movieclip, "x", Elastic.easeInOut, start, end, 3, true);&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;The stuff in parentheses...&lt;br /&gt;1. The movieClip to tween &lt;br /&gt;2. Property to tween&lt;br /&gt;3. Type of tween (see help: fl.transitions.easing). Here are the options:&lt;br /&gt;First item: Back, Bounce, Elastic, None, Regular, Strong&lt;br /&gt;Second Item aftyer period: easeIn, easeOut, easeInOut&lt;br /&gt;4. Start value&lt;br /&gt;5. End value&lt;br /&gt;6. true=Measure in seconds, false=Measure in milliseconds.&lt;br /&gt;*/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-4367569688559291418?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/4367569688559291418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=4367569688559291418' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/4367569688559291418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/4367569688559291418'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/10/tweening-in-as3.html' title='Tweening in AS3'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-4468234947276368442</id><published>2008-07-26T17:22:00.000-06:00</published><updated>2008-07-26T17:30:28.510-06:00</updated><title type='text'>Global Variables AS3</title><content type='html'>STEP 1. Make a class called "GlobalVarContainer.as":&lt;br /&gt;&lt;br /&gt;package &lt;br /&gt;{&lt;br /&gt;    public class GlobalVarContainer &lt;br /&gt;    {&lt;br /&gt;        public static var vars:Object = [];&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;STEP 2. Main timeline:&lt;br /&gt;import GlobalVarContainer;&lt;br /&gt;var currentNav:Number;&lt;br /&gt;GlobalVarContainer.vars.currentNav=10;&lt;br /&gt;&lt;br /&gt;STEP 3. Then from any clip (even loaded ones):&lt;br /&gt;var currentNav2:Number=GlobalVarContainer.vars.currentNav; &lt;br /&gt;trace(currentNav2);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-4468234947276368442?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/4468234947276368442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=4468234947276368442' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/4468234947276368442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/4468234947276368442'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/07/global-variables-as3.html' title='Global Variables AS3'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-4961946214534977872</id><published>2008-07-26T16:08:00.000-06:00</published><updated>2008-07-26T16:10:20.848-06:00</updated><title type='text'>Loading external variables from html</title><content type='html'>This brings a var in from html that is a string and converts it to a number.&lt;br /&gt;&lt;br /&gt;var allFlashVars:Object = LoaderInfo(this.root.loaderInfo).parameters;&lt;br /&gt;var currentNav:String;&lt;br /&gt;var theLoadedVar:Number=Number(allFlashVars.currentNav);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-4961946214534977872?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/4961946214534977872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=4961946214534977872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/4961946214534977872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/4961946214534977872'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/07/loading-external-variables-from-html.html' title='Loading external variables from html'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-3292803703824197045</id><published>2008-07-22T15:38:00.000-06:00</published><updated>2008-07-22T15:41:12.475-06:00</updated><title type='text'>Timer</title><content type='html'>var theTimer:Timer=new Timer(1000, 0);//(delay, zero is infinite, or any other number is the repeat count)&lt;br /&gt; theTimer.start();&lt;br /&gt; theTimer.addEventListener(TimerEvent.TIMER, proceed);&lt;br /&gt;        theTimer.addEventListener(TimerEvent.TIMER_COMPLETE, done);   //when done with all repeats (not possible here because of zero)&lt;br /&gt;}&lt;br /&gt;function proceed(e:TimerEvent):void {&lt;br /&gt; trace("tick every second");&lt;br /&gt;}&lt;br /&gt;function done(e:TimerEvent):void {&lt;br /&gt; trace("done");&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-3292803703824197045?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/3292803703824197045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=3292803703824197045' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/3292803703824197045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/3292803703824197045'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/07/timer.html' title='Timer'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-5889524078083544663</id><published>2008-07-22T11:26:00.000-06:00</published><updated>2008-07-22T11:27:53.607-06:00</updated><title type='text'>rollover mouseover</title><content type='html'>theSpark.addEventListener(Event.ENTER_FRAME, enterFrameHandler);&lt;br /&gt;theSpark.addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);&lt;br /&gt;&lt;br /&gt;function enterFrameHandler(e:Event):void {&lt;br /&gt;}&lt;br /&gt;function rollOverHandler(e:MouseEvent):void {&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-5889524078083544663?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/5889524078083544663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=5889524078083544663' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/5889524078083544663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/5889524078083544663'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/07/rollover-mouseover.html' title='rollover mouseover'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-138738995069690764</id><published>2008-07-22T10:42:00.000-06:00</published><updated>2008-07-22T10:43:02.467-06:00</updated><title type='text'>as3 getURL</title><content type='html'>var request:URLRequest = new URLRequest("http://www.google.com");&lt;br /&gt; navigateToURL(request, "_self");&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-138738995069690764?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/138738995069690764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=138738995069690764' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/138738995069690764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/138738995069690764'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/07/as3-geturl.html' title='as3 getURL'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-5582489077487967219</id><published>2008-07-22T10:40:00.001-06:00</published><updated>2008-07-22T10:40:25.298-06:00</updated><title type='text'>Random Number between 1 and 20</title><content type='html'>Math.ceil(20*Math.random())&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-5582489077487967219?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/5582489077487967219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=5582489077487967219' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/5582489077487967219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/5582489077487967219'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/07/random-number-between-1-and-20.html' title='Random Number between 1 and 20'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-6412503403954130551</id><published>2008-07-03T16:23:00.000-06:00</published><updated>2008-07-03T16:40:01.800-06:00</updated><title type='text'>Assigning a Single Class to Multiple Library Symbols</title><content type='html'>So, in AS2 I used to use one single class with multiple different library items (for example, if you were creating an asteroid field and you had multiple asteroid symbols in your library, but wanted them all to behave the same using one single class). In AS3 if you try this, you get an error: &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;"Please enter a unique class name that is not associated with other library symbols&lt;/span&gt;". &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I finally came across a forum that had a simple elegant answer. In the Library/Linkage you simply put the name of your class into the &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Base Class&lt;/span&gt; field &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;instead&lt;/span&gt; of the &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Class&lt;/span&gt; field. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So I tried that, and I still got an error and after tinkering a bit, I realized that something also needed to be in the &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Class&lt;/span&gt; field for everything to work. If you leave the &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Class&lt;/span&gt; filed blank, you will get the same error quoted above. To fix this, just type anything into the field. When you click OK to leave the Linkage dialog, flash will warn you that the gobbldygook you typed into the &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Class&lt;/span&gt; field doesnt exist as a class - but just ignore it. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You should now be able to have multiple different symbols using the same class. Just do the above for each item in the library.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-6412503403954130551?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/6412503403954130551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=6412503403954130551' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/6412503403954130551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/6412503403954130551'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/07/assigning-single-class-to-different.html' title='Assigning a Single Class to Multiple Library Symbols'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-2847207259224196796</id><published>2008-05-26T00:58:00.000-06:00</published><updated>2008-05-26T01:03:07.024-06:00</updated><title type='text'>AS3 _parent?</title><content type='html'>&lt;strong&gt;_parent&lt;/strong&gt; no longer exists in as3. It is now &lt;strong&gt;parent&lt;/strong&gt; and you have to tell flash that its a MovieClip (2 examples):&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;MovieClip(this.parent).gotoAndPlay("reveal");&lt;br /&gt;MovieClip(this.parent.parent).gotoAndPlay("main");&lt;/pre&gt;&lt;pre&gt;Great articles that explain it all:&lt;br /&gt;&lt;a href="http://www.zeuslabs.us/2007/07/12/disabling-actionscript-3-strict-mode-in-flash-cs3/"&gt;http://www.zeuslabs.us/2007/07/12/disabling-actionscript-3-strict-mode-in-flash-cs3/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://curtismorley.com/2007/06/13/flash-cs3-flex-2-as3-error-1119/"&gt;http://curtismorley.com/2007/06/13/flash-cs3-flex-2-as3-error-1119/&lt;/a&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-2847207259224196796?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/2847207259224196796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=2847207259224196796' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/2847207259224196796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/2847207259224196796'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/05/as3-parent.html' title='AS3 _parent?'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-7688342729751769301</id><published>2008-05-09T16:42:00.000-06:00</published><updated>2008-05-09T16:50:45.871-06:00</updated><title type='text'>Sort Display List Objects Based on Y Depth</title><content type='html'>Thanks to the example on this page:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.senocular.com/flash/tutorials/as3withflashcs3/?page=2"&gt;http://www.senocular.com/flash/tutorials/as3withflashcs3/?page=2&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function sortChildrenByY(container:MovieClip):void {&lt;br /&gt; var i:int;&lt;br /&gt; var childList:Array = new Array();&lt;br /&gt; i = container.numChildren;&lt;br /&gt; while(i--){&lt;br /&gt;  childList[i] = container.getChildAt(i);&lt;br /&gt; }&lt;br /&gt; childList.sortOn("y", Array.NUMERIC);&lt;br /&gt; i = container.numChildren;&lt;br /&gt; while(i--){&lt;br /&gt;  if (childList[i] != container.getChildAt(i)){&lt;br /&gt;   container.setChildIndex(childList[i], i);&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sortChildrenByY(this);&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-7688342729751769301?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/7688342729751769301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=7688342729751769301' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/7688342729751769301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/7688342729751769301'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/05/sort-display-list-objects-based-on-y.html' title='Sort Display List Objects Based on Y Depth'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-5467776526638736</id><published>2008-05-09T15:20:00.000-06:00</published><updated>2008-05-09T16:02:38.435-06:00</updated><title type='text'>AS3 Way to AttachMovie</title><content type='html'>&lt;span style="font-weight: bold;"&gt;MovieClip:&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_P5buwtMOPQc/SCTIGilgP3I/AAAAAAAAAFM/zyS-7gJmeJw/s1600-h/smc.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_P5buwtMOPQc/SCTIGilgP3I/AAAAAAAAAFM/zyS-7gJmeJw/s320/smc.jpg" alt="" id="BLOGGER_PHOTO_ID_5198499884581273458" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;var ball_mc:BallInLibrary = new BallInLibrary();&lt;br /&gt;addChild(ball_mc);&lt;br /&gt;ball_mc.x=100;&lt;br /&gt;ball_mc.y=100;&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;Button:&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_P5buwtMOPQc/SCTJ6ilgP5I/AAAAAAAAAFc/gTp-eLTM11c/s1600-h/sbtn.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_P5buwtMOPQc/SCTJ6ilgP5I/AAAAAAAAAFc/gTp-eLTM11c/s320/sbtn.jpg" alt="" id="BLOGGER_PHOTO_ID_5198501877446098834" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;var button_mc:ButtonInLibrary = new ButtonInLibrary()&lt;br /&gt;addChild(button_mc)&lt;br /&gt;button_mc.x=200;&lt;br /&gt;button_mc.y=200;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-5467776526638736?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/5467776526638736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=5467776526638736' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/5467776526638736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/5467776526638736'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/05/attachmovie.html' title='AS3 Way to AttachMovie'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_P5buwtMOPQc/SCTIGilgP3I/AAAAAAAAAFM/zyS-7gJmeJw/s72-c/smc.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3335221968081944600.post-7257938919969886038</id><published>2008-05-09T10:49:00.001-06:00</published><updated>2008-05-09T11:16:15.565-06:00</updated><title type='text'>AS3 Links</title><content type='html'>Yikes! Actionscript 3.0 will be very different! Here are some links: &lt;ul&gt;&lt;li&gt;&lt;a href="http://www.senocular.com/flash/tutorials/as3withmxmlc/" target="_blank"&gt;Beginners Guide to Getting Started with AS3 (Without Learning Flex) - uses SDK for MXMLC&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.senocular.com/flash/tutorials/as3withflashcs3/"&gt;http://www.senocular.com/flash/tutorials/as3withflashcs3/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.adobe.com/go/AS3LR/" target="_blank"&gt;ActionScript 3 Language Reference&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.adobe.com/go/AS2toAS3/" target="_blank"&gt;ActionScript 2 to ActionScript 3 Migration Guide&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.adobe.com/devnet/actionscript/" target="_blank"&gt;Adobe ActionScript Technology Center&lt;/a&gt; &lt;ul&gt;&lt;li&gt;&lt;a href="http://www.adobe.com/devnet/actionscript/articles/actionscript3_overview.html" target="_blank"&gt;ActionScript 3 Overview&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.adobe.com/devnet/actionscript/articles/actionscript_tips.html" target="_blank"&gt;ActionScript 3 Learning Tips&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.adobe.com/go/programmingAS3_pdf" target="_blank"&gt;Programming ActionScript 3 (PDF)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.adobe.com/devnet/flashplayer/articles/flash_player_9_security.pdf" target="_blank"&gt;Flash Player 9 Security (PDF)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.onflex.org/ACDS/AS3TuningInsideAVM2JIT.pdf" target="_blank"&gt;ActionScript 3 and AVM 2.0 Performance Tuning (PDF)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3335221968081944600-7257938919969886038?l=mattmaxwellas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattmaxwellas3.blogspot.com/feeds/7257938919969886038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3335221968081944600&amp;postID=7257938919969886038' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/7257938919969886038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3335221968081944600/posts/default/7257938919969886038'/><link rel='alternate' type='text/html' href='http://mattmaxwellas3.blogspot.com/2008/05/as3-links.html' title='AS3 Links'/><author><name>Matt</name><uri>http://www.blogger.com/profile/13025883397905736760</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://www.mattmaxwelldesign.com/images/me.jpg'/></author><thr:total>0</thr:total></entry></feed>
