<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-1590473001405508990</id><updated>2009-11-14T15:26:56.084-08:00</updated><title type='text'>Scott Jeppesen</title><subtitle type='html'>Actionscript, Game Programming, and more...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://scottjeppesen.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default'/><link rel='alternate' type='text/html' href='http://scottjeppesen.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Scott Jeppesen</name><uri>http://www.blogger.com/profile/10646267985038648532</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1590473001405508990.post-256032434986660817</id><published>2009-09-24T20:15:00.000-07:00</published><updated>2009-09-24T20:43:31.235-07:00</updated><title type='text'>FlexBuilder Keyboard Shortcuts</title><content type='html'>Recently, I was helping a co-worker out with some code. He was using FlexBuilder on the Mac and I noticed how much he was using the mouse while coding. Flex Builder has some great time-saving keyboard shortcuts built in and I took the opportunity to show him a few of the ones I use most frequently. I figured if this developer didn't know about a lot of these shortcuts, then there are probably plenty of others who might not either...hence blog post time. :)&lt;br /&gt;&lt;br /&gt;First off, you can actually get Flex Builder to display a list of all available keyboard shortcuts by pressing COMMAND-SHIFT-L.&lt;br /&gt;&lt;br /&gt;Some of my favorites:&lt;br /&gt;&lt;br /&gt;COMMAND-SHIFT-R: Open Resource. This will bring up a searchable dialogue to let you find any Class, Interface, namespace, etc in your project. If I'm not actively creating classes, I'll often close the Project Explorer, which gives me a ton of extra coding real estate. Using this command I can easily open the source for any of my projects resources.&lt;br /&gt;&lt;br /&gt;CTRL-O: Find Property/Method. This will bring up a searchable dialogue that lets you search for any method or property of the current class. A lot quicker than using the usual find dialogue.&lt;br /&gt;&lt;br /&gt;COMMAND-CLICK: Holding COMMAND while hovering the mouse over any class definition while cause the definition to show a "hyperlink" underline. Clicking will then open the source for that class. This in combination with COMMAND-SHIFT-R means I don't really need the Project Explorer unless I'm creating a new class or deleting an existing one.&lt;br /&gt;&lt;br /&gt;CTRL-SPACE: Display code hints. I wish there was a way to make this happen automatically ala FlashDevelop, but it looks like I'll have to keep pressing the keys to get it. It happens after hitting a period or typing a colon or "new" but FlashDevelop handles this a little more agressively.&lt;br /&gt;&lt;br /&gt;COMMAND-SHIFT-O: Organize imports. This will remove any unused imports and alphabetize the rest.&lt;br /&gt;&lt;br /&gt;These shortcuts are all for the Mac, however, to use them on the PC I believe you can replace any of the COMMAND keys with CTRL and they'll all work.&lt;br /&gt;&lt;br /&gt;There are many more, but these are what I use most frequently.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1590473001405508990-256032434986660817?l=scottjeppesen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottjeppesen.blogspot.com/feeds/256032434986660817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1590473001405508990&amp;postID=256032434986660817' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default/256032434986660817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default/256032434986660817'/><link rel='alternate' type='text/html' href='http://scottjeppesen.blogspot.com/2009/09/flexbuilder-keyboard-shortcuts.html' title='FlexBuilder Keyboard Shortcuts'/><author><name>Scott Jeppesen</name><uri>http://www.blogger.com/profile/10646267985038648532</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12587097434332573326'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1590473001405508990.post-3111978290114812663</id><published>2009-09-09T23:24:00.000-07:00</published><updated>2009-09-09T23:46:28.738-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Actionscript'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><title type='text'>Strange behavior with Flex Embed tag</title><content type='html'>Ok, so Flex provides some great tools for dealing with asset integration. Using the Embed metatag, you can bind a class to a symbol within a swf pretty easily. For example, say we have a popup asset that resides in an fla and we want to control it from our flex project. To do this, in Flash, you give a linkage identifier to the symbol in your library - say, MyPopUp - and publish your swf. Then, to bind the symbol to your class, you place the Embed tag immediately before your class definition:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="actionscript"&gt;&lt;br /&gt;[Embed(source='assets.swf',symbol='MyPopUp')]&lt;br /&gt;public class MyPopUp extends Sprite {&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;At that point, any sprites that exist on the symbol's timeline would become public properties of the MyPopUp class. You'll need to either, preferably, define public properties for each instance, or declare the class as dynamic.&lt;br /&gt;&lt;br /&gt;The last few days I have been working on a project where I ran into some quirkiness when it comes to the flex compiler and how it deals with embedded bound class instances. If the symbol contains an object that is also bound to a class, the compile will, sometimes, compile fine, and other times...well, not. For example, I have a clip on the timeline within MyPopUp in my fla. That symbol has a linkage name of DrawingPad. Then, using the embed tag it is bound to a DrawingPad class. You would expect that the following would be fine:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="actionscript"&gt;&lt;br /&gt;[Embed(source='assets.swf',symbol='MyPopUp')]&lt;br /&gt;public class MyPopUp extends Sprite {&lt;br /&gt;     public var drawingPage:DrawingPad;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt; &lt;br /&gt;&lt;br /&gt;This will always compile without error. However, sometimes it will run fine and others you will get a Type Coercion Error: Cannot convert flash.display.MovieClip@9876... to DrawingPad. It seems like the difference is that in some compiles, it ensures that DrawingPad gets defined before MyPopUp (works fine) and on other times the opposite happens. If the symbol is removed from the timeline and you create the symbol manually...&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="actionscript"&gt;&lt;br /&gt;drawingPage = new DrawingPage();&lt;br /&gt;addChild(drawingPage);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;...it will work correctly every time. So the app obviously has the type defined correctly, but fails to type cast it correctly most of the time if it's placed on the timeline from with the symbol itself. Perhaps this is something that will be fixed in the new Catalyst-&gt;FlashBuilder workflow? I haven't used it, yet, so I'm not sure. &lt;br /&gt;&lt;br /&gt;This ate up a good amount of my time a couple days ago so I figured I'd post to save someone else the headache.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1590473001405508990-3111978290114812663?l=scottjeppesen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottjeppesen.blogspot.com/feeds/3111978290114812663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1590473001405508990&amp;postID=3111978290114812663' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default/3111978290114812663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default/3111978290114812663'/><link rel='alternate' type='text/html' href='http://scottjeppesen.blogspot.com/2009/09/strange-behavior-with-flex-embed-tag.html' title='Strange behavior with Flex Embed tag'/><author><name>Scott Jeppesen</name><uri>http://www.blogger.com/profile/10646267985038648532</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12587097434332573326'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1590473001405508990.post-6234035058110010782</id><published>2008-03-16T21:14:00.001-07:00</published><updated>2008-03-16T21:21:50.503-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Actionscript'/><title type='text'>Using TextField for HTML Stripping</title><content type='html'>This may be something commonly used already, but it's the first time I've run into the need. I am working on an application where I needed to strip all html tags out of a string. First over-complicating things, I looked around the net and found several functions that will parse out the html tags. Then it hit me, there's an easier way - and it's build right into Flash. Using the TextField class, you can easily rip the html tags out - and still keep your original string intact. Since TextField has both an htmlText property and a text property, you can write to one and read from the other:&lt;pre name="code" class="actionscript"&gt;&lt;br /&gt;var htmlStripper:TextField = new TextField();&lt;br /&gt;htmlStripper.htmlText = originalHtmlString;&lt;br /&gt;&lt;br /&gt;var strippedString:String = htmlStripper.text;&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/1590473001405508990-6234035058110010782?l=scottjeppesen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottjeppesen.blogspot.com/feeds/6234035058110010782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1590473001405508990&amp;postID=6234035058110010782' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default/6234035058110010782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default/6234035058110010782'/><link rel='alternate' type='text/html' href='http://scottjeppesen.blogspot.com/2008/03/using-textfield-for-html-stripping.html' title='Using TextField for HTML Stripping'/><author><name>Scott Jeppesen</name><uri>http://www.blogger.com/profile/10646267985038648532</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12587097434332573326'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1590473001405508990.post-5121317286986310671</id><published>2008-02-25T11:42:00.000-08:00</published><updated>2008-02-25T12:15:06.421-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AIR'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash'/><title type='text'>Adobe Releases Flex 3, Flex Builder 3, and AIR 1.0</title><content type='html'>Wow....big release day for Adobe. &lt;br /&gt;&lt;br /&gt;1) AIR is Adobe's next generation runtime to build applications for the desktop. Essentially, with AIR you can build your application using HTML, AJAX, Flash, or Flex and deploy it as a desktop application for Windows or Mac. I've played with the betas quite a bit over the past year+ and this is exciting.&lt;br /&gt;&lt;br /&gt;2) Flex Builder 3 makes building Flex apps easy. Layout and deploying is a breeze. It is also, as far as I've found, the best AS3 editor on the Mac. The alternative for me has always been to fire up Parallels and run FlashDevelop. But when I just don't want to be bothered with firing up Windows, FB3 is a great alternative. One pitfall, if you're using subversion with your project. I have run into some quirky things with committing and updates. I often have to remove my Flex project and recreate it after doing an Update. Not the most fun I've had. Of course, I haven't played with the final release - only beta. Hopefully some of this has been fixed in the release.&lt;br /&gt;&lt;br /&gt;You can download AIR from: &lt;a href="http://get.adobe.com/air/"&gt;http://get.adobe.com/air/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1590473001405508990-5121317286986310671?l=scottjeppesen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottjeppesen.blogspot.com/feeds/5121317286986310671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1590473001405508990&amp;postID=5121317286986310671' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default/5121317286986310671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default/5121317286986310671'/><link rel='alternate' type='text/html' href='http://scottjeppesen.blogspot.com/2008/02/adobe-releases-flex-3-flex-builder-3.html' title='Adobe Releases Flex 3, Flex Builder 3, and AIR 1.0'/><author><name>Scott Jeppesen</name><uri>http://www.blogger.com/profile/10646267985038648532</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12587097434332573326'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1590473001405508990.post-1146560798514525384</id><published>2008-02-06T22:43:00.000-08:00</published><updated>2008-02-25T12:15:44.471-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AIR'/><category scheme='http://www.blogger.com/atom/ns#' term='Actionscript'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash'/><title type='text'>ELF Viewer</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_NwzDPxp58yw/R6qtwl3ewQI/AAAAAAAAAAU/ypdgVygc00c/s1600-h/ElfViewer.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_NwzDPxp58yw/R6qtwl3ewQI/AAAAAAAAAAU/ypdgVygc00c/s320/ElfViewer.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5164130973043835138" /&gt;&lt;/a&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Here's a little something extra I whipped up as a companion for ELF, the logging framework I discussed in my last post. One of the LogRenderers, the LocalConnectionRenderer is particularly useful when dealing with class libraries that are used in both CS3 and Flex. This renderer is included as a default renderer in ELF. I put together a little AIR app that will receive messages from ELF and render them to a TextField. It also gives you the ability to reconnect to the LocalConnection should it be lost, and clear the field.&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;One neat thing about this app is that it keeps track of which logger instances send in calls and provides a means to filter the log messages by logger instance. I usually name my loggers by the name of the class that contains it. That way, I can specifically narrow down the log messages I'm looking at to the a particular class or component that I am interested in.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;ELF Viewer requires AIR beta 3, which is available on &lt;a href="http://labs.adobe.com/"&gt;Adobe Labs&lt;/a&gt;. &lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.scottjeppesen.com/Scott_Jeppesen/blogfiles/ELFViewer.zip"&gt;Download ELF Viewer&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1590473001405508990-1146560798514525384?l=scottjeppesen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottjeppesen.blogspot.com/feeds/1146560798514525384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1590473001405508990&amp;postID=1146560798514525384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default/1146560798514525384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default/1146560798514525384'/><link rel='alternate' type='text/html' href='http://scottjeppesen.blogspot.com/2008/02/elf-viewer.html' title='ELF Viewer'/><author><name>Scott Jeppesen</name><uri>http://www.blogger.com/profile/10646267985038648532</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12587097434332573326'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_NwzDPxp58yw/R6qtwl3ewQI/AAAAAAAAAAU/ypdgVygc00c/s72-c/ElfViewer.jpg' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1590473001405508990.post-4618802251443102097</id><published>2008-01-27T23:43:00.000-08:00</published><updated>2008-02-07T13:05:07.703-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Actionscript'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash'/><title type='text'>ELF = Electrotank Logging Framework</title><content type='html'>     Debugging applications in Flash has always been tricky. One of the first projects I had to opportunity to work on when I started with Electrotank was to develop a reliable and lightweight logging framework. For this framework, we had several requirements:&lt;div&gt;&lt;ol&gt;&lt;li&gt;Must be flexible. We needed to be able to render log messages to any number of different sources. &lt;/li&gt;&lt;li&gt;Must be very lightweight. While always making attempts to better optimize our games, we couldn't have a logging framework that would weigh things down.&lt;/li&gt;&lt;li&gt;Must be customizable. Should be able to adjust log levels and renderers globally and/or by class instance.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;ELF (Electrotank Logging Framework) is very simple to use for basic logging purposes. To create a log, you instantiate it using the Logger.getLogger() method. All Loggers implement the ILogger interface. &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre name="code" class="actionscript"&gt;import com.electrotank.logging.*; &lt;br /&gt;var logger:ILogger = Logger.getLogger("com.electrotank.Game");&lt;/pre&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;To log a message, you would then call the appropriate method to the log severity (debug,info,status,error,fatal): &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre name="code" class="actionscript"&gt;logger.debug("This is a debug message"); &lt;br /&gt;logger.info("This is an info message."); &lt;/pre&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;... and so on ... &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;For the sake of keeping overhead to a minimum, an optional second parameter is available to all log calls (debug(),info(),etc....). This parameter, an Array, will allow you to specify values to be inserted into your log message in the event the log is run. For example, if you were tracking the x and y positions of a MovieClip. you might normally log: &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre name="code" class="actionscript"&gt;logger.debug("x="+myMC.x+",y="+myMC.y);&lt;/pre&gt; &lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;The problem with this is that, regardless of your severity threshold, the expense of the string concatenation will be there. However, you can achieve the same thing using the optional second parameter: &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre name="code" class="actionscript"&gt;logger.debug("x=$0,y=$1",[myMC.x,myMC.y]); &lt;/pre&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Aside from being easier to read and easier to write, this method will also save the concatenation for only if the log passes the threshold and actually logs. This works similar to a printf() method in that the wildcard ("$") is followed by the index of the array value to merge. This allows you to move values around easily. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;The log message will be rendered to the registered log renderers. To configue the Logger globally, you can call the Logger.configure() static method. This method requires an instance of Configuration. With the Configuration class, you can configure the default severity threshold and the default renderers.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre name="code" class="actionscript"&gt;var config:IConfiguration = new Configuration();&lt;br /&gt;config.setDefaultThreshold(LogSeverity.FATAL); &lt;br /&gt;config.setDefaultRenderers([new TraceRenderer()]); &lt;/pre&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Without further configuration, the initial threshold is set to LogSeverity.DEBUG and the initial renderers are TraceConfiguration and LocalConnectionRenderer.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Renderers are the means by which the logger will display the log messages. A TraceRenderer instance will display the message by a Flash trace() call. A TextFieldRenderer will render the messages to a TextField of your choosing. The LocalConnectionRenderer will render the messages to a LocalConnection instance. These renderers can be configured individually by their instance level configure method. With these configurations, you can choose a different form of formatting for the LogMessage. The default is SimpleFormatter. All formatters must implement the IFormatter interface. &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre name="code" class="actionscript"&gt;var config:IConfigration = new TraceConfiguration();&lt;br /&gt;config.setFormatter(new CustomFormatter());&lt;br /&gt;&lt;br /&gt;var traceRenderer:ILogRenderer = new TraceRenderer();&lt;br /&gt;traceRenderer.configure(config);&lt;/pre&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;This gives a lot of flexibility to how you want to receive the log messages and makes adapting the framework to different environments (Flex, CS3) easy.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;We've begun using ELF heavily in several large  projects currently underway and I've found it to be a huge time saver. This version is currently AS3 only. I have an AS2 version, but I kind of left it behind and continued development in AS3. If I get the chance, I'll try and bring the AS2 version back up to speed. Until then, you can download ELF from the link below.  &lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;a href="http://www.scottjeppesen.com/Scott_Jeppesen/blogfiles/elf.zip"&gt;Download ELF&lt;/a&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1590473001405508990-4618802251443102097?l=scottjeppesen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottjeppesen.blogspot.com/feeds/4618802251443102097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1590473001405508990&amp;postID=4618802251443102097' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default/4618802251443102097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default/4618802251443102097'/><link rel='alternate' type='text/html' href='http://scottjeppesen.blogspot.com/2008/01/elf-electrotank-logging-framework.html' title='ELF = Electrotank Logging Framework'/><author><name>Scott Jeppesen</name><uri>http://www.blogger.com/profile/10646267985038648532</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12587097434332573326'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1590473001405508990.post-6170281629530625123</id><published>2008-01-22T23:51:00.000-08:00</published><updated>2008-01-27T23:37:34.600-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Actionscript'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash'/><title type='text'>Uploading Files with AS3</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style=" ;font-family:verdana;"&gt;     I am currently working on a project that contains a lot of upload functionality from within Flash. Running a basic upload routine to choose a file and send it to a server script is easy and well-documented. However, what I needed, was to upload a file to a script, and then receive back a url to that uploaded file. Turns out this is a piece of cake with AS3.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;     The FileReference class has many events. These include events for the beginning of the upload, io errors, cancellations, upload progress, and the completion of the upload. What I originally tried to do was listen to Event.COMPLETE. The problem with this is that, while the event fires when the file has uploaded, it returns no information about that file. The answer lies in the DataEvent.UPLOAD_COMPLETE_DATA event. When the DataEvent is fired, you can access the path to the file you uploaded by referencing the event's data property. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;     I've put together a simple example that demonstrates how to do this. You can download the file &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.scottjeppesen.com/Scott_Jeppesen/blogfiles/MediaUploader.as"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;here&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1590473001405508990-6170281629530625123?l=scottjeppesen.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottjeppesen.blogspot.com/feeds/6170281629530625123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1590473001405508990&amp;postID=6170281629530625123' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default/6170281629530625123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1590473001405508990/posts/default/6170281629530625123'/><link rel='alternate' type='text/html' href='http://scottjeppesen.blogspot.com/2008/01/uploading-files-with-as3.html' title='Uploading Files with AS3'/><author><name>Scott Jeppesen</name><uri>http://www.blogger.com/profile/10646267985038648532</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12587097434332573326'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry></feed>