<?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-27809054</id><updated>2011-09-28T13:28:12.943-06:00</updated><title type='text'>Matt Maxwell AS2 Flash Journal</title><subtitle type='html'>ActionScript Snippets and links to everything Flash.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.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>45</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-27809054.post-4251860168929506488</id><published>2008-07-03T20:22:00.002-06:00</published><updated>2008-07-03T20:25:17.666-06:00</updated><title type='text'>Visit my new Actionscript 3 blog</title><content type='html'>&lt;div&gt;I will no longer be adding to this blog because I have started a new blog for Actionscript 3: &lt;a href="http://mattmaxwellas3.blogspot.com/"&gt;http://mattmaxwellas3.blogspot.com/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;I will still leave this blog up because it contains valuable info for AS2.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-4251860168929506488?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/4251860168929506488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=4251860168929506488' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/4251860168929506488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/4251860168929506488'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2008/07/visit-my-new-actionscript-3-blog.html' title='Visit my new Actionscript 3 blog'/><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-27809054.post-8472449875270949605</id><published>2008-01-18T16:07:00.001-07:00</published><updated>2008-01-18T16:09:13.396-07:00</updated><title type='text'>Mouse Wheel Scroll</title><content type='html'>&lt;pre&gt;var mouseListener:Object = new Object();&lt;br /&gt;mouseListener.onMouseWheel = function(delta) {&lt;br /&gt;    trace(delta/3);&lt;br /&gt; //result is 1 for up and -1 for down&lt;br /&gt;}&lt;br /&gt;Mouse.addListener(mouseListener);&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/27809054-8472449875270949605?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/8472449875270949605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=8472449875270949605' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/8472449875270949605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/8472449875270949605'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2008/01/mouse-wheel-scroll.html' title='Mouse Wheel Scroll'/><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-27809054.post-3685525350715980794</id><published>2008-01-16T22:43:00.000-07:00</published><updated>2008-01-16T22:45:33.218-07:00</updated><title type='text'>Drag Clock Hands in Circular Motion</title><content type='html'>Thanks Dave Stiller for this snippet. His instructions are &lt;a href="http://www.quip.net/blog/2006/flash/actionscript-20/how-to-drag-clock-hands"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;pre&gt;mcMinute.onPress = function() {&lt;br /&gt;  this.onMouseMove = function() {&lt;br /&gt;    var angle:Number = Math.atan2(&lt;br /&gt;      mcFace._ymouse - mcFace._height / 2,&lt;br /&gt;      mcFace._xmouse - mcFace._width / 2&lt;br /&gt;    );&lt;br /&gt;    this._rotation = (angle * 180 / Math.PI) + 90;&lt;br /&gt;  };&lt;br /&gt;};&lt;br /&gt;mcMinute.onRelease = function() {&lt;br /&gt;  delete this.onMouseMove;&lt;br /&gt;};&lt;br /&gt;mcMinute.onReleaseOutside = mcMinute.onRelease;&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/27809054-3685525350715980794?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/3685525350715980794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=3685525350715980794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/3685525350715980794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/3685525350715980794'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2008/01/drag-clock-hands-in-circular-motion.html' title='Drag Clock Hands in Circular Motion'/><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-27809054.post-7119589877727057816</id><published>2007-12-26T11:02:00.000-07:00</published><updated>2007-12-26T11:04:25.120-07:00</updated><title type='text'>Substrings</title><content type='html'>This gets the fifth character out of myName. The first number is the beginning, the second is the end. It is sort of like selecting text from a start point to an end point.&lt;br /&gt;&lt;br /&gt;myName.substring(4, 5)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-7119589877727057816?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/7119589877727057816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=7119589877727057816' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/7119589877727057816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/7119589877727057816'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/12/substrings.html' title='Substrings'/><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-27809054.post-1854043927969653142</id><published>2007-12-20T14:57:00.000-07:00</published><updated>2007-12-20T15:01:11.572-07:00</updated><title type='text'>Local to Global</title><content type='html'>Here's how to take nested x and y and convert them to global x and y:&lt;br /&gt;&lt;br /&gt;//these nested coordinates...&lt;br /&gt;var myPoint:Object = {x:theClip.nestedclip._x, y:theClip.nestedclip._y};&lt;br /&gt;theClip.nestedclip.localToGlobal(myPoint);&lt;br /&gt;//&lt;br /&gt;//are now root coordinates...&lt;br /&gt;trace(myPoint.x)&lt;br /&gt;trace(myPoint.y)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-1854043927969653142?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/1854043927969653142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=1854043927969653142' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/1854043927969653142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/1854043927969653142'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/12/local-to-global.html' title='Local to Global'/><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-27809054.post-2292090730608934168</id><published>2007-09-09T15:26:00.000-06:00</published><updated>2007-09-09T15:29:57.859-06:00</updated><title type='text'>Creating good FLVs</title><content type='html'>Here is a good article on reducing the file size of FLVs. My FLVs are now half the size but actually look better. The main secret was lowering the data rate to 250, having the frame rate between 12 and 15, letting the software automatically choose the keyframes, and using a mono audio track.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.communitymx.com/content/article.cfm?cid=EBD77&amp;print=true"&gt;http://www.communitymx.com/content/article.cfm?cid=EBD77&amp;amp;print=true&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-2292090730608934168?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/2292090730608934168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=2292090730608934168' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/2292090730608934168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/2292090730608934168'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/09/creating-good-flvs.html' title='Creating good FLVs'/><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-27809054.post-7109603608856454108</id><published>2007-08-08T17:12:00.001-06:00</published><updated>2007-08-08T17:12:45.306-06:00</updated><title type='text'>Caps Lock</title><content type='html'>if (Key.isToggled(Key.CAPSLOCK)) {}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-7109603608856454108?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/7109603608856454108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=7109603608856454108' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/7109603608856454108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/7109603608856454108'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/08/caps-lock.html' title='Caps Lock'/><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-27809054.post-2619362506259771948</id><published>2007-07-13T15:20:00.000-06:00</published><updated>2007-07-13T15:25:09.581-06:00</updated><title type='text'>Controlling an Imported Captivate Movie</title><content type='html'>All these little widgets on my site use these variables, they are all in the Captivate help filebut I guess not many people can find them due to the amount of questions on the Captivateforum&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;rdcmndPrevious = 1 &lt;/strong&gt;Is used to go back one slide in a captivate movie&lt;br /&gt;&lt;strong&gt;rdcmndNextSlide = 1&lt;/strong&gt; Is used to go forward one slide in a captivate movie&lt;br /&gt;&lt;strong&gt;rdcmndPause = 1&lt;/strong&gt; Is used to pause a captivate movie&lt;br /&gt;&lt;strong&gt;rdcmndResume = 1&lt;/strong&gt; Is used to play a captivate movie&lt;br /&gt;&lt;strong&gt;rdcmndRewindAndStop&lt;/strong&gt; rewind and stop the movie&lt;br /&gt;&lt;strong&gt;rdcmndRewindAndPlay&lt;/strong&gt; Is used to restart and play a captivate movie&lt;br /&gt;&lt;strong&gt;rdcmndGotoFrame&lt;/strong&gt; Is used to go to a specific frame, note this is Frame not a Slide (see rdinfoFrameCount)&lt;br /&gt;&lt;strong&gt;rdcmndExit&lt;/strong&gt; does what is say's exit's the movie&lt;br /&gt;&lt;strong&gt;rdcmndInfodisplay&lt;/strong&gt; the information window (Yep that little Info box that everyone moans about&lt;br /&gt;&lt;strong&gt;rdinfoFrameCount&lt;/strong&gt; total number of swf frames in the movie (this is not the number of frames in the main Timeline, but the sum of all slide frames)&lt;br /&gt;&lt;strong&gt;rdinfoSlidesInProject&lt;/strong&gt; number of slides in the movie (including hidden slides)&lt;br /&gt;&lt;strong&gt;rdinfoCurrentFrame&lt;/strong&gt; current frame (goes from 1 to rdinfoFrameCount when you play the movie)&lt;br /&gt;&lt;strong&gt;rdinfoCurrentSlide&lt;/strong&gt; slide currently playing (zero based)&lt;br /&gt;&lt;strong&gt;rdinfoSlideCount&lt;/strong&gt; number of slides in the movie (not including hidden slides)&lt;br /&gt;&lt;strong&gt;rdIsMainMovie&lt;/strong&gt; can be used to identify a Captivate movie&lt;br /&gt;&lt;br /&gt;And a couple of unpublished variables&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;rdcmndHidePlaybar&lt;/strong&gt; =&lt;br /&gt;is used to hide or show the playbar 1= hide 0=show&lt;br /&gt;&lt;strong&gt;rdcmndCC&lt;/strong&gt; =&lt;br /&gt;is used to show or hide Closed Captions 1= show 0=hide&lt;br /&gt;&lt;strong&gt;rdcmndMute&lt;/strong&gt; =&lt;br /&gt;is used to mute or unmute the audio 1= mute 0=unmute&lt;br /&gt;&lt;br /&gt;I do not use flash as I am not clever enought to understand it, instead I use Swishmax a nice little app.&lt;br /&gt;To create an external playbar in swish I would create a set of buttons then add the following script to each&lt;br /&gt;&lt;br /&gt;Restart buttonon (release) {this._parent._parent.rdcmndRewindAndPlay = 1;}&lt;br /&gt;Rewind buttonon (release) {this._parent._parent.rdcmndPrevious = 1;}&lt;br /&gt;Pause buttonon (release) {this._parent._parent.rdcmndPause = 1;}&lt;br /&gt;Play buttonon (release) {this._parent._parent.rdcmndResume = 1;}&lt;br /&gt;Forward buttonon (release) {this._parent._parent.rdcmndNextSlide = 1;}&lt;br /&gt;Exit button on (release) {fscommand("Quit","true");}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-2619362506259771948?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/2619362506259771948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=2619362506259771948' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/2619362506259771948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/2619362506259771948'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/07/controlling-imported-captivate-movie.html' title='Controlling an Imported Captivate Movie'/><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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27809054.post-3628548155003801946</id><published>2007-07-02T16:17:00.004-06:00</published><updated>2008-03-14T17:21:01.486-06:00</updated><title type='text'>Google Analytics in an all-Flash site</title><content type='html'>&lt;p&gt;Old Version:&lt;br /&gt;&lt;a href="http://www.google.com/support/googleanalytics/bin/answer.py?answer=74979"&gt;http://www.google.com/support/googleanalytics/bin/answer.py?answer=74979&lt;/a&gt;&lt;/p&gt;&lt;p&gt;New Version:&lt;br /&gt;&lt;a href="http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&amp;amp;answer=55520"&gt;&lt;span style="TEXT-DECORATION: underline"&gt;http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&amp;amp;answer=55520&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;its very easy:&lt;br /&gt;1. Get a Google analytics account&lt;/p&gt;&lt;p&gt;2. Give it a URL&lt;/p&gt;&lt;p&gt;3. Google Analytics gives you a little bit of code to embed in the HTML&lt;/p&gt;&lt;p&gt;4. Paste the code into your html&lt;/p&gt;&lt;p&gt;5. Use one line of code in flash for every click&lt;/p&gt;&lt;p&gt;This is a great way to do path analysis in a Flash site. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-3628548155003801946?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/3628548155003801946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=3628548155003801946' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/3628548155003801946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/3628548155003801946'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/07/google-analytics-in-all-flash-site.html' title='Google Analytics in an all-Flash site'/><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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27809054.post-3500771393714026087</id><published>2007-05-23T21:30:00.001-06:00</published><updated>2007-05-23T21:48:16.330-06:00</updated><title type='text'>Getting a Blogger XML feed to work in Flash</title><content type='html'>&lt;p&gt;I wrestled for about an hour because the XML from Blogger was coming up blank whenever I ran my project on the web server. This article saved me:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16520"&gt;http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16520&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Basically I need to have "proxy.php" in the same directory as the site - with the Atom XML URL inside it. Then, in Flash I need to use "proxy.php" for the path. I think the way this works is that the PHP file reads the XML and stores it, then Flash gets the XML text from the PHP file. This code is in the Nitro Circus project in proxy.php and the "if the planet==3" area of planets.as file.&lt;/p&gt;&lt;p&gt;-------------&lt;/p&gt;&lt;p&gt;Text from Adobe:&lt;/p&gt;&lt;p&gt;Loading data across domains&lt;br /&gt;For security reasons, a Macromedia Flash movie is not permitted to load data from a different Internet domain. Attempts to access cross-domain data or data returned to Macromedia Flash Player from another domain will be ignored by the Macromedia Flash Player. See&lt;a href="http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16520#additional"&gt;Additional information&lt;/a&gt; to find specific information on domain comparison. &lt;/p&gt;&lt;p&gt;Note: Macromedia Flash Player release 6r47 did not allow an HTML page on the web to load a SWF file that was stored on the local machine (for example on a CD-ROM or local hard drive). This functionality has been restored in Macromedia Flash Player 6 release r65 (6,0,65,0) and above. For SWF files accessing internet based content these rules still apply. &lt;/p&gt;&lt;p&gt;If a Flash web application needs to access information from a different domain, a developer can use one of two recommended methods on the server-side to give Flash access to this data. See the table below for an overview of each method. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Server-side proxy method &lt;/strong&gt;&lt;br /&gt;-Requirements: You must be able to upload and run a server-side script on a server in the same domain as the Flash movie.&lt;br /&gt;-In this method, the Flash movie accesses the script, which loads the information, retrieves it, and returns the information back to the Flash movie.&lt;br /&gt;-This method is best if the server hosting the data is not under your control (for example, a public XML feed). &lt;/p&gt;&lt;p&gt;1. Download and unzip or unstuff one (or all of) the following example files: &lt;br /&gt;ColdFusion Example:&lt;br /&gt;&lt;a href="http://www.adobe.com/support/flash/ts/documents/load_xdomain/proxy_cf.zip"&gt;Windows ZIP &lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.adobe.com/support/flash/ts/documents/load_xdomain/proxy_cf.sea.hqx"&gt;Macintosh SEA &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;PHP Example:&lt;br /&gt;&lt;a href="http://www.adobe.com/support/flash/ts/documents/load_xdomain/proxy_php.zip"&gt;Windows ZIP &lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.adobe.com/support/flash/ts/documents/load_xdomain/proxy_php.sea.hqx"&gt;Macintosh SEA &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;ASP Example:&lt;br /&gt;&lt;a href="http://www.adobe.com/support/flash/ts/documents/load_xdomain/proxy_asp.zip"&gt;Windows ZIP &lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.adobe.com/support/flash/ts/documents/load_xdomain/proxy_asp.sea.hqx"&gt;Macintosh SEA &lt;/a&gt;&lt;/p&gt;&lt;p&gt;Java Servlet Example:&lt;br /&gt;&lt;a href="http://www.adobe.com/support/flash/ts/documents/load_xdomain/ProxyServlet.zip"&gt;Windows ZIP &lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.adobe.com/support/flash/ts/documents/load_xdomain/proxyservlet.sea.hqx"&gt;Macintosh SEA &lt;/a&gt;&lt;/p&gt;&lt;p&gt;The above code example must be hosted from a server in the same domain as the Macromedia Flash document.&lt;br /&gt;Note: Other server-side scripts can be used. Developers using other types of files can use one of the above examples as guideline. &lt;/p&gt;&lt;p&gt;2 . Replace the URL in the example with the URL that you want Macromedia Flash to load data from.&lt;br /&gt;3 . In the Macromedia Flash movie, in the action that loads the data, point to the URL where you will post the above code example.&lt;br /&gt;4 . Publish and upload both documents. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-3500771393714026087?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/3500771393714026087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=3500771393714026087' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/3500771393714026087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/3500771393714026087'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/05/getting-blogger-xml-feed-to-work-in.html' title='Getting a Blogger XML feed to work 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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27809054.post-5263900657128163862</id><published>2007-04-19T12:35:00.000-06:00</published><updated>2007-04-19T12:37:18.836-06:00</updated><title type='text'>ColorTransform (tweaking r, g, b, alpha)</title><content type='html'>&lt;pre&gt;&lt;br /&gt;//transform color +500 is blown out to white, -500 is solid black, 0 is normal&lt;br /&gt;import flash.geom.ColorTransform;&lt;br /&gt;import flash.geom.Transform;&lt;br /&gt;var colorTrans:ColorTransform=new ColorTransform();&lt;br /&gt;colorTrans.redOffset = 100;&lt;br /&gt;colorTrans.greenOffset = 100;&lt;br /&gt;colorTrans.blueOffset = 100;&lt;br /&gt;this.transform.colorTransform = colorTrans;&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/27809054-5263900657128163862?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/5263900657128163862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=5263900657128163862' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/5263900657128163862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/5263900657128163862'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/04/colortransform-tweaking-r-g-b-alpha.html' title='ColorTransform (tweaking r, g, b, alpha)'/><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-27809054.post-8982886039165912249</id><published>2007-03-20T13:06:00.000-06:00</published><updated>2007-07-11T17:55:54.180-06:00</updated><title type='text'>Gradient Masks in Flash 8</title><content type='html'>Make two movieclips:&lt;br /&gt;&lt;br /&gt;1. The "maskee" which is just a regular MovieClip containing a picture.&lt;br /&gt;2. The "mask" which is also a movieClip but contains some blends that fade to a solid color to clear&lt;br /&gt;&lt;br /&gt;maskee.cacheAsBitmap=true&lt;br /&gt;mask.cacheAsBitmap=true&lt;br /&gt;mask.setMask(maskee)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-8982886039165912249?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/8982886039165912249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=8982886039165912249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/8982886039165912249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/8982886039165912249'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/03/gradient-masks-in-flash-8.html' title='Gradient Masks in Flash 8'/><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-27809054.post-8441679737160096064</id><published>2007-03-19T11:07:00.000-06:00</published><updated>2007-03-19T11:08:18.079-06:00</updated><title type='text'>MovieClip Depth Property</title><content type='html'>mc.getDepth();&lt;br /&gt;&lt;br /&gt;Remember the parens&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-8441679737160096064?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/8441679737160096064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=8441679737160096064' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/8441679737160096064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/8441679737160096064'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/03/movieclip-depth-property.html' title='MovieClip Depth Property'/><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-27809054.post-1026946549827587429</id><published>2007-03-17T21:38:00.000-06:00</published><updated>2007-03-17T21:46:21.059-06:00</updated><title type='text'>Call a JavaScript function from Flash</title><content type='html'>This Flash function calls a Javascript and sends a string to be displayed in an alert window.&lt;br /&gt;&lt;pre&gt;import flash.external.*;&lt;br /&gt;btn.onPress = function() {&lt;br /&gt; ExternalInterface.call("playmovie", "hi Matt");&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Put this Javascript function in the html file&lt;br /&gt;&lt;pre&gt;function playmovie(theMessage){   &lt;br /&gt;alert(theMessage)&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/27809054-1026946549827587429?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/1026946549827587429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=1026946549827587429' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/1026946549827587429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/1026946549827587429'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/03/call-javascript-function-from-flash.html' title='Call a JavaScript function from 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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-27809054.post-3808811795735394133</id><published>2007-03-09T06:14:00.001-07:00</published><updated>2007-03-09T06:15:08.993-07:00</updated><title type='text'>sIFR</title><content type='html'>This tool uses css, flash, and Javascript to embed non-web fonts in a browser.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mikeindustries.com/sifr/"&gt;http://www.mikeindustries.com/sifr/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-3808811795735394133?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/3808811795735394133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=3808811795735394133' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/3808811795735394133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/3808811795735394133'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/03/sifr.html' title='sIFR'/><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-27809054.post-3952197353926434271</id><published>2007-03-09T06:09:00.001-07:00</published><updated>2007-03-09T06:10:00.213-07:00</updated><title type='text'>SlideShowPro</title><content type='html'>&lt;a href="http://www.slideshowpro.net/"&gt;http://www.slideshowpro.net/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-3952197353926434271?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/3952197353926434271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=3952197353926434271' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/3952197353926434271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/3952197353926434271'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/03/slideshowpro.html' title='SlideShowPro'/><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-27809054.post-6586263319129207046</id><published>2007-03-09T06:02:00.002-07:00</published><updated>2007-03-09T06:06:56.317-07:00</updated><title type='text'>String Search and Replace</title><content type='html'>&lt;pre&gt;&lt;br /&gt;String.prototype.replace = function(str, rep) {&lt;br /&gt;     return this.split(str).join(rep);&lt;br /&gt;};&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;//use it like this&lt;br /&gt;var myStr:String = "Hello earth!"&lt;br /&gt;trace(myStr.replace("earth","world")&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/27809054-6586263319129207046?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/6586263319129207046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=6586263319129207046' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/6586263319129207046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/6586263319129207046'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/03/string-search-and-replace.html' title='String Search and Replace'/><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-27809054.post-5924549593495027916</id><published>2007-03-09T06:02:00.001-07:00</published><updated>2007-03-09T06:02:48.139-07:00</updated><title type='text'>Timer Countdown</title><content type='html'>&lt;pre&gt;&lt;br /&gt;displayTime = 10;&lt;br /&gt;countDown = function () {&lt;br /&gt;     displayTime--;&lt;br /&gt;     if (displayTime == 0) {&lt;br /&gt;          clearInterval(timer);&lt;br /&gt;     }&lt;br /&gt;};&lt;br /&gt;timer = setInterval(countDown, 1000);&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/27809054-5924549593495027916?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/5924549593495027916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=5924549593495027916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/5924549593495027916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/5924549593495027916'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/03/timer-countdown.html' title='Timer Countdown'/><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-27809054.post-7865765416343510153</id><published>2007-03-09T05:56:00.000-07:00</published><updated>2007-03-09T08:25:20.338-07:00</updated><title type='text'>Change MovieClip Color</title><content type='html'>&lt;pre&gt;&lt;br /&gt;colorTo = function (theHex, theMc) {&lt;br /&gt; colorful = new Color(theMc);&lt;br /&gt; colorful.setRGB(theHex);&lt;br /&gt;};&lt;br /&gt;colorTo(0x00FFFF, theMc);&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/27809054-7865765416343510153?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/7865765416343510153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=7865765416343510153' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/7865765416343510153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/7865765416343510153'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/03/change-movieclip-color.html' title='Change MovieClip Color'/><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-27809054.post-3297312396525330811</id><published>2007-03-07T13:34:00.001-07:00</published><updated>2007-03-07T13:34:35.367-07:00</updated><title type='text'>Simple Tween Equation</title><content type='html'>this._y += (newPos - this._y) * .5;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-3297312396525330811?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/3297312396525330811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=3297312396525330811' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/3297312396525330811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/3297312396525330811'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/03/simple-tween-equation.html' title='Simple Tween Equation'/><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-27809054.post-2941201300621664305</id><published>2007-02-18T21:42:00.000-07:00</published><updated>2007-02-18T21:48:27.210-07:00</updated><title type='text'>2d, 3d Geometry Information</title><content type='html'>&lt;a href="http://www.geocities.com/pcgpe/win95gpe.html"&gt;Game Programmers Encylopedia&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.geocities.com/SiliconValley/2151/math2d.html"&gt;2D math principles&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.geocities.com/SiliconValley/2151/math3d.html"&gt;3D math principles&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-2941201300621664305?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/2941201300621664305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=2941201300621664305' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/2941201300621664305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/2941201300621664305'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/02/2d-3d-geometry-information.html' title='2d, 3d Geometry Information'/><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-27809054.post-8055443960796201426</id><published>2007-02-18T21:40:00.000-07:00</published><updated>2007-02-18T21:41:24.528-07:00</updated><title type='text'>Distance Between Two Points (3d)</title><content type='html'>&lt;pre&gt;GEN_get3DDistance = function (ax, ay, az, bx, by, bz) {&lt;br /&gt; dx = ax-bx;&lt;br /&gt; dy = ay-by;&lt;br /&gt; dz = az-bz;&lt;br /&gt; theDistance = Math.sqrt(dx*dx+dy*dy+dz*dz);&lt;br /&gt; return theDistance;&lt;br /&gt;};&lt;br /&gt;trace(GEN_get3DDistance(5,0,0,10,0,0))&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-8055443960796201426?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/8055443960796201426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=8055443960796201426' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/8055443960796201426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/8055443960796201426'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/02/distance-between-two-points-3d.html' title='Distance Between Two Points (3d)'/><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-27809054.post-3867134068592308701</id><published>2007-02-18T21:22:00.000-07:00</published><updated>2007-02-18T21:40:39.604-07:00</updated><title type='text'>Distance Between Two Points (2d)</title><content type='html'>&lt;pre&gt;GEN_get2DDistance = function (ax, ay, bx, by) {&lt;br /&gt; dx = ax-bx;&lt;br /&gt; dy = ay-by;&lt;br /&gt; theDistance = Math.sqrt(dx*dx+dy*dy);&lt;br /&gt; return theDistance;&lt;br /&gt;};&lt;br /&gt;this.onEnterFrame = function() {&lt;br /&gt; trace(GEN_get2DDistance(thing._x, thing._y, _xmouse, _ymouse));&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/27809054-3867134068592308701?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/3867134068592308701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=3867134068592308701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/3867134068592308701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/3867134068592308701'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/02/distance-between-two-points.html' title='Distance Between Two Points (2d)'/><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-27809054.post-5804335591639341669</id><published>2007-02-18T15:24:00.001-07:00</published><updated>2007-02-18T15:24:39.074-07:00</updated><title type='text'>Optimizing Frame Rate</title><content type='html'>&lt;a href="http://mxdj.sys-con.com/read/142694_p.htm"&gt;http://mxdj.sys-con.com/read/142694_p.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-5804335591639341669?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/5804335591639341669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=5804335591639341669' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/5804335591639341669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/5804335591639341669'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/02/optimizing-frame-rate.html' title='Optimizing Frame Rate'/><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-27809054.post-310017232383905397</id><published>2007-02-18T11:23:00.000-07:00</published><updated>2007-02-18T11:25:11.194-07:00</updated><title type='text'>Shared Object</title><content type='html'>&lt;pre&gt;&lt;br /&gt;//HIGH SCORE SHARED OBJECT =======================================&lt;br /&gt;// create a new shared object named "healthfirstdental"&lt;br /&gt;my_so = SharedObject.getLocal("healthfirstdental");&lt;br /&gt;// set a new variable (alreadyvisited) to 0&lt;br /&gt;if (my_so.data.alreadyvisited == undefined) {&lt;br /&gt;  my_so.data.alreadyvisited = 1;&lt;br /&gt;  // this saves the shared object immediately as opposed to when the swf shuts down  &lt;br /&gt;  my_so.flush;&lt;br /&gt;} else {&lt;br /&gt;  gotoAndStop("skipped");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//zeroalreadyvisited.onRelease = function() {&lt;br /&gt; //my_so.clear();&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/27809054-310017232383905397?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/310017232383905397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=310017232383905397' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/310017232383905397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/310017232383905397'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/02/shared-object.html' title='Shared 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-27809054.post-1370490809693389594</id><published>2007-02-18T01:09:00.001-07:00</published><updated>2007-02-18T01:14:01.200-07:00</updated><title type='text'>Parallax Function</title><content type='html'>&lt;pre&gt;&lt;br /&gt;GEN_positionInParallax = function (thisMovieClip, theBoundsMovieClip, theLeaderMovieClip) {&lt;br /&gt; //&lt;br /&gt; //  X...&lt;br /&gt; //get offset % by comparing theLeaderMovieClip with theBoundsMovieClip&lt;br /&gt; extraXSpace = (theLeaderMovieClip._width)-(theBoundsMovieClip._width);&lt;br /&gt; westGap = (theBoundsMovieClip._x)-(theLeaderMovieClip._x);&lt;br /&gt; leaderWestGapXPercentage = westGap/extraXSpace;&lt;br /&gt; //set position&lt;br /&gt; followerExtraXSpace = (thisMovieClip._width)-(theBoundsMovieClip._width);&lt;br /&gt; thisMovieClip._x = (-(followerExtraXSpace*leaderWestGapXPercentage))+theBoundsMovieClip._x;&lt;br /&gt; //&lt;br /&gt; //  Y...&lt;br /&gt; //get offset % by comparing theLeaderMovieClip with theBoundsMovieClip&lt;br /&gt; extraYSpace = (theLeaderMovieClip._height)-(theBoundsMovieClip._height);&lt;br /&gt; northGap = (theBoundsMovieClip._y)-(theLeaderMovieClip._y);&lt;br /&gt; leaderWestGapYPercentage = northGap/extraYSpace;&lt;br /&gt; //set position&lt;br /&gt; followerExtraYSpace = (thisMovieClip._height)-(theBoundsMovieClip._height);&lt;br /&gt; thisMovieClip._y = (-(followerExtraYSpace*leaderWestGapYPercentage))+theBoundsMovieClip._y;&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/27809054-1370490809693389594?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/1370490809693389594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=1370490809693389594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/1370490809693389594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/1370490809693389594'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/02/parallax.html' title='Parallax Function'/><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-27809054.post-4532466677243889052</id><published>2007-02-17T18:50:00.000-07:00</published><updated>2007-02-17T18:53:33.882-07:00</updated><title type='text'>Keyboard Control</title><content type='html'>&lt;pre&gt;&lt;br /&gt;if (Key.isDown(39)) {&lt;br /&gt; //LEFT; &lt;br /&gt;}&lt;br /&gt;if (Key.isDown(37)) {&lt;br /&gt; //RIGHT;&lt;br /&gt;}&lt;br /&gt;if (Key.isDown(40)) {&lt;br /&gt; //UP;&lt;br /&gt;}&lt;br /&gt;if (Key.isDown(38)) {&lt;br /&gt; //DOWN); &lt;br /&gt;}&lt;br /&gt;if (Key.isDown(65)) {&lt;br /&gt; //A;&lt;br /&gt;}&lt;br /&gt;if (Key.isDown(83)) {&lt;br /&gt; //S;&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/27809054-4532466677243889052?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/4532466677243889052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=4532466677243889052' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/4532466677243889052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/4532466677243889052'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/02/keyboard-control.html' title='Keyboard Control'/><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-27809054.post-2043796782365446137</id><published>2007-02-17T18:14:00.000-07:00</published><updated>2007-02-17T18:54:06.343-07:00</updated><title type='text'>Circular Plotting Function</title><content type='html'>&lt;pre&gt;&lt;br /&gt;GEN_PlotItemsOnCircle = function (numberOfItems, theRadius, startDegree) {&lt;br /&gt; sliceSize = (360/numberOfItems);&lt;br /&gt; theCoordinates = [];&lt;br /&gt; for (i=0; i&lt;(numberOfItems); i++) {&lt;br /&gt;  angle = startDegree*(Math.PI/180);&lt;br /&gt;  xPlot = theRadius*Math.cos(angle);&lt;br /&gt;  yPlot = theRadius*Math.sin(angle);&lt;br /&gt;  startDegree += sliceSize;&lt;br /&gt;  theCoordinates[i] = [xPlot, yPlot];&lt;br /&gt; }&lt;br /&gt; return theCoordinates;&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/27809054-2043796782365446137?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/2043796782365446137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=2043796782365446137' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/2043796782365446137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/2043796782365446137'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/02/circular-plotting-function.html' title='Circular Plotting Function'/><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-27809054.post-8722901330230996657</id><published>2007-02-17T18:12:00.000-07:00</published><updated>2007-02-17T18:54:34.781-07:00</updated><title type='text'>Flash 3D Function</title><content type='html'>&lt;pre&gt;&lt;br /&gt;GEN_putObjectIn3dScene = function (theClip, cameraDistanceFromTracerPlane, x, y, z, vanishingPointX, vanishingPointY) {&lt;br /&gt; if (z&lt;0) {&lt;br /&gt;  theClip._alpha = 0;&lt;br /&gt; } else {&lt;br /&gt;  theClip._alpha = 100;&lt;br /&gt; }&lt;br /&gt; var zfactor = cameraDistanceFromTracerPlane/z;&lt;br /&gt; theClip._x = x*zfactor+vanishingPointX;&lt;br /&gt; theClip._y = y*zfactor+vanishingPointY;&lt;br /&gt; theClip._xscale = 100*zfactor;&lt;br /&gt; theClip._yscale = 100*zfactor;&lt;br /&gt; theClip.cacheAsBitmap();&lt;br /&gt; theClip.swapDepths(Math.floor(100000-z));&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/27809054-8722901330230996657?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/8722901330230996657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=8722901330230996657' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/8722901330230996657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/8722901330230996657'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/02/flash-3d-function.html' title='Flash 3D Function'/><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-27809054.post-6284919932310286946</id><published>2007-02-17T17:51:00.000-07:00</published><updated>2007-02-17T19:11:09.615-07:00</updated><title type='text'>Fuse Kit</title><content type='html'>Fuse Kit is a very nice set of classes, that when added to Flash, add a way to easily tween movieclips in tons of ways. The description below is the beginners "simpleSetup" mode only. There are a number of ways to use Fuse Kit. This is the easiest-to-understand way.&lt;br /&gt;&lt;br /&gt;You need to first install &lt;a href="http://www.mosessupposes.com/Fuse/"&gt;Fuse Kit&lt;/a&gt;. Installing this MXP installs new classes into Flash.&lt;br /&gt;&lt;br /&gt;Next use this code to import the classes into your code:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   import com.mosesSupposes.fuse.*;&lt;br /&gt;   ZigoEngine.simpleSetup(Shortcuts, PennerEasing, FuseFMP);&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To set a simple property for a movieClip &lt;em&gt;without&lt;/em&gt; tweening:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  my_mc.Blur_blur=20;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;NOTE: To see what these cool new properties are, go to &lt;em&gt;Flash Help FuseKit2.2/ mosessupposes.fuse/ Shortcuts&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;br /&gt;To set a simple property for a movieClip &lt;em&gt;with&lt;/em&gt; tweening:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  my_mc.slideTo(300, 300, 2);&lt;br /&gt;  my_mc.rotateTo(180, 2);&lt;br /&gt;  my_mc.colorTo("#ffffff", 10)&lt;br /&gt;  my_mc.scaleTo(10, 4)&lt;br /&gt;  my_mc.Blur_blurXTo(50, 1, "easeInOutElastic", 2);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Fuse Kit 2.1 also installs a cool tweening pallette into Flash. Go to &lt;em&gt;Window&gt;Other Panels&gt;customEasingTool2&lt;/em&gt; to see the tweens and even make up your own. &lt;br /&gt;&lt;br /&gt;If you put a number in quotes, it will add or subtract the number. For example, if a movieclip._alpha = 90, using "10" in the Fuse command will tween it up from 90 to 100. Using 10 will tween the alpha to 10. See "Know your relatives" in the PDF below for a better explanation. &lt;br /&gt;&lt;br /&gt;Here is a &lt;a href="http://www.mosessupposes.com/Fuse/speakernotes-mgunesch.pdf"&gt;PDF Beginners Guide&lt;/a&gt; that explains the various components of Fuse.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-6284919932310286946?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/6284919932310286946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=6284919932310286946' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/6284919932310286946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/6284919932310286946'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2007/02/fuse-kit.html' title='Fuse Kit'/><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-27809054.post-116287723662399609</id><published>2006-11-06T22:26:00.000-07:00</published><updated>2006-11-06T22:28:24.646-07:00</updated><title type='text'>ActionScript 3.0</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.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/27809054-116287723662399609?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/116287723662399609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=116287723662399609' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/116287723662399609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/116287723662399609'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/11/actionscript-30.html' title='ActionScript 3.0'/><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-27809054.post-116062286085853707</id><published>2006-10-11T21:12:00.000-06:00</published><updated>2006-10-11T21:15:55.356-06:00</updated><title type='text'>SWFObject</title><content type='html'>This Javascript Flash Player detection and embed script works great. No annoying dotted line around the Flash.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.deconcept.com/swfobject/"&gt;http://blog.deconcept.com/swfobject/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-116062286085853707?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/116062286085853707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=116062286085853707' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/116062286085853707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/116062286085853707'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/10/swfobject.html' title='SWFObject'/><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-27809054.post-115626321718807209</id><published>2006-08-22T10:11:00.000-06:00</published><updated>2006-11-14T11:37:06.956-07:00</updated><title type='text'>ClickTAG and Flash Banner Specs</title><content type='html'>&lt;a href="http://www.adobe.com/devnet/flash/articles/flash8_bestpractices_10.html"&gt;This&lt;/a&gt; is a great article on how to do Flash banners.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-115626321718807209?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/115626321718807209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=115626321718807209' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/115626321718807209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/115626321718807209'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/08/clicktag-and-flash-banner-specs.html' title='ClickTAG and Flash Banner Specs'/><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-27809054.post-114839558373295619</id><published>2006-05-23T08:45:00.000-06:00</published><updated>2006-10-30T12:12:24.923-07:00</updated><title type='text'>Depth Sorting</title><content type='html'>Use this code to sort objects in 3d space.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;function sortDepthOfField(clipArray) {&lt;br /&gt; &lt;br /&gt; clipArray.sort(clipYSort);&lt;br /&gt; &lt;br /&gt; for (var i = 0; i&amp;#60clipArray.length; i++) {&lt;br /&gt;  clipArray[i].swapDepths(i);&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;sortOnY = function(a,b){&lt;br /&gt; if(a._y &gt; b._y){&lt;br /&gt;  return 1;&lt;br /&gt; }else if(a._y &lt;  b._y){&lt;br /&gt;  return -1;&lt;br /&gt; }else{&lt;br /&gt;  return 0;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;theClips = [bird1, bird2, bird3, bird4, bird5, bird6];&lt;br /&gt;this.onEnterFrame = function() {&lt;br /&gt; sortDepthOfField(theClips);&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-114839558373295619?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/114839558373295619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=114839558373295619' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114839558373295619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114839558373295619'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/05/depth-sorting.html' title='Depth Sorting'/><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-27809054.post-114718083934919475</id><published>2006-05-09T07:20:00.000-06:00</published><updated>2006-05-09T07:24:41.180-06:00</updated><title type='text'>Shared Objects (Flash Cookies)</title><content type='html'>Here is the code to set up the shared object:&lt;br /&gt;&lt;code&gt;//HIGH SCORE SHARED OBJECT =======================================&lt;br /&gt;//      create a new shared object named "zionshighscore"&lt;br /&gt;my_so = SharedObject.getLocal("zionshighscore");&lt;br /&gt;//      set a new variable (highScore) to 0&lt;br /&gt;if (my_so.data.highScore == undefined) {&lt;br /&gt; my_so.data.highScore = 0;&lt;br /&gt;}&lt;br /&gt;//  this saves the shared object immediately as opposed to when the swf shuts down       &lt;br /&gt;my_so.flush;&lt;br /&gt;//my_so.data.highScore = 0;&lt;br /&gt;highScore_mc.highScore.text = "$"+my_so.data.highScore+".00";&lt;br /&gt;//   show or hide high score display&lt;br /&gt;if (my_so.data.highScore == 0) {&lt;br /&gt; highScore_mc._alpha = 0;&lt;br /&gt;} else {&lt;br /&gt; highScore_mc._alpha = 100;&lt;br /&gt;}&lt;br /&gt;zeroHighScore.onRelease = function() {&lt;br /&gt; my_so.data.highScore = 0;&lt;br /&gt; highScore_mc.highScore.text = "$"+my_so.data.highScore+".00";&lt;br /&gt;};&lt;br /&gt;//&lt;/code&gt;&lt;br /&gt;This code sets the shared object to a new value:&lt;br /&gt;&lt;code&gt;updateHighScore = function () {&lt;br /&gt; if (theScore&gt;my_so.data.highScore) {&lt;br /&gt;  my_so.data.highScore = theScore;&lt;br /&gt;  showPrompt("New High Score!", 4000);&lt;br /&gt; }&lt;br /&gt;};&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-114718083934919475?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/114718083934919475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=114718083934919475' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114718083934919475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114718083934919475'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/05/shared-objects-flash-cookies.html' title='Shared Objects (Flash Cookies)'/><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-27809054.post-114718055503102386</id><published>2006-05-09T07:15:00.000-06:00</published><updated>2006-05-09T07:16:17.923-06:00</updated><title type='text'>Popup Windows from Flash</title><content type='html'>&lt;code&gt;researchTools.toolsText.link1a.onRelease = function() {&lt;br /&gt; getURL("javascript:NewWindow=window.open('http://money.cnn.com/pf/features/lists/nar_3q05/','newWin','width=620,height=550,left=100,top=100, toolbar=Yes,location=No,scrollbars=Yes,status=Yes,resizable=Yes,fullscreen=No');  NewWindow.focus(); void(0);");&lt;br /&gt;};&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-114718055503102386?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/114718055503102386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=114718055503102386' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114718055503102386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114718055503102386'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/05/popup-windows-from-flash.html' title='Popup Windows from 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-27809054.post-114718038151184341</id><published>2006-05-09T07:12:00.000-06:00</published><updated>2006-05-09T07:13:01.513-06:00</updated><title type='text'>Timer</title><content type='html'>Look in the Equity Adventure code in gameplay.as&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-114718038151184341?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/114718038151184341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=114718038151184341' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114718038151184341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114718038151184341'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/05/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-27809054.post-114718013250669913</id><published>2006-05-09T07:08:00.000-06:00</published><updated>2006-10-24T13:13:38.760-06:00</updated><title type='text'>Shuffle Array</title><content type='html'>&lt;code&gt;shuffleArray = function (theArray) {&lt;br /&gt; // (Shuffle 10 times just for the heck of it)&lt;br /&gt; for (i=0; i&lt;10; i++) {&lt;br /&gt;  theArray.sort(function (a, b) {&lt;br /&gt;   return random(3)-1;&lt;br /&gt;  });&lt;br /&gt; }&lt;br /&gt;};&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Array.prototype.shuffle = function() {&lt;br /&gt; var Arr2 = new Array();&lt;br /&gt; while (this.length&gt;0) {&lt;br /&gt;  Arr2.push(this.splice(Math.round((this.length-1)*Math.random()), 1));&lt;br /&gt; }&lt;br /&gt; return Arr2;&lt;br /&gt;};&lt;br /&gt;theSlides=[1,2,3,4]&lt;br /&gt;theSlides.shuffle();&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-114718013250669913?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/114718013250669913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=114718013250669913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114718013250669913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114718013250669913'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/05/shuffle-array.html' title='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-27809054.post-114717976732348464</id><published>2006-05-09T07:02:00.000-06:00</published><updated>2006-05-09T07:14:25.140-06:00</updated><title type='text'>Basic Class Structure</title><content type='html'>&lt;code&gt;&lt;br /&gt;class Dog extends MovieClip {&lt;br /&gt; var speedLimit:Number = 5;&lt;br /&gt; var point:Object;&lt;br /&gt; var dogState:String = "stay";&lt;br /&gt; var trash:MovieClip;&lt;br /&gt; function Dog() {&lt;br /&gt;  //constructor&lt;br /&gt; }&lt;br /&gt; function onEnterFrame():Void {&lt;br /&gt;  //enterFrame&lt;br /&gt; }&lt;br /&gt; private function adjustVelocity(a, b):Void {&lt;br /&gt;  //private function&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;function onRelease():Void {&lt;br /&gt;  //onrelease&lt;br /&gt; }&lt;br /&gt; function onDragOut():Void {&lt;br /&gt;  //ondragout&lt;br /&gt; }&lt;br /&gt; function onRollOver():Void {&lt;br /&gt;  //onrollover&lt;br /&gt; }&lt;br /&gt; function onRollOut():Void {&lt;br /&gt;  //onrollout&lt;br /&gt; }&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-114717976732348464?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/114717976732348464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=114717976732348464' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114717976732348464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114717976732348464'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/05/basic-class-structure.html' title='Basic Class Structure'/><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-27809054.post-114717898003731221</id><published>2006-05-09T06:49:00.000-06:00</published><updated>2006-05-09T06:54:38.613-06:00</updated><title type='text'>Sound Objects</title><content type='html'>For sounds to not conflict with each other, they need to be assigned to movieclips - I think. This also works:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;function newLevelMusic() {&lt;br /&gt;    var newLevel:Sound = new Sound();&lt;br /&gt;    newLevel.attachSound("newLevel");&lt;br /&gt;    newLevel.start();&lt;br /&gt;}&lt;br /&gt;newLevelMusic()&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Here is a function that kind of works as a sound machine:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;//sfxSpeaker&lt;br /&gt;playSound = function (theID, theVolume, repeatTimes) {&lt;br /&gt; voiceCounter++;&lt;br /&gt; sfxSpeaker.createEmptyMovieClip("newVoiceMC"+voiceCounter, voiceCounter+10);&lt;br /&gt; sfxSpeaker["newVoiceMC"+voiceCounter].theSound = new Sound(sfxSpeaker["newVoiceMC"+voiceCounter]);&lt;br /&gt; sfxSpeaker["newVoiceMC"+voiceCounter].theSound.attachSound(theID);&lt;br /&gt; sfxSpeaker["newVoiceMC"+voiceCounter].theSound.setVolume(theVolume);&lt;br /&gt; sfxSpeaker["newVoiceMC"+voiceCounter].theSound.start(0, repeatTimes);&lt;br /&gt;};&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-114717898003731221?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/114717898003731221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=114717898003731221' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114717898003731221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114717898003731221'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/05/sound-objects.html' title='Sound Objects'/><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-27809054.post-114717863431951322</id><published>2006-05-09T06:38:00.000-06:00</published><updated>2006-05-09T06:47:00.503-06:00</updated><title type='text'>Tweening Using Flash's Built In Tweens</title><content type='html'>First you need to pull in tween classes:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;import mx.transitions.Tween;&lt;br /&gt;import mx.transitions.easing.*;&lt;br /&gt;this.lvlTween = new Tween(targetMc, "_y", Bounce.easeOut, -400, 200, 30);&lt;br /&gt;tweenInstance.onMotionFinished = function() {&lt;br /&gt;    // ...&lt;br /&gt;};&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;For more info, search for "Using the Tween class" in Flash help&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-114717863431951322?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/114717863431951322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=114717863431951322' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114717863431951322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114717863431951322'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/05/tweening-using-flashs-built-in-tweens.html' title='Tweening Using Flash&apos;s Built In Tweens'/><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-27809054.post-114717827551550550</id><published>2006-05-09T06:35:00.000-06:00</published><updated>2006-05-09T06:37:55.516-06:00</updated><title type='text'>Data.as Arrays</title><content type='html'>Here is an easy to understand array file that to me is easier than XML. This of course requires recompiling of the swf but for data that doesnt change this is nice.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;//database&lt;br /&gt;//leaves, timerCycles, dogsArray&lt;br /&gt;var gameLeaves:Array = [];&lt;br /&gt;var gameTicks:Array = [];&lt;br /&gt;var gameLeafFallSpeeds:Array = [];&lt;br /&gt;//level 0&lt;br /&gt;gameLeaves[0] = 50;&lt;br /&gt;gameTicks[0] = 600;&lt;br /&gt;gameLeafFallSpeeds[0] = 15;&lt;br /&gt;//level 1&lt;br /&gt;gameLeaves[1] = 100;&lt;br /&gt;gameTicks[1] = 800;&lt;br /&gt;gameLeafFallSpeeds[1] = 15;&lt;br /&gt;//level 2&lt;br /&gt;gameLeaves[2] = 200;&lt;br /&gt;gameTicks[2] = 1100;&lt;br /&gt;gameLeafFallSpeeds[2] = 10;&lt;br /&gt;//level 3&lt;br /&gt;gameLeaves[3] = 300;&lt;br /&gt;gameTicks[3] = 1200;&lt;br /&gt;gameLeafFallSpeeds[3] = 10;&lt;br /&gt;//level 4&lt;br /&gt;gameLeaves[4] = 400;&lt;br /&gt;gameTicks[4] = 1700;&lt;br /&gt;gameLeafFallSpeeds[4] = 5;&lt;br /&gt;//level 5&lt;br /&gt;gameLeaves[5] = 600;&lt;br /&gt;gameTicks[5] = 2100;&lt;br /&gt;gameLeafFallSpeeds[5] = 5;&lt;br /&gt;//level 6&lt;br /&gt;gameLeaves[6] = 800;&lt;br /&gt;gameTicks[6] = 2500;&lt;br /&gt;gameLeafFallSpeeds[6] = 5;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-114717827551550550?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/114717827551550550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=114717827551550550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114717827551550550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114717827551550550'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/05/dataas-arrays.html' title='Data.as Arrays'/><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-27809054.post-114717811150329931</id><published>2006-05-09T06:30:00.000-06:00</published><updated>2006-05-09T06:35:11.503-06:00</updated><title type='text'>#include</title><content type='html'>#include "data.as"&lt;br /&gt;#include "main.as"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-114717811150329931?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/114717811150329931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=114717811150329931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114717811150329931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114717811150329931'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/05/include.html' title='#include'/><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-27809054.post-114717781595805354</id><published>2006-05-09T06:28:00.000-06:00</published><updated>2006-05-09T06:30:15.960-06:00</updated><title type='text'>Display Quality</title><content type='html'>_quality = "LOW";&lt;br /&gt;_quality = "MEDIUM";&lt;br /&gt;_quality = "HIGH";&lt;br /&gt;_quality = "BEST";&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-114717781595805354?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/114717781595805354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=114717781595805354' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114717781595805354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114717781595805354'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/05/display-quality.html' title='Display Quality'/><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-27809054.post-114717736029272315</id><published>2006-05-09T06:20:00.000-06:00</published><updated>2006-05-09T07:06:20.620-06:00</updated><title type='text'>Preloading</title><content type='html'>To prevent all of the classes from loading in frame 1 (which causes an annoying blank screen for a long time before the preloader appears):&lt;br /&gt;-I set them to load in a later frame (8). &lt;br /&gt;-Movieclips in the library that have Classes attached to them need to have the "export in first frame" checkbox unchecked for this to work. &lt;br /&gt;-For the classes to load there needs to be at least one instance on the stage somewhere in a timeline or the Class won't &lt;br /&gt;load. For example, in the leaf game there are leaves that are pulled dynamically out of the library that have the "Leaf" class attached. These leaves weren't working until I realized that there was no instance of a leaf anywhere in the movie. I created an instance in "_root.leafHost.leafInit" and the leaves started working becuase they had been instantiated&lt;br /&gt;by this new clip.&lt;br /&gt;To preload sounds the same principles apply. There needs to be a frame with a sound attached&lt;br /&gt;for attached sounds to work.&lt;br /&gt;&lt;b&gt;Here is some preloader code:&lt;/b&gt; &lt;br /&gt;&lt;code&gt;&lt;br /&gt;this.onEnterFrame = function() {&lt;br /&gt; if (_framesloaded == _totalframes) {&lt;br /&gt;  delete this.onEnterFrame;&lt;br /&gt;  gotoAndStop("intro");&lt;br /&gt; } else {&lt;br /&gt;  theProgress = "Loading "+(Math.floor(this.getBytesLoaded()/1000))+"K of "+(Math.floor(this.getBytesTotal()/1000))+"K";&lt;br /&gt;  preloadBar._width = (241*this.getBytesLoaded())/this.getBytesTotal();&lt;br /&gt; }&lt;br /&gt;};&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Here is another preloader:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;this.onEnterFrame = function() {&lt;br /&gt; //trace("...");&lt;br /&gt; preloader_mc.loaderText.text = "LOADING "+Math.floor(this.getBytesLoaded()*.001)+"K OF "+Math.floor(this.getBytesTotal()*.001)+"K";&lt;br /&gt; preloader_mc.loaderBar._width=(preloader_mc.loaderBG._width*this.getBytesLoaded())/this.getBytesTotal()&lt;br /&gt; if (this.getBytesLoaded() == this.getBytesTotal()) {&lt;br /&gt;  delete this.onEnterFrame;&lt;br /&gt;  gotoAndStop("titlescreen");&lt;br /&gt; }&lt;br /&gt;};&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/27809054-114717736029272315?l=mattsflashjournal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mattsflashjournal.blogspot.com/feeds/114717736029272315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=27809054&amp;postID=114717736029272315' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114717736029272315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/27809054/posts/default/114717736029272315'/><link rel='alternate' type='text/html' href='http://mattsflashjournal.blogspot.com/2006/05/preloading.html' title='Preloading'/><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></feed>
