<?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-24210730</id><updated>2011-12-22T22:12:10.489-08:00</updated><category term='Flex'/><category term='Firefox'/><title type='text'>TL on PL</title><subtitle type='html'>Personal blog of Tom Lee, DC-based web designer/developer.  Topics include Flash, CSS, JavaScript, HTML and other presentation layer technologies.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>84</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-24210730.post-2693541239906338604</id><published>2009-06-24T06:45:00.000-07:00</published><updated>2009-06-24T06:59:25.165-07:00</updated><title type='text'>Goodbye, Blogger.com</title><content type='html'>Due to the amount of spam this blog is collecting, and the lack of tools to mitigate it effectively, I'm shutting this sucker down.  I have migrated everything to a new Wordpress blog at &lt;a href="http://blog.nthsense.net"&gt;http://blog.nthsense.net&lt;/a&gt;.  I've updated Feedburner to point to the new blog, so hopefully my subscribers won't be inconvenienced.&lt;br /&gt;&lt;br /&gt;It has been a long time since I posted anything here.  My focus on this blog has been to share fringe development techniques and hard-to-find workarounds for odd behavior in Flash, JavaScript, and CSS.  My interests have evolved somewhat - I'm now working with almost 100% Flex at my job, so I have less to talk about on the HTML/CSS/JavaScript side of things.  There are plenty of workarounds I could be sharing on the Flex side, but Adobe evolves the framework quickly enough that my workarounds are obsolete in a fairly short time. &lt;br /&gt;&lt;br /&gt;Also, I'm focusing a lot more on iPhone development, which is a totally new area for me.  It is going to take some time to build expertise in XCode/Objective C, so I won't have much to share apart from the basics, which there are plenty of resources for.&lt;br /&gt;&lt;br /&gt;All that said, big things are coming... so stay tuned.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-2693541239906338604?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/2693541239906338604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=2693541239906338604' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/2693541239906338604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/2693541239906338604'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2009/06/goodbye-bloggercom.html' title='Goodbye, Blogger.com'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-3566824847347930233</id><published>2009-02-04T06:00:00.000-08:00</published><updated>2009-02-04T06:21:48.849-08:00</updated><title type='text'>SWF Scale-Nine Skin Sizing Issue</title><content type='html'>I beat my brains out over this one for 3 hours the other day.  I was skinning a Flex component with a SWF library asset (a MovieClip) that used nine slice scaling.  There was a visual gap between the right and bottom sides of the skinned component and its parent.  For a while, I thought that this was due to some padding or something being applied to the parent.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_GovMAtBaqqY/SYmjL477RdI/AAAAAAAAAAM/vQwba8e6L9w/s1600-h/SkinGapTest.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 204px;" src="http://2.bp.blogspot.com/_GovMAtBaqqY/SYmjL477RdI/AAAAAAAAAAM/vQwba8e6L9w/s320/SkinGapTest.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5298945861235721682" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To resolve this issue, I did two things in Flash:&lt;br /&gt;&lt;br /&gt;1) I converted my border from lines to fills, by going to Modify &gt; Shape &gt; Convert Lines to Fills&lt;br /&gt;2) I made sure to register the upper-left corner of the shape at 0,0.&lt;br /&gt;&lt;br /&gt;Easy, but yet so difficult.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-3566824847347930233?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/3566824847347930233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=3566824847347930233' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/3566824847347930233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/3566824847347930233'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2009/02/swf-scale-nine-skin-sizing-issue.html' title='SWF Scale-Nine Skin Sizing Issue'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_GovMAtBaqqY/SYmjL477RdI/AAAAAAAAAAM/vQwba8e6L9w/s72-c/SkinGapTest.png' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-8979895310383710082</id><published>2008-07-17T06:12:00.000-07:00</published><updated>2008-07-17T06:14:36.199-07:00</updated><title type='text'>Awesome - Flash IDE video</title><content type='html'>Don't know how I missed this, but here it is:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=vqMI480D668"&gt;http://www.youtube.com/watch?v=vqMI480D668&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Demoing live video, inverse kinematics, and a new tweening model in the upcoming version of the Flash IDE. Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-8979895310383710082?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/8979895310383710082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=8979895310383710082' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/8979895310383710082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/8979895310383710082'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2008/07/awesome-flash-ide-video.html' title='Awesome - Flash IDE video'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-5408439663100558895</id><published>2008-06-16T12:11:00.000-07:00</published><updated>2008-06-16T12:18:22.273-07:00</updated><title type='text'>AJAX in ASP .Net - Missing Sys.WebForms.*</title><content type='html'>So - don't ask me why, but I've been dabbling with AJAX &amp; .Net 2.0.  Oh, the shame of it.  I just spent two days trying to figure out why my UpdatePanel controls were doing a full refresh of the page instead of only updating the area they encapsulate.  It turns out that the required script libraries (.axd files) were not all being rendered into the page.  In particular, I was missing Sys.WebForms.PageRequestManager.  It took a further two hours to find the following (seemingly irrelevant) blog post:&lt;br /&gt;&lt;br /&gt;http://blogs.technet.com/stefan_gossner/archive/2006/01/24/418005.aspx&lt;br /&gt;&lt;br /&gt;In a fit of desperation, I tried his suggestion for fixing a completely unrelated problem, and lo, it worketh.  Just comment the following out of your web.config:&lt;br /&gt;&lt;br /&gt;&amp;lt;xhtmlConformance mode="Legacy" /&amp;gt;&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-5408439663100558895?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/5408439663100558895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=5408439663100558895' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/5408439663100558895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/5408439663100558895'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2008/06/ajax-in-asp-net-missing-syswebforms.html' title='AJAX in ASP .Net - Missing Sys.WebForms.*'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-4265309123225514133</id><published>2008-05-21T14:41:00.000-07:00</published><updated>2008-05-21T14:45:46.006-07:00</updated><title type='text'>Everything that's new in the Flash Player 10 beta docs</title><content type='html'>Adobe has &lt;a href="http://theflashblog.com/?p=387"&gt;released the docs for the Player 10 beta&lt;/a&gt;.  I went through and made a list that shows you the classes, properties, methods, events, and constants that are new to Flash Player 10.&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;br /&gt;&lt;br /&gt;adobe.utils.package: MMEndCommand()&lt;br /&gt;&lt;br /&gt;Top-Level:&lt;br /&gt;Vector&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;flash.utils.ByteArray: inflate(), deflate()&lt;br /&gt;flash.ui.MouseCursor&lt;br /&gt;flash.ui.ContextMenuClipboardItems&lt;br /&gt;flash.ui.ContextMenu: clipboardItems, clipboardMenu, link&lt;br /&gt;flash.text.engine.*&lt;br /&gt;flash.system.Capabilities: hasColorCorrection&lt;br /&gt;flash.system.Capabilities: domainMemory, MIN_DOMAIN_MEMORY_LENGTH&lt;br /&gt;flash.net.NetStreamPlayTransitions&lt;br /&gt;flash.net.NetStreamPlayOptions&lt;br /&gt;flash.net.NetStreamInfo&lt;br /&gt;flash.net.NetConnection: farID, farNonce, maxPeerConnections, nearID, nearNonce, protocol, unconnectedPeerStreams&lt;br /&gt;flash.net.FileReference: data, load(), save()&lt;br /&gt;flash.media.SoundCodec&lt;br /&gt;flash.media.Sound: extract(), sampleData&lt;br /&gt;flash.media.Microphone: codec, encodeQuality, framesPerPacket&lt;br /&gt;flash.geom.Vector3D&lt;br /&gt;flash.geom.Utils3D&lt;br /&gt;flash.geom.Transform: matrix3D, perspectiveProjection, getRelativeMatrix3D()&lt;br /&gt;flash.geom.PerspectiveProjection&lt;br /&gt;flash.geom.Orientation3D&lt;br /&gt;flash.geom.Matrix3D&lt;br /&gt;flash.filters.ShaderFilter&lt;br /&gt;flash.events.ShaderEvent&lt;br /&gt;flash.events.Event: CLEAR, COPY, CUT, PASTE, SAMPLE_DATA, SELECT_ALL&lt;br /&gt;flash.display.Stage: enableColorCorrection&lt;br /&gt;flash.display.ShaderPrecision&lt;br /&gt;flash.display.ShaderParameterType&lt;br /&gt;flash.display.ShaderParameter&lt;br /&gt;flash.display.ShaderJob&lt;br /&gt;flash.display.ShaderInput&lt;br /&gt;flash.display.ShaderData&lt;br /&gt;flash.display.Shader&lt;br /&gt;flash.display.MovieClip: currentFrameLabel&lt;br /&gt;flash.display.InteractiveObject: clear (event), copy (event), cut (event), paste (event), selectAll (event)&lt;br /&gt;flash.display.Graphics: beginShaderFill()&lt;br /&gt;flash.display.DisplayObject: blendShader, rotationX, rotationY, rotationZ, z, globalToLocal3D(), local3DToGlobal()&lt;br /&gt;flash.display.BlendMode: SHADER&lt;br /&gt;flash.display.BitmapData: histogram&lt;br /&gt;flash.desktop.ClipboardTransferMode&lt;br /&gt;flash.desktop.ClipboardFormats&lt;br /&gt;flash.desktop.Clipboard&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-4265309123225514133?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/4265309123225514133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=4265309123225514133' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/4265309123225514133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/4265309123225514133'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2008/05/everything-thats-new-in-flash-player-10.html' title='Everything that&apos;s new in the Flash Player 10 beta docs'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-4303680331139585996</id><published>2008-04-17T16:25:00.000-07:00</published><updated>2008-04-17T16:26:50.942-07:00</updated><title type='text'>Here's a New One</title><content type='html'>This was emitted from a Flex swf I was working on today:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Error: The SystemManager constructor was called when the currentFrame was at 2 Please add this SWF to bug 129782.&lt;br /&gt; at mx.managers::SystemManager()&lt;br /&gt; at _EmbeddingImagesScale9_mx_managers_SystemManager()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Never seen that before. Good times.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-4303680331139585996?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/4303680331139585996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=4303680331139585996' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/4303680331139585996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/4303680331139585996'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2008/04/heres-new-one.html' title='Here&apos;s a New One'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-4763286106950265882</id><published>2008-04-16T07:25:00.000-07:00</published><updated>2008-04-16T07:54:52.590-07:00</updated><title type='text'>Adobe's Coding Conventions Leave Me Asking "Why??"</title><content type='html'>I just took a quick first pass through Adobe's newly-published &lt;a href="http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions"&gt;Flex Coding Conventions&lt;/a&gt;, and while I agree with much of what is in there, a few items leave me scratching my head.  I think it would have been useful for them to offer some sort of rationale behind the recommendations, not just "do this, not that" mandates.  By way of a few examples:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Use Array literals rather than new Array().&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Isn't "new Array()" more consistent with the way every other kind of object is instantiated?  "[]" is a shorthand syntax - I have found shorthand generally to be something to be avoided, because it requires a deeper familiarity with a language than a generalist programmer would possess.  I raise the same objection to the recommendations for using Object literals, RegExp literals, and so forth.  Consistency is key.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Don't use unnecessary parentheses with common operators such as +, -, *, /, &amp;amp;&amp;amp;, ||, &amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;=, ==, and !=.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I favor explicit groups, not implicit ones.  In my opinion, this: &lt;span style="font-style:italic;"&gt;var e:Number = (a * b) / (c + d);&lt;/span&gt; is better than this: &lt;span style="font-style:italic;"&gt;var e:Number = a * b / (c + d);&lt;/span&gt; because it removes ambiguity over whether &lt;span style="font-style:italic;"&gt;b&lt;/span&gt; is divided by &lt;span style="font-style:italic;"&gt;(c + d)&lt;/span&gt; or &lt;span style="font-style:italic;"&gt;a * b&lt;/span&gt; is divided by &lt;span style="font-style:italic;"&gt;(c + d)&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;If the various branches of an if/else statement involve single statements, don't make them into blocks.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This just makes your code less readable, and introduces an inconsistency in the way the syntax is written.  Why have a special case for branches that contain a single statement?  This feels more like the personal preference of an experienced developer than a bona fide "best practice" for teams.  Indeed, the recommendation for "while" statements is exactly the opposite.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Use int for integers, even if they can't be negative. Use uint only for RGB colors, bit masks, and other non-numeric values.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Why???? What's the point in having a uint if you're only going to use it for things other than unsigned integers?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;These are just a few that jumped out at me, because they seemed arbitrary exceptions to the norm.  "Best practices" should promote a coding standard that favors minimal variation in syntax over quick coding time, easy understanding over minor performance gains, etc.  Overall, I think they're on the right track - but if they're going to create all kinds of exceptions to their own rules, they should provide more explanation.&lt;br /&gt;&lt;br /&gt;One more - this is just whack:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;var a:Array /* of String */ = [];&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The language does not support typed arrays.  If you need a typed array, extend ArrayCollection and add your own type-checking.  Cluttering up your code with comments like this doesn't offer any compile-time type-checking, and is much less readable than &lt;span style="font-style:italic;"&gt;var a:MovieClipArray = new MovieClipArray();&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-4763286106950265882?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/4763286106950265882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=4763286106950265882' title='25 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/4763286106950265882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/4763286106950265882'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2008/04/adobes-coding-conventions-leave-me.html' title='Adobe&apos;s Coding Conventions Leave Me Asking &quot;Why??&quot;'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>25</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-5619123585299994463</id><published>2008-03-25T13:23:00.000-07:00</published><updated>2008-04-03T10:17:25.595-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>wmode="opaque" + Firefox + position:fixed = AAAAGGGHH!!!!</title><content type='html'>I just spent the last 4 hours or so tracking down this bug.  I needed to use wmode="opaque" on my Flex app, due to a dynamic menu overlay issue.  However, in Firefox this seemed to mean that none of the buttons in the Flex app would be clickable.  Ok, Tom, break the problem down...&lt;br /&gt;&lt;br /&gt;I embed the swf in a plain-jane web page, and it works fine (wmode="opaque").  I add in my style sheets, and it stops working.  Turns out that setting position:fixed on the body tag was the cause - changing to position:static was the cure.&lt;br /&gt;&lt;br /&gt;May you waste less time than I did.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-5619123585299994463?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/5619123585299994463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=5619123585299994463' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/5619123585299994463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/5619123585299994463'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2008/03/wmodeopaque-firefox-positionfixed.html' title='wmode=&quot;opaque&quot; + Firefox + position:fixed = AAAAGGGHH!!!!'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-1272361604732587882</id><published>2008-01-18T09:39:00.000-08:00</published><updated>2008-01-18T09:45:49.285-08:00</updated><title type='text'>A Regular Expression for Stripping HTML Tags</title><content type='html'>Here's a regex I wrote yesterday for stripping specific html tags from a string:&lt;br /&gt;&lt;br /&gt;&lt;[^&gt;]*(table|tr|td|th)[^&lt;]*&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here's an example in AS3 that removes &amp;lt;p&amp;gt; and &amp;lt;b&amp;gt; tags:&lt;br /&gt;&lt;br /&gt;var testString:String = "&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Hello&amp;lt;/b&amp;gt; world!&amp;lt;/p&amp;gt;";&lt;br /&gt;var regEx:RegExp = new RegExp("&lt;[^&gt;]*(p|b)[^&lt;]*&gt;","gi")&lt;br /&gt;trace(testString.replace(regEx,""));&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-1272361604732587882?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/1272361604732587882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=1272361604732587882' title='27 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/1272361604732587882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/1272361604732587882'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2008/01/regular-expression-for-stripping-html.html' title='A Regular Expression for Stripping HTML Tags'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>27</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-1607747455085357166</id><published>2008-01-18T09:28:00.000-08:00</published><updated>2008-01-18T09:38:13.962-08:00</updated><title type='text'>Switched from Google Checkout to PayPal for donations</title><content type='html'>I've switched to PayPal from Google Checkout for donations, in order to allow people to donate a custom amount.  The fees are higher, but it allows for more flexible configuration - in the end, I think that's better.  What do you think?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-1607747455085357166?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/1607747455085357166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=1607747455085357166' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/1607747455085357166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/1607747455085357166'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2008/01/switched-from-google-checkout-to-paypal.html' title='Switched from Google Checkout to PayPal for donations'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-5298900300957628446</id><published>2008-01-18T08:03:00.000-08:00</published><updated>2008-01-18T08:24:36.978-08:00</updated><title type='text'>What's the right approach for blog monetization?</title><content type='html'>Lately I've been experimenting with this blog a little bit to learn more about how AdSense works, so you've no doubt noticed the ads.  I personally dislike ads, but they do have the potential to be a money-maker under the right circumstances.  The nice thing about them is that the money doesn't come from the pocket of the viewer, it comes from the people who advertise.  For this blog, however, I don't think they're a good fit.  Here are a few reasons why:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The content of this blog doesn't lend itself to pulling quality ads.&lt;/span&gt;  I've been seeing ads for "Fix Flash Player Errors" - I sincerely hope no one clicked on that thing.  It takes you to a registry scanner of some sort, and strikes me as being a bit nefarious.  Also, the ads are only pulling in (at most) a few cents per click.  For over 2700 visits, I made a whopping total of 73 cents.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The people who view this blog are not given to clicking on ads.&lt;/span&gt;  Clearly, whatever my blog is advertising, you're not interested in.  For over 2700 visits, my ads were clicked around 10 times.&lt;br /&gt;&lt;br /&gt;In terms of a money-making proposition, I think it's safe to say ads are not a good fit.  I have removed most of the ads on the site.  I still want to watch how Google AdSense analyzes my content though, so I'm leaving one small ad in the footer.  Instead of the ads, I'm going to try a donation model.  I'm going with 3 donation levels:  $1.23, $5.33, and $10.63.  I started with $1, $5, and $10, and then added a few cents to offset Google Checkout fees.  These donations will help me write more useful content, and will allow me to devote more time to finishing up some of those lingering projects that people have expressed interest in.&lt;br /&gt;&lt;br /&gt;I really want your feedback on this.  Do you think the donations are appropriate?  Is the Buy button unobtrusive enough?  Are the amounts right?  I'm looking forward to your input.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-5298900300957628446?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/5298900300957628446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=5298900300957628446' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/5298900300957628446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/5298900300957628446'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2008/01/whats-right-approach-for-blog.html' title='What&apos;s the right approach for blog monetization?'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-1065264662256776882</id><published>2008-01-17T08:11:00.000-08:00</published><updated>2008-01-17T08:18:21.577-08:00</updated><title type='text'>What browsers do you test against?</title><content type='html'>I'm in the final testing phase of a new website, and I'm wondering what browsers folks commonly test against these days.  Since it's new, I have no user agent data to go by.  I'm presently testing against the following:&lt;br /&gt;&lt;br /&gt;Windows&lt;br /&gt;&lt;ul&gt;&lt;li&gt;IE: 6, 7&lt;/li&gt;&lt;li&gt;Firefox: Newest&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Mac&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Safari:Newest&lt;/li&gt;&lt;li&gt;Firefox:Newest&lt;/li&gt;&lt;/ul&gt;This is a pretty small matrix, but has been pretty successful in the past.  I give priority to fixes on the Windows platform, and Safari on the Mac.  I'll probably test in IE 5.5 as well, even though IE 5.x users make up only about 1% overall (according to some stats I'm seeing).  Are there any particular browsers &amp;amp; versions that you pay special attention to?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-1065264662256776882?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/1065264662256776882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=1065264662256776882' title='25 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/1065264662256776882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/1065264662256776882'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2008/01/what-browsers-do-you-test-against.html' title='What browsers do you test against?'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>25</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-6178222462151759128</id><published>2008-01-17T08:07:00.000-08:00</published><updated>2008-01-17T08:10:45.653-08:00</updated><title type='text'>IE Standalone Installations</title><content type='html'>I always have to look this up when I need it, so I'm posting here for my own reference and yours.&lt;br /&gt;&lt;br /&gt;Get standalone IE installations (for testing purposes) here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://browsers.evolt.org/?ie/32bit/standalone"&gt;http://browsers.evolt.org/?ie/32bit/standalone&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Some things will cause these browsers to crash - I vaguely recall a problem with the address bar, and cookies were also problematic.&lt;br /&gt;&lt;br /&gt;See the following article for solutions to some issues:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.positioniseverything.net/articles/multiIE.html"&gt;http://www.positioniseverything.net/articles/multiIE.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-6178222462151759128?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/6178222462151759128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=6178222462151759128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/6178222462151759128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/6178222462151759128'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2008/01/ie-standalone-installations.html' title='IE Standalone Installations'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-744781862889837620</id><published>2008-01-16T11:21:00.000-08:00</published><updated>2008-01-16T11:30:02.520-08:00</updated><title type='text'>The best web page development tool there is.</title><content type='html'>If you create web pages and you haven't heard about this tool yet, you need to get it ASAP.  It will make your life so much easier.  How I went this long without hearing about this is a mystery to me, but I guess you can't know everything.  The tool is called Firebug (&lt;a href="http://www.getfirebug.com/"&gt;http://www.getfirebug.com&lt;/a&gt;), and it's a toolbar for Firefox that allows you to make live modifications to CSS and see the changes instantly in the browser.  Also, the JavaScript debugging is spectacular (by JavaScript standards).  Inspect mode has been a life-saver for me - it lets you click on an element in the web page, and takes you to the relevant HTML.  Other tools, like the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en"&gt;IE Developer Toolbar&lt;/a&gt;, have some of the features - but nothing else has them all.&lt;br /&gt;&lt;br /&gt;Sorry if this is old news to you, but if you haven't tried it yet, you should.  I wouldn't want to be without it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-744781862889837620?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/744781862889837620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=744781862889837620' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/744781862889837620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/744781862889837620'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2008/01/best-web-page-development-tool-there-is.html' title='The best web page development tool there is.'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-7805934082788737295</id><published>2008-01-16T06:23:00.000-08:00</published><updated>2008-01-16T07:12:42.485-08:00</updated><title type='text'>Macworld 2008 - What am I buying?</title><content type='html'>No doubt this has already been covered to death elsewhere on the interwebs, but I thought I'd chime in with my takeaways on Macworld '08.&lt;br /&gt;&lt;br /&gt;You can't announce an industry-changer like the iPhone every year.  So it's no surprise that this year's Macworld left many with an empty place inside where their anticipation once lived.  But if the new Apple product lineup didn't live up to the hype, it's not Apple's fault.  Although the blogosphere was abuzz with conjecture months in advance, I didn't hear Apple saying they were going to change the world.  And they didn't.  What they did was announce solid upgrades to their product line&lt;br /&gt;&lt;br /&gt;The much-needed refresh for the Apple TV set-top box with the major overhaul of movies on iTunes is a powerful combination, and may prove formidable competition for the existing players in the online movie rental space.  Those who don't wish to shell out $230 for the set-top box will still end up renting a few movies for mobile viewing on their iPods.  For those who do buy the Apple TV, keeping a Netflix subscription around looks less appealing (although in many cases, it's still cheaper) and ordering pay-per-view on cable and satellite would just make no sense at all.&lt;br /&gt;&lt;br /&gt;The iPhone 1.1.3 software update was the single thing that I looked forward to the most, and so it was also the most disappointing.  It could have been so much more, particularly given my low expectations.  I want a few basic things from my iPhone that it doesn't do now:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;A way to edit my notes on my Mac&lt;/li&gt;&lt;li&gt;Select, copy and paste text&lt;/li&gt;&lt;li&gt;A few simple games.  I'll even pay for them.&lt;/li&gt;&lt;li&gt;Flash.  Preferably Flash Player 9.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Ok, so the last one isn't so basic.  But the first 3 are no-brainers.&lt;br /&gt;&lt;br /&gt;The 1.1.3 iPhone update does have some cool stuff though.  The location finder in Google Maps is pretty cool, at least in theory.  It triangulates your position based on the location of nearby cell towers and wifi hotspots.  A really clever idea - but accuracy varies wildly.  In Alexandria, VA it found my location to within a mile - in my office in DC, it found my exact building.&lt;br /&gt;&lt;br /&gt;Since I'm a UI designer (among other things) and this blog is supposed to be focused on the presentation layer (although it often deviates), I'd be remiss not to talk about the new interaction the iPhone has for re-arranging icons.  This is one area where I think they nailed it.  Here's how it works: just press and hold an icon until it starts to wiggle.  When the icons are wiggling, you can drag them around the screen.  How great is that?  The 'wiggle' effect is a perfect gut-level visual cue that the icons are in a fluid state.  It's the kind of simple, intuitive design that people who create UIs should strive for.  I think when it's all said and done, Apple is going to get the credit for defining how multi-touch interfaces behave (even if Jeff Han and others did the homework).&lt;br /&gt;&lt;br /&gt;Apple also announce the Time Capsule, an Airport Extreme with a 1 terabyte hard drive inside, meant for performing wireless backups with Time Machine in Leopard.  This is a real kick in the crotch for anyone who recently (6 months ago) purchased an Airport Extreme with the intent of using it with a USB drive.  It turns out, you actually can't use a USB drive attached to last year's Airport Extreme for your Time Machine backups.  Until Apple releases firmware to resolve that issue, I'm going to assume that this was their plan all along.  Jerks.&lt;br /&gt;&lt;br /&gt;Finally, there was the MacBook Air.  I think this will be very popular for the airborne businessperson.  It will fit nicely into that little pouch on the back of the seat that holds the Skymall catalog.  Also, for the fashion-minded student.  But, not for me.  I have thick, manly arms that can withstand the weight of &lt;a href="http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/91274001/wo/Xa61UIqtdg9p3sEdFz91zhVf7el/2.?p=0"&gt;5.4 lbs of computing power&lt;/a&gt;.  I'll bet I could even handle &lt;a href="http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/91274001/wo/Xa61UIqtdg9p3sEdFz91zhVf7el/4.?p=0"&gt;6.8 lbs&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-7805934082788737295?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/7805934082788737295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=7805934082788737295' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/7805934082788737295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/7805934082788737295'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2008/01/macworld-2008-what-am-i-buying.html' title='Macworld 2008 - What am I buying?'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-5732750775680787857</id><published>2007-05-25T08:01:00.000-07:00</published><updated>2007-05-25T08:56:16.310-07:00</updated><title type='text'>Flexlib updates, Bi-Di in Flash Player, and a Love-Fest</title><content type='html'>Long time, no post.  Really, I haven't had much to write about, since I've been knee-deep in some CSS, HTML, &amp; .Net work.  Finally, I'm getting to spend some time in Flex again, so I'll probably turn up the volume again, so to speak.&lt;br /&gt;&lt;br /&gt;I got some good news last night - my text highlighter component has been added to Flexlib!!  Here's the &lt;a href="http://code.google.com/p/flexlib/wiki/ComponentList"&gt;full component list&lt;/a&gt;, and here's a link to &lt;a href="http://flexlib.googlecode.com/svn/trunk/examples/Highlighter/Highlighter_Sample.swf"&gt;the example itself&lt;/a&gt;.  If you find any bugs, feel free to post them in the comments here.  No matter how many times something I create goes out into the world, it's still exciting.  Big thanks to &lt;a href="http://www.dougmccune.com/blog/"&gt;Doug&lt;/a&gt; and &lt;a href="http://www.darronschall.com/weblog/"&gt;Darron&lt;/a&gt; for making this happen!&lt;br /&gt;&lt;br /&gt;Then, when I came in to work this morning, I saw &lt;a href="http://weblogs.macromedia.com/emmy/archives/2007/05/tiny_clarificat.cfm"&gt;Emmy's post&lt;/a&gt; about bi-directional text support in Flash Player 10.  Awesome - sounds like they're planning to not only add bi-directional text support, but generally just beef up text in general.  This is great news.  Although it improved substantially in FP8, text handling is still not perfect.  Things like styling HTML text can still be a little dicey.  And I would love for things like my text highlighter component to be completely unnecessary!!  Maybe they could add in some highlight-and-find functionality in there.&lt;br /&gt;&lt;br /&gt;As a side note, I wonder how long they'll stick with numeric versioning for the Flash Player.  Most software doesn't make it much beyond 10 before a change in naming convention, like Photoshop CS3, etc.  I could imagine a Flash Player 11, but Flash Player 17?  13?  Maybe Adobe Acropollash?  Flappollobat?  Blinding Ray of Transcending Glory? (I think M$ considered that one, at least momentarily).  I personally would go with Flappollobat - it has a certain ring to it, don't you think?&lt;br /&gt;&lt;br /&gt;Finally, I sometimes use this blog as a place to vent my frustrations with poor customer service and other things gone awry in the Adobe world.  However, I feel that if you chose to voice your opinions in public, you should take care to present the totality of your views.  In other words, if you have a concern or complaint, voice it - but if you have positive things to say, say those too.  It occurs to me that I have let many of those positive things go unsaid, while I have given more energy to my irritations - this seems to me to be a special form of hypocrisy. &lt;br /&gt;&lt;br /&gt;That said, I have worked with CS3 and Flex Builder on the Mac for some time now, and I think they're amazing.  Very solid, very enabling technologies.  Flash Player 9 continues to astonish me from a performance perspective, and I can develop applications using Flex so quickly that I can spend more time on the design of them, and even have time to actually implement the "nice-to-have" features that normally get pushed off to version 2 of a project.  And I also happen to love the new icons.  Don't change them, please?  So elegant, so well thought out. &lt;br /&gt;&lt;br /&gt;It would be ridiculous for me to itemize everything I love about CS3 and Flex - it would be a long list, and probably take up most of my available blogging time.  So maybe the solution is to simply give less time to my gripes, and try to focus more on the mission of this blog, which is to publicize information useful to RIA developers.  Wish me luck. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-5732750775680787857?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/5732750775680787857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=5732750775680787857' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/5732750775680787857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/5732750775680787857'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2007/05/flexlib-updates-bi-di-in-flash-player.html' title='Flexlib updates, Bi-Di in Flash Player, and a Love-Fest'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-8576669254684098042</id><published>2007-03-09T19:38:00.000-08:00</published><updated>2007-03-09T19:45:50.042-08:00</updated><title type='text'>Happy Mac</title><content type='html'>I just completed a RAM upgrade in my Mac Mini, per the instructions at &lt;a href="http://www.methodshop.com/gadgets/tutorials/macmini-ram"&gt;http://www.methodshop.com/gadgets/tutorials/macmini-ram&lt;/a&gt; and am happily multi-tasking away... Listening to Frank Black &amp; the Catholics on iTunes, blogging in Camino, NeoOffice and Flash both open in the background.  Life is good with 2GB. &lt;br /&gt;&lt;br /&gt;It took about 45 minutes to install at a careful pace, saved me over $150... and I didn't even scratch my case.  Whoops... Here comes the new Pete Yorn... Gotta go rock out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-8576669254684098042?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/8576669254684098042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=8576669254684098042' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/8576669254684098042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/8576669254684098042'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2007/03/happy-mac.html' title='Happy Mac'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-1488071265475058424</id><published>2007-02-13T12:05:00.000-08:00</published><updated>2007-02-13T09:50:13.474-08:00</updated><title type='text'>Adobe: Bad Customer Service</title><content type='html'>I just held for 2 hours with Adobe tech support to get an unlock code for CS2 upgrade.  (For background, that's what you need to do to validate an upgrade installation that won't recognize the original media you're upgrading from.)  I was incorrectly transferred at least twice, waiting for 20-30 minutes at each transfer.  When I finally got the unlock code, it didn't work and there wasn't a thing that they could do about it.  When I offered that I was using Windows Vista (they never asked) customer service literally said "Ah-HAH! That must be the problem", blamed the whole thing on Vista compatibility, and helpfully suggested that I wait for CS3 or roll back to Windows XP.&lt;br /&gt;&lt;br /&gt;I asked to be transferred to a supervisor, who told me that Microsoft wouldn't give Adobe the necessary components to test their software until just recently.  I explained that I have personally tested software on the beta versions of Vista for two years, and that the final bits have been available for months.&lt;br /&gt;&lt;br /&gt;What was worse than waiting for two hours or listening to made-up excuses is just that no remedy, not even a symbolic gesture, was ever offered.  I suggested that it would be helpful if Adobe could contact me when an update is released, rather than expecting me to visit the website every day.  She said "That's not possible, we have a lot of customers."  Not possible?  Hardly.  Not practical?  Maybe.  Not willing?  Bingo.&lt;br /&gt;&lt;br /&gt;The thing that makes this all even crazier is that I was able to install CS1 without issue, and upgrade on top of that (on *gasp* Vista!) - solving my own problem.  It's a shame that the people who I talked to today lacked the imagination (or, seemingly, the energy) to suggest it.&lt;br /&gt;&lt;br /&gt;There are a couple of takeaways from all this that I intend to relay to my customer service people:&lt;br /&gt;&lt;br /&gt;1) Don't make your customers wait interminably.&lt;br /&gt;2) If your customer paid you and can't use your software, "tough noogies" doesn't cut it.&lt;br /&gt;3) If you can't answer your customer's question, have someone get back to them who can answer it.&lt;br /&gt;4) Throw me a frickin' bone, here.  If there is no solution to be had, give the customer something - anything - to show that they're not just another $1000 to you.  Maybe a reduced-price upgrade when it finally does arrive, maybe just a follow-up email to say "sorry we couldn't help you".&lt;br /&gt;5) Don't try to throw something technical-sounding at your customer in the hopes that they won't understand it and just go away.&lt;br /&gt;&lt;br /&gt;I know what it's like to not have an answer for someone who deserves one.  I understand that everybody has a somewhat different capacity for problem-solving.  I understand that customer service people are usually the people in an organization who are the least empowered to offer resolution.  But PLEASE give the impression that you're trying.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-1488071265475058424?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/1488071265475058424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=1488071265475058424' title='37 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/1488071265475058424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/1488071265475058424'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2007/02/adobe-bad-customer-service.html' title='Adobe: Bad Customer Service'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>37</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-6610921414219856666</id><published>2007-02-13T09:25:00.000-08:00</published><updated>2007-02-07T22:20:37.365-08:00</updated><title type='text'>I'm a Mac... and HEY!!! LOOK AT ME!!!</title><content type='html'>I just got a new Vista box at work and I'm getting it all set up, trying to get used to the new locations of everything.  My particular pain point is that the VPN client my company uses hasn't yet been updated for Vista.  But I digress...&lt;br /&gt;&lt;br /&gt;The thing I really want to talk about is just how much bling they added with Aero.  It's like they had a big meeting and someone said "Look, we all know that people love Macs because they're purty.  We have to make Windows cool-looking too.  How can we do that?"  "I know!!" someone else pipes up.  "We can make the windows semi-transparent!!"  "Yeah, that'd be awesome!" says someone else.  "We should also put some gleam on them, like a glassy reflection."   "And dropshadows!!", chimes in another.  "Yaaay!! Isn't designing things fun??  No longer will Windows be known as 'the ugly OS'."&lt;br /&gt;&lt;br /&gt;Seriously, Vista is way over the top in terms of aesthetics.  Pick two of the added design touches and it would have been enough.  But dropshadows, transparency, glows, white strokes, bevels, reflections and blur all at once?  That's called "trying too hard".&lt;br /&gt;&lt;br /&gt;I don't consider myself a fan-boy, but I couldn't help but to be inspired to propose a new Mac vs PC commercial.&lt;br /&gt;&lt;br /&gt;Mac:  Hello, I'm a Mac.&lt;br /&gt;PC: Wassup dawg, I'm a PC.  (he's wearing MC Hammer pants)&lt;br /&gt;Mac:  Hey, PC, nice pants.  What's that around your neck, a huge analog clock?&lt;br /&gt;PC: Yeah, isn't it cool?  They gave me a bunch of new fashion accessories this time.  Yup... I finally got my wardrobe up to date.&lt;br /&gt;Mac: Umm.. Yeah.  Isn't that thing a little slow?&lt;br /&gt;&lt;br /&gt;With apologies to my boss, who came up with the Flava Flav clock gag.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-6610921414219856666?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/6610921414219856666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=6610921414219856666' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/6610921414219856666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/6610921414219856666'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2007/02/im-mac-and-hey-look-at-me.html' title='I&apos;m a Mac... and HEY!!! LOOK AT ME!!!'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-3488223825331333358</id><published>2007-02-05T07:25:00.000-08:00</published><updated>2007-02-05T07:51:40.492-08:00</updated><title type='text'>WPF/E = JavaScript + Windows Media Player?</title><content type='html'>So, I just checked out the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=8B6B1524-ECD9-4FF2-BB0F-D9156F570C5B&amp;displaylang=en"&gt;Microsoft Community Technology preview of Windows Presentation Framework Everywhere&lt;/a&gt;, the supposed "Flash Killer".  After seeing this, I'm under the impression that WPF/E and the Flash Player are not really in the same conceptual sphere.&lt;br /&gt;&lt;br /&gt;WPF/E seems to boil down to some JavaScript libraries and Windows Media Player (and maybe a little SVG) so far.  It's unclear to me how much of the animation is controlled by JavaScript and how much is handled by the WPF/E ActiveX control: some of the examples have more animation-oriented JavaScript than others.  All of the interactivity appears to be handled by JavaScript.  In the network-aware examples, there is an Ajax library that looks to be responsible for communication.&lt;br /&gt;&lt;br /&gt;So, in concept, WPF/E seems to leverage existing web technologies and tries to handle their varying implementations.  Flash Player, on the other hand, provides its own implementation for those technologies.&lt;br /&gt;&lt;br /&gt;I have a lot of questions about how WPF/E works.  Does it leave the JavaScript interpretation up to the browser, or have they implemented another JS interpreter in the ActiveX control?  Does WPF/E handle image display, or is that left to the browser as well? Basically, all of my questions boil down to this: is WPF/E merely coordinate the various technologies it uses, or does it actually provide its own implementations of those technologies? &lt;br /&gt;&lt;br /&gt;If WPF/E is just coordinating a variety of implementations, it will always be limited by the browser, and Flash will always be a jump ahead.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-3488223825331333358?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/3488223825331333358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=3488223825331333358' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/3488223825331333358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/3488223825331333358'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2007/02/wpfe-javascript-windows-media-player.html' title='WPF/E = JavaScript + Windows Media Player?'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-3515891934958900050</id><published>2007-01-31T12:05:00.000-08:00</published><updated>2007-01-31T12:45:46.462-08:00</updated><title type='text'>Flex Data Model Architecture</title><content type='html'>So, I'm chin-deep in Joe Berkovitz's &lt;a href="http://www.adobe.com/devnet/flex/articles/blueprint.html"&gt;Architectural Blueprint for Flex Applications&lt;/a&gt;... That is to say, this is about the 5th time I've read it. I think it's a great article, as architectural blueprints go... It really helps to make the abstract principles of MVCS more concrete for me.&lt;br /&gt;&lt;br /&gt;I think I'm a little slow on the uptake when it comes to architecture. Old habits die hard, and years of working on small, underfunded projects have molded my thought patterns accordingly - I always seek the most direct approach that works. Even though this is not my first exposure to MVCS by a long shot, I still find myself getting a bit lost in the translation between the idea of MVCS and the details of how you implement it in a real world project.&lt;br /&gt;&lt;br /&gt;The code examples that are shown in Joe's article are only moderately helpful to me - it wasn't until I opened the source code itself and could see the import statements that some of it became clear.&lt;br /&gt;&lt;br /&gt;For example, the Model portion of the app. After reading the article several times (and also referencing Aral Balkan's article "&lt;a href="http://www.adobe.com/devnet/flex/quickstart/defining_data_models/"&gt;Defining Data Models&lt;/a&gt;"), I was still unsure of the appropriate place to instantiate the model classes, and I also thought that there should be a single Model class that encapsulated the other model classes. I was visualizing the model as a single respository for all the data needed by the application, which would have bindable properties (sort of like a model defined by mxml Model tags). After reviewing the source code, I see that the model is really implemented as a set of Value objects that are instantiated in both the Controller and the Services, and are passed around the application.&lt;br /&gt;&lt;br /&gt;I'm not used to thinking in this way. When someone says "this architecture is made up of 4 parts" I am thinking of 4 discreet parts. When someone refers to "the Model" I naively think "there's a single model object somewhere". So I'm trying to adjust my brain to the concept of a nebulous model that consists of several Value Objects being tossed around the app.&lt;br /&gt;&lt;br /&gt;But I'm also (maybe naively) wondering if it wouldn't be better to have a single Model that encapsulates all the data. That would have a couple main benefits, in my estimation:&lt;br /&gt;&lt;br /&gt;1) It would be easier to serialize the model and save it in a local shared object for later restoration (the purpose of the model is to handle state, correct?)&lt;br /&gt;2) It would be easier to store revisions of the model for undo/redo purposes&lt;br /&gt;3) It would be easier for the view to bind to it&lt;br /&gt;&lt;br /&gt;This is what the mx:Model tag has going for it, but the problem there is you can't have strongly typed data.&lt;br /&gt;&lt;br /&gt;I'm pretty sure there are architectures that work this way - it sounds kind of like what Aral describes in the "Using Class-Based Models" section of &lt;a href="http://www.adobe.com/devnet/flex/quickstart/defining_data_models/"&gt;his article&lt;/a&gt;.  But maybe I'm reading Joe Berkovitz's code wrong... Pretty sure I'm missing quite a lot here - hopefully I haven't said anything that is obscenely stupid.&lt;br /&gt;&lt;br /&gt;Hopefully some of my readers can help me fill in the blanks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-3515891934958900050?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/3515891934958900050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=3515891934958900050' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/3515891934958900050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/3515891934958900050'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2007/01/flex-data-model-architecture.html' title='Flex Data Model Architecture'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-2323553610837415360</id><published>2007-01-22T07:47:00.000-08:00</published><updated>2007-01-22T08:16:08.629-08:00</updated><title type='text'>Update - Flex Text Highlighter Class</title><content type='html'>Last night I updated my demo of tl.text.Highlighter, my TextField highlighting class for Flex.  You point it at a TextField object, and then use one of its methods to highlight the word or words of your choosing.  &lt;a href="http://labs.tom-lee.com/Flex/HighlighterDemo/HighlighterDemo.html"&gt;Here's the demo&lt;/a&gt; (right-click it to view source).&lt;br /&gt;&lt;br /&gt;In this revision, I added some performance optimizations to reduce the number of calls to TextField.getCharBoundaries, which it turns out was the most expensive call I was making.  In the last version, I highlighted each character individually, regardless of whether it was part of a word or not, because it was easier to handle word wrapping that way.  This meant making a separate call to TextField.getCharBoundaries for each letter in a word.  The performance was pretty good, but could get a little slow when highlighting a whole paragraph.  Now, I make two calls per word: one for the first character, and one for the last character and combine them into a single Rectangle object that spans the whole word (a la &lt;a href="http://www.bit-101.com/blog/?p=852"&gt;Keith Peters&lt;/a&gt;).  It's a bit trickier to manage when words or phrases wrap into multiple lines, but I was able to write some logic to handle those scenarios.  &lt;br /&gt;&lt;br /&gt;Anyway, this results in much better performance when highlighting many sequential characters in a TextField.  To pull this off, I created a StringBoundaries class which returns an array of Rectangles that define the boundaries of the character range.  The array has a length of 1 if the character range fits on one line.&lt;br /&gt;&lt;br /&gt;Also, I moved the search logic into a separate class called Finder, where it will be easier to work with.  I intend to add some features such as Match Whole Words Only and Case Sensitive/Insensitive options.&lt;br /&gt;&lt;br /&gt;Keep those suggestions coming!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-2323553610837415360?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/2323553610837415360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=2323553610837415360' title='46 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/2323553610837415360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/2323553610837415360'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2007/01/update-flex-text-highlighter-class.html' title='Update - Flex Text Highlighter Class'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>46</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-43883329784837429</id><published>2007-01-19T12:36:00.000-08:00</published><updated>2007-01-20T19:46:57.739-08:00</updated><title type='text'>A TextField Highlighter Class for Flex</title><content type='html'>One of the features I've always felt was missing from Flash TextFields is the ability to highlight a range of characters with a color.  What I did in the past was highlight words by changing their color, which is not nearly as satisifying.   So, I was really happy to learn that TextFields in Flash 9 have a new method, getCharBoundaries, which returns the bounding rectangle of the specified character.  With this method, we can create a rectangle of color to place behind the TextField, highlighting the specified character or characters.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.bit-101.com/blog/?p=852"&gt;Keith Peters&lt;/a&gt; of BIT-101 and &lt;a href="http://www.betaruce.com/blog/?p=118"&gt;Betaruce&lt;/a&gt; both have released demos of this exact functionality.  However, their demos lack support for word wrapping, or resizing and scrolling of the TextField.  Since text highlighting is on the wishlist for an app I'm developing, I figured I'd Flex it up a bit.&lt;br /&gt;&lt;br /&gt;My Highlighter class supports word wrapping, resizing, scrolling, and more.  You can highlight all instances of a string, or highlight the next and previous instances of the string.  You can also use multiple Highlighters on the same TextField for combinations of colors and functionality.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://labs.tom-lee.com/Flex/HighlighterDemo/HighlighterDemo.html"&gt;Try out the demo.&lt;/a&gt;  You may have to wait a few seconds for the sample text and fonts to load.  I'm using embedded fonts and a StyleSheet here just to test that it will handle them, but TextFields in general seem to perform better without them.  Oh, and you can right-click and view source too (love that about Flex!).&lt;br /&gt;&lt;br /&gt;Here's how it works:  when you pass the Highlighter a string to highlight, it finds the instances of that string in the TextField and stores the indexes of each character separately in an array.  When the TextField is scrolled or resized, the Highlighter determines which of those characters are visible on the screen and draws a Bitmap rectangle behind them.  On every SCROLL or RESIZE event, the Bitmap is cleared and highlights are calculated and redrawn.&lt;br /&gt;&lt;br /&gt;This could get to be a pretty processor-intensive system, especially when you have a lot of characters being highlighted.  This is where I was really pleasantly surprised by Flash Player 9.  When I first started the project, I thought "this will never work - it'll be too slow".  But Player 9 handles it like a champ.  Unbelievably fast.&lt;br /&gt;&lt;br /&gt;There are some things that can screw up TextField.getCharBoundaries, such as newline, carriage return, and other whitespace characters (&lt;a href="http://tom-lee.blogspot.com/2007/01/flashflex-textfield-bug-dancing.html"&gt;see my last post&lt;/a&gt;).  Using condenseWhite on your TextField will take care of that.  In my case, I have to preserve whitespace, so some pre-processing of the text is necessary to strip out the offending characters.&lt;br /&gt;&lt;br /&gt;Also, in my demo I have padding on my TextArea.  This throws off getCharBoundaries, and I compensate by passing an xOffset and yOffset value into the Highlighter class.&lt;br /&gt;&lt;br /&gt;Speaking of TextAreas... In the Flex components that use a TextField, there is a property called textField, which would be ideal for my Highlighter class to make use of.  But, no.  It is protected.  Am I really going to extend every component in the Flex framework that I want to use my Highlighter class with?  Please.  For now, I iterate through the children of the TextArea until I find a TextField.  It seems to work fine, but I'd prefer to not resort to such hackery.  Anyone else got an alternative?&lt;br /&gt;&lt;br /&gt;I'm really happy with the Highlighter class so far, but I'm no architect.  I could really use some feedback on what should be public, private, protected, etc... and just architectural advice in general, I guess.  How can I make this thing fit in better with the Flex framework?  Are there changes I could make that would simplify things, or improve performance?  Looking forward to your comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-43883329784837429?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/43883329784837429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=43883329784837429' title='39 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/43883329784837429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/43883329784837429'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2007/01/textfield-highlighter-class-for-flex.html' title='A TextField Highlighter Class for Flex'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>39</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-5798976999232204050</id><published>2007-01-16T19:51:00.000-08:00</published><updated>2007-01-16T20:17:26.101-08:00</updated><title type='text'>Flash/Flex TextField Bug - Dancing FlashType Characters</title><content type='html'>I just discovered this TextField bug today and wanted to get a demo of it out there.  Basically, there are certain whitespace characters which are not properly handled by Flash TextFields.  If you're not aware of them, they can really leave you scratching your head.  One thing they can do is throw off the text metrics returned by methods such as getCharBoundaries, making them wildly unpredictable.  A more visible symptom of these characters is text that expands, wiggles and reflows every time you make a selection or click within the TextField.&lt;br /&gt;&lt;br /&gt;Check out the &lt;a href="http://labs.tom-lee.com/Flex/TextFieldBugs.html"&gt;demo&lt;/a&gt;, and the &lt;a href="http://labs.tom-lee.com/Flex/TextFieldBugs.mxml"&gt;mxml&lt;/a&gt; used to make it.  To replicate the issue in the top TextArea, click in the white space to the left of a line of text, and then drag right to select.  You should see the text wriggle and jump around like me after a six pack.  Notice the bottom TextArea doesn't have the problem, because it doesn't use FlashType.&lt;br /&gt;&lt;br /&gt;The character codes that can cause the anomolous behavior are:&lt;br /&gt;11,12,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30,31, &amp; 160.&lt;br /&gt;&lt;br /&gt;Most of these characters will never be a problem, because they're seldom encountered in the wild.  However, 160 is frequently seen in its other form:   - the non-breaking space.&lt;br /&gt;&lt;br /&gt;To work around this issue, I'll be pre-processing all HTML that comes into Flash by stripping out all those characters and replacing them with regular old spaces, which don't have the problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-5798976999232204050?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/5798976999232204050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=5798976999232204050' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/5798976999232204050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/5798976999232204050'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2007/01/flashflex-textfield-bug-dancing.html' title='Flash/Flex TextField Bug - Dancing FlashType Characters'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-116794419075565485</id><published>2007-01-04T12:01:00.000-08:00</published><updated>2007-01-04T13:05:45.910-08:00</updated><title type='text'>SIFR 3 Beta Announced - Should I Finish Mine?</title><content type='html'>Mark Wubben of novemberborn.net has recently &lt;a href="http://novemberborn.net/sifr3/beta1"&gt;announced&lt;/a&gt; SIFR 3 Beta 1, which he has been diligently working on for quite some time. It's looking very good, and I'm really glad to see that he is still on the case - it's a pretty complicated task, especially for one guy, and if anyone's up to the challenge, he is.&lt;br /&gt;&lt;br /&gt;I &lt;a href="http://tom-lee.blogspot.com/2006/06/sifr-alternative-update_05.html"&gt;attempted my own Flash heading replacement solution&lt;/a&gt; (TL.FlashHeaders) some months ago, and ran out of steam at the alpha stage when I suddenly got really busy with other work. Now, I'm slowly beginning to get some more free time, but since SIFR 3 is so close to being done, I'm debating whether it's worth finishing TL.FlashHeaders.&lt;br /&gt;&lt;br /&gt;There are a couple of areas where TL.FlashHeaders differs from SIFR in concept. For one, TL.FlashHeaders requires almost no JavaScript configuration. Fonts are specified in CSS, rather than in JavaScript. I really wanted deployment to be as easy including the JS library in the head of your document, and specifying the fonts in CSS as you normally would. There are no special style sheets to include. Everything should just take care of itself.&lt;br /&gt;&lt;br /&gt;The second main difference is in the way that TL.FlashHeaders handles fonts. It uses a standard Flash shared font library, so it can be reused in other Flash applications. This approach allows support for multiple fonts within the same heading.&lt;br /&gt;&lt;br /&gt;Third, I wanted to provide support for inline headings. This may be the most problematic feature to implement cross-platform, due to box model differences, and may be the least useful.&lt;br /&gt;&lt;br /&gt;One of the compromises I had to make in order to achieve those goals was dropping support for Opera. I did, however, keep support for IE 5.x and Netscape 7.2.&lt;br /&gt;&lt;br /&gt;Here's the current &lt;a href="http://labs.tom-lee.com/HeadingReplacement/Alpha/"&gt;test page&lt;/a&gt;. I haven't touched the code in months, and I know it's got some issues at the moment. Try resizing the page to see how things scale. Even the floats at the top of the page should scale as they normally would. To compare, &lt;a href="http://labs.tom-lee.com/HeadingReplacement/Alpha/hr-off.html"&gt;here's the same page without TL.FlashHeaders&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Even if I don't finish it, it was totally worth starting. One thing that was really awesome about developing my own solution in parallel to SIFR 3 was that I was able to contribute to Mark's efforts a little bit, and it always feels good when someone else finds your work helpful. Also, I learned a ton of stuff that has already been useful in other projects.&lt;br /&gt;&lt;br /&gt;Early on, there were a few people who expressed interest in the project.  So, what do you think? Should I finish what I started, or move on to other things?  It's sooo close....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-116794419075565485?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/116794419075565485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=116794419075565485' title='35 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/116794419075565485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/116794419075565485'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2007/01/sifr-3-beta-announced-should-i-finish.html' title='SIFR 3 Beta Announced - Should I Finish Mine?'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>35</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-116620614287777052</id><published>2006-12-15T09:58:00.000-08:00</published><updated>2006-12-15T10:09:02.893-08:00</updated><title type='text'>Photoshop CS3 Beta - First impressions</title><content type='html'>Got my hands on the Photoshop CS3 beta, and I gotta say I'm impressed.  Smart Filters are going to revolutionize the way I work in Photoshop.  Non-destructive editing has been a long time coming in Photoshop (it's been the standard paradigm for ages in some less-popular apps), but I'm happy to see that we're getting there by stages.  This brings us one step closer to the day that "Undo" is just an unnecessary extra.  But even without the new features, I'd still love it for the native MacTel support!&lt;br /&gt;&lt;br /&gt;Rather than do a full writeup, I'll simply point you to &lt;a href="http://www.photoshopuser.com/cs3/sk_features.html"&gt;somebody else that has already done a pretty good job&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Also, the beta doesn't seem to be posted on Adobe Labs yet, so if you wanna get the bits yourself, just poke around on &lt;a href="http://www.digg.com"&gt;Digg&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-116620614287777052?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/116620614287777052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=116620614287777052' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/116620614287777052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/116620614287777052'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/12/photoshop-cs3-beta-first-impressions.html' title='Photoshop CS3 Beta - First impressions'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115809872439604548</id><published>2006-09-12T14:25:00.000-07:00</published><updated>2006-09-12T15:07:07.646-07:00</updated><title type='text'>IE CSS Rollovers - Revisited</title><content type='html'>Haven't had much to say lately, as I have been busy trying to wrap a project. However, I felt like this was worth taking some time to share it.&lt;br /&gt;&lt;br /&gt;Basically, the &lt;a href="http://tom-lee.blogspot.com/2006/07/ie-css-rollover-cache-bug.html"&gt;IE Rollover Cache Bug&lt;/a&gt; came back to bite me today. Now, there are many documented solutions to avoiding that annoying flicker in IE when you change the background image of a hyperlink. My personal favorite is &lt;a href="http://wellstyled.com/css-nopreload-rollovers.html"&gt;this one&lt;/a&gt;. But what about the browser activity indicators that are stopped and reset when you mouse out of the button? I see far less discussion of that issue, and know of no solution expect for the one I'm about to document.&lt;br /&gt;&lt;br /&gt;Let me describe this in a little more detail. If you click a hyperlink that has a background image, all of Internet Explorer's browser activity indicators will be stopped and reset when you move your mouse off of that hyperlink. By 'browser activity indicators' I mean the 'spinner' (wavy window animation) in the upper right corner of the browser, as well as the status bar at the bottom of the browser (in WinXP, this is green &amp; segmented). This gives the impression that the page load is complete when in fact it is not - the requested page will be displayed eventually. This happens regardless of whether you are changing the background-image property. If you change ANYTHING about that hyperlink (border-colors, sizes, text-decoration) the activity indicators will be interrupted. I can readily confirm this on IE 6, and I'm pretty sure it happens in IE 5.5. IE 5 seems to be immune. I hope to god it's fixed in IE 7.&lt;br /&gt;&lt;br /&gt;Typically, this is not a problem because page loads happen pretty quickly these days. But if your link is submitting a form and the server takes some time responding, this can get to be quite a problem. Thinking the form submission has quietly failed, the user will click the button repeatedly, badgering your server with extra requests. Bad for the user, bad for you.&lt;br /&gt;&lt;br /&gt;Onward to the solution. I was almost ready to give up and ban image rollovers entirely, when it occured to me that there was one last trick I hadn't tried yet. All you have to do is display the image using Microsoft's proprietary DirectX filters instead of the normal browser pipeline. Here's what you do:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;p&gt;/* Set up your rollover as normal */&lt;br /&gt;a.MyButton{&lt;br /&gt;&lt;br /&gt;background:url('Images/MyButton.gif');&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;a.MyButton:hover{&lt;br /&gt;background:url('Images/MyButtonOver.gif');&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* Now hack for IE (using star hack for brevity here)*/&lt;br /&gt;&lt;br /&gt;* html a.MyButton{&lt;br /&gt;background:none;&lt;br /&gt;&lt;br /&gt;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='Images/MyButton.gif',&lt;br /&gt;sizingMethod='image');&lt;br /&gt;position:relative;&lt;br /&gt;cursor:hand;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;* html a.MyButton:hover{&lt;br /&gt;background:none;&lt;br /&gt;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='Images/MyButtonOver.gif', sizingMethod='image');&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;That's basically it. Since the problem only occurs in IE, I'm fine with using a Microsoft proprietary solution. Now, AlphaImageLoader comes with its own set of caveats and gotchas, not the least of which is that you can't position the image at all. Sometimes I need to. As a workaround for that, I put an empty div in my hyperlink to which I apply the image instead, and then position the div with absolute positioning. Another point to be aware of is that &lt;a href="http://www.daltonlp.com/daltonlp.cgi?item_type=1&amp;amp;item_id=217"&gt;sometimes hyperlinks will not function&lt;/a&gt; if they have an image applied in this way. However, position:relative should cure that.&lt;br /&gt;&lt;br /&gt;I hope this helps some poor frustrated soul. As always, please post any questions or comments, and I'll do my best to find the answers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115809872439604548?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115809872439604548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115809872439604548' title='38 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115809872439604548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115809872439604548'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/09/ie-css-rollovers-revisited.html' title='IE CSS Rollovers - Revisited'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>38</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115472507707542122</id><published>2006-08-04T13:05:00.000-07:00</published><updated>2006-08-04T13:57:57.166-07:00</updated><title type='text'>Could AJAX Security Vulnerabilities Mean Good News for Flex?</title><content type='html'>Recent news coming out of the Black Hat conference has it that security specialists SPI Dynamics and WhiteHat have found a way to profile networks from behind the firewall using client-side JavaScript.  Additionally, RSS and Atom feeds can be used as the delivery mechanism, which opens up myriad possibilities for cross-site exploits.  In many cases, JavaScript delivered through an RSS or Atom feed will execute on the client-side.  You can get more detailed information on the vulnerabilities here:&lt;br /&gt;&lt;a href="http://news.com.com/JavaScript+opens+doors+to+browser-based+attacks/2100-7349_3-6099891.html?tag=nl"&gt;http://news.com.com/JavaScript+opens+doors+to+browser-based+attacks/2100-7349_3-6099891.html?tag=nl&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://news.com.com/Blog+feeds+may+carry+security+risk/2100-1002_3-6102171.html?tag=nl"&gt;http://news.com.com/Blog+feeds+may+carry+security+risk/2100-1002_3-6102171.html?tag=nl&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What interests me the most about these newly exposed vulnerabilities is the potential Flex has to step in as a safer alternative.  Although Adobe has thus far been reluctant to market Flex against AJAX (instead, promoting a somewhat Frankensteinian &lt;a href="http://labs.adobe.com/wiki/index.php/Flex_Framework:FABridge"&gt;blend of the two&lt;/a&gt;), one could imagine that vulnerabilities in AJAX could yield increased market share for Flex apps. &lt;br /&gt;&lt;br /&gt;One criticism of the Flash Platform I have heard is that it's considered unsafe by many firewall administrators.  The conventional wisdom among security professionals can sometimes be skewed by not understanding the format.  Who would take the time to configure the Flash Player security settings across all machines on their network when they can simply block SWF at the firewall level?  If they understood that the Flash Platform is safer than another technology they already commonly allow across the firewall, the decision would be made in a different context.&lt;br /&gt;&lt;br /&gt;Unfortunately, even if Adobe did wish to make the case that Flex is safer than AJAX, they couldn't (or they would be foolish to try).  Because the Flash Player has an ExternalInterface API (which uses JavaScript for serialization/deserialization), it could be used as a delivery mechanism (possibly even a more effective one than RSS) for the very exploits that are being exposed in AJAX.&lt;br /&gt;&lt;br /&gt;I don't know if there's an answer for this.  I wouldn't want to part with ExternalInterface, despite its problems.  My gut feel is that the AJAX vulnerabilities will amount to no big deal.  After all, the same principles apply to these 'new' issues as apply to others: don't go poking about the shady back alleys of the web, scrub all data that comes into your system, etc.  But I'm interested to see how all this will play out, and I'm interested to hear other people's thoughts on the subject.  So, please comment!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115472507707542122?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115472507707542122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115472507707542122' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115472507707542122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115472507707542122'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/08/could-ajax-security-vulnerabilities.html' title='Could AJAX Security Vulnerabilities Mean Good News for Flex?'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115444398666137687</id><published>2006-08-01T07:43:00.000-07:00</published><updated>2006-08-01T07:53:06.663-07:00</updated><title type='text'>Mac FlexWeaver: Building Flex in Dreamweaver</title><content type='html'>Late last night, I posted my Mac method for editing and compiling Flex apps from Dreamweaver. Reading over the post this morning, I realized afresh how blogging late at night can be a bad idea. So, I've made a few minor changes to the &lt;a href="http://tom-lee.blogspot.com/2006/07/mac-flexweaver-edit-compile-flex-apps.html"&gt;original post&lt;/a&gt; for clarity's sake.  Hope it helps, and if you have any ideas for streamlining the workflow, let me know!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115444398666137687?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115444398666137687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115444398666137687' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115444398666137687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115444398666137687'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/08/mac-flexweaver-building-flex-in.html' title='Mac FlexWeaver: Building Flex in Dreamweaver'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115439988444399037</id><published>2006-07-31T18:39:00.000-07:00</published><updated>2006-08-01T07:43:08.650-07:00</updated><title type='text'>Mac FlexWeaver: Edit &amp; Compile Flex Apps in Dreamweaver</title><content type='html'>Last Monday, I &lt;a href="http://tom-lee.blogspot.com/2006/07/edit-and-compile-flex-apps-in.html"&gt;wrote&lt;/a&gt; about how you can configure Dreamweaver to edit and compile MXML. However, that method only works in Windows, since it uses some Windows-only (and undocumented) methods of the Dreamweaver Extensibility API.&lt;br /&gt;&lt;br /&gt;It is a week later, and I have been busy brewing up a solution for us Mac users. One caveat at the outset: I'm on an Intel-based Mac, and so I haven't tested any of this on the Power PC architecture. This procedure requires Dreamweaver 8, and assumes that you have installed the Flex 2 SDK.&lt;br /&gt;&lt;br /&gt;For your convenience, I have packaged the necessary files into a handy zip archive. You can download them here: &lt;a href="http://labs.tom-lee.com/FlexWeaver/FlexWeaver.zip"&gt;http://labs.tom-lee.com/FlexWeaver/FlexWeaver.zip&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Installation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Opening the package, you'll see several folders. This section will tell you what they are, and where to put them.&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Commands - Contains the necessary files for two new Dreamweaver command extensions. Place the contents of this folder in Dreamweaver's "Commands" directory. (Dreamweaver 8:Configuration:Commands)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;DocumentTypes - This contains a copy of the file MMDocumentTypes.xml, which has been modified to allow Dreamweaver to treat MXML files like XML files instead of plain text. Place this in Dreamweaver 8:Configuration:DocumentTypes. &lt;span style="FONT-STYLE: italic"&gt;Note: if you have already modified your MMDocumentTypes file for another purpose, don't overwrite it - instead, manually edit line 150 like so:&lt;/span&gt; &lt;span style="font-size:85%;"&gt;&amp;lt;documenttype id="XML" writebyteordermark="false" file="Default.xml" macfileextension="xml,xsd,rss,rdf,dtd,vtm,vtml,csn,config,mxi,mxml" winfileextension="xml,xsd,rss,rdf,dtd,vtm,vtml,csn,config,mxi,mxml" internaltype="XML"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Helper - Contains an AppleScript application called FlexCompileHelper.app. This bridges the gap between Dreamweaver and the Flex compiler, as I'll explain later. You can put this file anywhere you like.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;mxmlc - Contains a copy of the mxmlc shell script from the Flex 2 SDK which has been modified to allow support for spaces in filenames. Place this in flex_sdk_2:bin. Feel free to name this file something else if you don't wish to overwrite the one in the SDK.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Configuration&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After you have copied the files to their proper locations, launch Dreamweaver. In the "Commands" menu, you should now see two new commands: &lt;span style="FONT-WEIGHT: bold"&gt;Flex Compile&lt;/span&gt;, and &lt;span style="FONT-WEIGHT: bold"&gt;Flex Preferences&lt;/span&gt;. Flex Preferences allows you to specify the location of the Flex compiler, the FlexCompileHelper app, and the output path for your SWF file, as well as any command line options you wish to use.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/7674/2507/1600/preferences.0.png"&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/7674/2507/400/preferences.0.png" border="0" /&gt;&lt;/a&gt;As you can (hopefully) see from the screen-shot, I have left the SWF Output Directory field blank. Since it is blank, SWFs will be placed in the same directory as their corresponding MXML files. Also, I have typed "-incremental=true" in the Additional Compiler Options field, to enable incremental compiling. When you click the "Save" button, a file called "FlexCompilerPreferences.txt" is created in your Dreamweaver configuration folder. This file merely stores all the values you enter into the Flex Compiler Preferences dialog.&lt;br /&gt;&lt;br /&gt;Before we continue on, it would be a good idea to set MXML files to open in Dreamweaver. To do so, select an mxml file (you can find one in flex_sdk_2:samples) and go to File &gt; Get Info in the Finder. Find where it says "Open With", select "Other" from the drop-down menu, and then browse to your Dreamweaver installation. Once you have Dreamweaver selected, you can click the "Change All" button to make all MXML files open in Dreamweaver.&lt;br /&gt;&lt;br /&gt;Now it's time to compile something. Just open an MXML file in Dreamweaver, and select Commands &gt; Flex Compile. This does a number of things:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;The Flex Compile command reads the Flex Compiler Preferences and creates a file on your hard drive called "FlexCompileJob.txt" in the same directory as the Flex Compile Helper application. This file contains 4 items: the path to the mxmlc shell script in the Flex 2 SDK, the path to the MXML file being compiled, the output path for the SWF, and any additional command-line options. Then, it launches the Flex Compile Helper application.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The Flex Compile Helper application reads FlexCompileJob.txt, creates a command-line for the job, and passes it to the mxmlc shell script.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;When the mxmlc script returns its output, the Flex Compile Helper writes that output to a text file (FlexCompileOutput.txt) and instructs Dreamweaver to open that file.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Flex Compile Helper instructs the Standalone Flash Player (located in the Flex 2 SDK) to open the SWF, and makes that window topmost.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;This gives us the basic functionality to edit and preview a Flex 2 application from within Dreamweaver.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Error Checking&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If the Flex Compile Preferences have not been set correctly, or an MXML file is not the active file in Dreamweaver, the Flex Compile command will not be available. Here is a list of the conditions under which Flex Compile will be grayed out:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;FlexCompilerPreferences.txt does not exist or is empty&lt;/li&gt;&lt;br /&gt;&lt;li&gt;No compiler is specified, or the specified compiler does not exist&lt;/li&gt;&lt;br /&gt;&lt;li&gt;No Flex Compile Helper app is specified, or the specified one does not exist&lt;/li&gt;&lt;br /&gt;&lt;li&gt;No document is open&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The active document is not an MXML document&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Further Explanation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This may seem like a lot of moving parts to achieve what should be a simple task. It was easier on Windows, thanks to the MM.createProcess command, which allowed me to call mxmlc directly from Dreamweaver and also catch its output. Unfortunately, this command does not work on the Mac. So, I had to create the AppleScript application which I could call with the more standard dreamweaver.openWithApp command. Since that command does not facilitate passing data to the application it's launching, I had to first write the necessary parameters into a text file which the application could then read.&lt;br /&gt;&lt;br /&gt;I also spent a fair amount of time fighting with the mxmlc shell script, which choked on spaces in filenames. By default, it treats a space as an argument separator. If you open mxmlc in a text editor, and look at the last line, you will see this:&lt;br /&gt;&lt;blockquote&gt;java $VMARGS -jar $FLEX_HOME/lib/mxmlc.jar $*&lt;/blockquote&gt;To fix it, I changed it to this:&lt;br /&gt;&lt;blockquote&gt;java $VMARGS -jar $FLEX_HOME/lib/mxmlc.jar "$@"&lt;/blockquote&gt;For the exact reasons why, check out &lt;a href="http://www.tldp.org/LDP/abs/html/internalvariables.html#APPREF"&gt;this page on bash scripting&lt;/a&gt;. I don't want to get into it right now, it kind of gives me a headache. With that line of code in there, you can escape any spaces in your filename by surrounding the filename in single quotes. FlexCompileHelper takes care of that for you, but if you put any file paths in the Additional Compiler Options field, you'll need to take that into account.&lt;br /&gt;&lt;br /&gt;By the way, if you want to see what's in FlexCompileHelper.app, feel free to open it up. I have not protected the contents from being decompiled, so you should be able to see it in Script Editor.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Well, that's it for now. Can this be improved upon? You betcha. This meets my needs for now though, so I probably won't spend too much more time on it. If you have a suggestion on how to streamline this puppy, I'm all ears. I'm kind of intrigued by the fact that even Dreamweaver's code hinting is extensible. I may take on the challenge of adding code hinting to FlexWeaver, but if I do, it won't be for a while. Enjoy, and let me know if you have questions or comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115439988444399037?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115439988444399037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115439988444399037' title='84 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115439988444399037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115439988444399037'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/07/mac-flexweaver-edit-compile-flex-apps.html' title='Mac FlexWeaver: Edit &amp; Compile Flex Apps in Dreamweaver'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>84</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115437186023356740</id><published>2006-07-31T10:57:00.000-07:00</published><updated>2006-07-31T11:51:00.363-07:00</updated><title type='text'>JD on Blog Transparency</title><content type='html'>I was midway through a comment on &lt;a href="http://weblogs.macromedia.com/jd/archives/2006/07/blog_transparen.cfm"&gt;John Dowdell's post&lt;/a&gt; regarding &lt;a href="http://blog.digitalbackcountry.com/"&gt;Ryans Stewart's post&lt;/a&gt; regarding &lt;a href="http://www.micropersuasion.com/2006/07/the_underground.html"&gt;Steve Rubel's post&lt;/a&gt; regarding the "Underground Blogosphere".... when I realized I was going a bit long, and should probably just blog it myself.&lt;br /&gt;&lt;br /&gt;After reading Ryan's article on Friday, I gave the topic a "background process" in my brain, and I must confess it hasn't returned much. What I've got is this: &lt;em&gt;who cares if bloggers email each other to pitch their stories, and why?&lt;/em&gt; I care, for the reason that I wish the most popular, easy to find blog posts were the ones with the most valuable content - as opposed to the ones with the best promotion. But what's to be done? The reality is, blogs get popular for lots of reasons - the author holds a position of prominence or is well-connected, the posts are inflammatory or invite controversy, the author advertises their blog like crazy, the content is of a high value to its audience, etc. Not to mention that if you are blogging, you probably want people to read it, and so you will no doubt take steps to increase your readership.  It stands to reason that those who have popular blogs have made an effort to achieve that popularity (sorta like how the more powerful a politician is, the more power-hungry they likely had to be to achieve their position).&lt;br /&gt;&lt;br /&gt;Now, if you rely on blogs to be accurate, then you probably care a lot more deeply about this issue than I do, and you really need to understand what a blogger's motivations might be.  I personally don't rely on anything to be accurate: not the mainstream press, not the alternative press, and CERTAINLY not the blogosphere. &lt;br /&gt;&lt;br /&gt;I guess I'm ultimately just stating the obvious: no matter where your information comes from, how it was promoted, or who authored it, you must make your own judgement as to its validity.  Does the fact that an article was promoted via social connections (or even begging for a link) make it less valid for you?  If it's something you really care deeply about, believe only your own senses.&lt;br /&gt;&lt;br /&gt;As for the RIA bit - I suspect that if RIA-related blog posts aren't getting picked up outside of MXNA and the Goog, it's because the blogosphere at large just isn't as interested in RIAs as the MXNA crowd.  I'm always a little surprised when I brag to one of my web developer cohorts about something I'm working on and I get that blank stare...  I'm lucky enough to have some very honest friends who have on occasion come out and said "Ok, that's cool and all, but why would you ever want to do that?".  I do think there will come a time when rich UI is expected and even demanded, and then those people will get it.  But for now, people who are into Flex and so forth may be a but ahead of the curve.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115437186023356740?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115437186023356740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115437186023356740' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115437186023356740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115437186023356740'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/07/jd-on-blog-transparency.html' title='JD on Blog Transparency'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115377037422383725</id><published>2006-07-24T12:22:00.000-07:00</published><updated>2006-07-24T13:05:35.460-07:00</updated><title type='text'>Edit and Compile Flex Apps in Dreamweaver</title><content type='html'>In what I think is a brilliant move by Adobe, the Flex 2 SDK and Flex 2 Framework are available for FREE. This is nothing new, but it's worth restating (it seems that a lot of people don't know it yet). I intend to make take full advantage of that fact until such time as I can afford Flex Builder. That's not to say that Flex Builder is unaffordable: quite the contrary. However, I also have to have licenses for Flash, Dreamweaver, Photoshop, and Illustrator. So for me, an extra $500 is substantial.&lt;br /&gt;&lt;br /&gt;I actually see not having access to Flex Builder as an opportunity to learn. Like many, I learned HTML by hand-coding in Notepad, and it made me REALLY learn HTML. I think that not using Flex Builder will force me to learn the behind-the-scenes stuff, and therefore will end up being a positive thing. When I do buy the Builder license, I'll have a strong understanding of what's going on under the hood, as well as the conveniences of the Design view and robust code hinting.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Configuring Dreamweaver&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Since I already have Dreamweaver, I'll use that as my XML editor. It's really easy to associate MXML files with Dreamweaver, and with a little configuration, you can take advantage of Dreamweaver's XML syntax highlighting. Here's how to do it in Windows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;1) Download the Flex 2 SDK from &lt;a href="http://www.adobe.com/products/flex"&gt;http://www.adobe.com/products/flex&lt;/a&gt; (the link is at the bottom of the page). Install the SDK by unzipping it to the directory of your choice. I put mine in the root of my C drive.&lt;br /&gt;&lt;br /&gt;2) Associate MXML files with Dreamweaver. To do so, right-click a file with a .mxml extension, and click Properties. In the Properties dialog, find where it says "Opens with:" and click the "Change" button. Select "Dreamweaver" from the resulting menu. If you don't have any .mxml files yet, you can find one in C:\flex_2_sdk\Samples.&lt;br /&gt;&lt;br /&gt;3) Enable XML syntax highlighting for .mxml files. For this, you need to edit one of Dreamweaver's configuration files. The specific file is called MMDocumentTypes.xml, and is located at C:\Program Files\Macromedia\Dreamweaver 8\Configuration\DocumentTypes. You can edit this with Dreamweaver. Find the tag &lt;documenttype id="XML"&gt;and add "mxml" to the list of extensions in the "winfileextension" parameter. Save the file, and restart Dreamweaver. &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;At this point, you should be able to double-click an MXML file and have it open in Dreamweaver, complete with syntax highlighting. Now that's all well and good, but how do we compile it? The command-line compiler that comes with the SDK is fine, but typing commands over and over again when I want to build is not my idea of a good time. Wouldn't it be swell if you could compile from Dreamweaver?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Creating a Command to Compile MXML&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Yup! Thanks to Dreamweaver's robust extensibility API, it's pretty easy to write a command that will compile the active MXML document and launch the resulting SWF in the stand-alone player. Here's how it's done:&lt;br /&gt;&lt;br /&gt;1) Create a new JS file and put the following code in it:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;// Compile mxml file from Dreamweaver&lt;br /&gt;&lt;br /&gt;function flexCompile(){&lt;br /&gt;&lt;br /&gt; var currentDocURL = dreamweaver.getDocumentPath("document");&lt;br /&gt; var i = currentDocURL.lastIndexOf("/");&lt;br /&gt;&lt;br /&gt; var parentDirectoryURL = currentDocURL.substring(0,i+1);&lt;br /&gt; var fileNameURL = currentDocURL.substring(0,currentDocURL.lastIndexOf("."));&lt;br /&gt;&lt;br /&gt; var parentDirectory = MMNotes.localURLToFilePath(parentDirectoryURL);&lt;br /&gt; var fileName = MMNotes.localURLToFilePath(fileNameURL);&lt;br /&gt;&lt;br /&gt; var currentDocFile = MMNotes.localURLToFilePath(currentDocURL);&lt;br /&gt; if(!currentDocFile){&lt;br /&gt;  alert("You must have an mxml document open to compile.");&lt;br /&gt; }else{&lt;br /&gt;  MM.createProcess('', 'C:\\flex_sdk_2\\bin\\mxmlc.exe "'+currentDocFile+'" -output "'+fileName+'.swf"', -1, true, parentDirectory ,parentDirectory+'flex-compiler-output.txt');&lt;br /&gt;  dreamweaver.openWithApp(fileNameURL+'.swf','file:///C:/flex_sdk_2/player/debug/SAFlashPlayer.exe');&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function canAcceptCommand(){&lt;br /&gt; return dreamweaver.getDocumentPath("document").indexOf(".mxml") != -1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;2) Create a new HTML file, and put the following code in it:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;!DOCTYPE HTML SYSTEM "-//Macromedia//DWExtension layout-engine 5.0//&lt;br /&gt;dialog"&amp;gt;&lt;br /&gt;&amp;lt;HTML&amp;gt;&lt;br /&gt;&amp;lt;HEAD&amp;gt;&lt;br /&gt;&amp;lt;Title&amp;gt;Flex Compile&amp;lt;/Title&amp;gt;&lt;br /&gt;&amp;lt;SCRIPT SRC="Flex Compile.js"&amp;gt;&amp;lt;/SCRIPT&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/HEAD&amp;gt;&lt;br /&gt;&amp;lt;body onLoad="flexCompile()"&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/HTML&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;3) Save these to Dreamweaver's "Commands" folder (C:\Program Files\Macromedia\Dreamweaver 8\Configuration\Commands) as Flex Compile.js and Flex Compile.htm, respectively.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4) Restart Dreamweaver. You should now have a new item in the "Commands" menu called "Flex Compile" which will compile the active MXML document with the Flex 2 compiler, launch it in the standalone player, and save a text file of the compiler output.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How It Works&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;When you click the Flex Compile menu option, Flex Compile.htm is loaded, and its body.onload function is called, which is our flexCompile function. First, a few useful variables are set. We get the file path of the active document using dreamweaver.getDocumentPath("document"), which returns the location of the active document as a URL. Then we can get the URL of the parent directory by taking a substring of the currentDocURL - everything before and including the last "/" character. Now for these to be useful to us, we must convert them to file paths. To do this, we call MMNotes.localURLToFilePath(), which is part of the Design Notes API. This function changes the syntax of the file path from URL syntax ('file:///C:/directory/filename.xxx') to file path syntax ('C:\directory\filename.xxx') .&lt;br /&gt;&lt;br /&gt;Next comes the real magic, an undocumented command called MM.createProcess(), which I found at &lt;a href="http://www.communitymx.com/blog/index.cfm?newsid=179&amp;blogger=35"&gt;http://www.communitymx.com/blog/index.cfm?newsid=179&amp;amp;blogger=35&lt;/a&gt;. This allows us to send a command to the compiler without opening it in a command-line window, and it can also be configured to make Dreamweaver wait while the compiling takes place. Note that in my command, I have hard-coded the path to the compiler. If you want to keep the Flex 2 SDK anywhere other than C:\flex_2_sdk, you will have to update the JS file. Also note that in MM.createProcess, the backslashes have to be escaped.&lt;br /&gt;&lt;br /&gt;I have configured this command to put the SWF output in the same directory as the mxml file. MM.createProcess also optionally sends the output of the process to a text file, which I have opted for in this command. It will create a text file called 'flex-compiler-output.txt' in the same directory as your mxml file.&lt;br /&gt;&lt;br /&gt;Next, I call dreamweaver.openWithApp to launch the SWF in the standalone player. Again, I have hard-coded the path to the Flex 2 SDK.&lt;br /&gt;&lt;br /&gt;The function canAcceptCommand() simply ensures that the command is grayed out unless an MXML document is the active document in Dreamweaver.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I believe this setup has a great deal of potential as a basic Flex 2 workflow. One could easily imagine a more configurable version of the Flex Compile command where you could specify the path for the SWF output, or the path to the Flex 2 SDK. What I was going for with this command was to mimic the functionality of Preview in the Flash IDE, so that as I make edits to the MXML I can easily see the results of my changes. Ultimately, this makes up for the lack of a design view, which is one of the great benefits of Flex Builder.&lt;br /&gt;&lt;br /&gt;Since I would prefer to work on my Mac, I am creating a Mac version of this command. It will probably have to rely on a shell script or AppleScript to achieve similar functionality since MM.createProcess (and its friends) do not work on the Mac. There is some promise with the undocumented dw.runAppleScript() command, but it does not appear to work on my MacTel.&lt;br /&gt;&lt;br /&gt;On the XML-editing side of things, I will probably explore creating an MXML file template for Dreamweaver, as well as rudimentary code-completion. Thanks to Dreamweaver's robust extensibility, I will be able to efficiently create Flex applications without buying Builder, and learning a lot in the process.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115377037422383725?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115377037422383725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115377037422383725' title='29 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115377037422383725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115377037422383725'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/07/edit-and-compile-flex-apps-in.html' title='Edit and Compile Flex Apps in Dreamweaver'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>29</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115370006635425393</id><published>2006-07-23T17:04:00.000-07:00</published><updated>2006-07-23T17:14:26.440-07:00</updated><title type='text'>Flex 2 Compiler (mxmlc) on OS X - No Spaces in Filenames</title><content type='html'>The Mac version of mxmlc that ships with the Flex 2 SDK does not support spaces in filenames, or so it seems.  This is inconvenient to say the least, since the default name of your hard drive on OS X systems is "Macintosh HD".  If you have a space in your filename, mxmlc can't find the file - it thinks that the full path to the file is the part after the last space.  I'm presently seeking a workaround, but no amount of escape sequences or quotes seems to help.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115370006635425393?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115370006635425393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115370006635425393' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115370006635425393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115370006635425393'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/07/flex-2-compiler-mxmlc-on-os-x-no.html' title='Flex 2 Compiler (mxmlc) on OS X - No Spaces in Filenames'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115315861464490442</id><published>2006-07-17T10:25:00.000-07:00</published><updated>2006-07-17T10:50:14.853-07:00</updated><title type='text'>IE CSS Rollover Cache Bug</title><content type='html'>Basically, the bug is that if you use CSS for image rollovers (by giving a hyperlink a background-image and changing it with the :hover selector), Internet Explorer will (in most circumstances) check the server for a newer version of the image every time a user mouses over your hyperlink. This can merely look bad (it causes the image to flicker) or it can present real usability problems. The seldom-mentioned side effect is that when a user clicks the hyperlink, the IE 'loading' animation (or 'spinner' as some like to call it - that wavy window animation in the upper right corner) will stop as soon as the user mouses off of the hyperlink, making it seem as though the page load has completed. If you are using the hyperlink to submit a form, the user may click the button multiple times.&lt;br /&gt;&lt;br /&gt;Seems like every time I run into this bug, I've forgotten where to find the relevant discussion, so....&lt;br /&gt;&lt;br /&gt;Here's a &lt;a href="http://archivist.incutio.com/viewlist/css-discuss/30707"&gt;solution on Css-Discuss&lt;/a&gt; that involves manipulating Vary headers server-side. Also, a &lt;a href="http://www.mezzoblue.com/archives/2003/09/19/rollovers_in/"&gt;discussion on Mezzoblue &lt;/a&gt;that seems to be a good general doorway into the topic. If you use Pixy's No-Preload rollovers, check out &lt;a href="http://wellstyled.com/css-nopreload-rollovers.html"&gt;the bottom of this page&lt;/a&gt; for a client-side solution which may involve extra markup.  &lt;a href="http://www.fivesevensix.com/studies/ie6flicker/"&gt;This article&lt;/a&gt; at &lt;a href="http://www.fivesevensix.com"&gt;www.fivesevensix.com&lt;/a&gt; seems to be the most comprehensive write-up on the subject.  Got any others?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115315861464490442?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115315861464490442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115315861464490442' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115315861464490442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115315861464490442'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/07/ie-css-rollover-cache-bug.html' title='IE CSS Rollover Cache Bug'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>24</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115310046066871349</id><published>2006-07-16T18:38:00.000-07:00</published><updated>2006-07-16T18:41:00.690-07:00</updated><title type='text'>Using Subversion w/ Eclipse</title><content type='html'>Another 'saving this link for later' post.  IBM has a great article on using Subversion with Eclipse, complete with pictures:&lt;br /&gt;&lt;a href="http://www-128.ibm.com/developerworks/opensource/library/os-ecl-subversion/?ca=dgr-jw22EclipseSubversion"&gt;http://www-128.ibm.com/developerworks/opensource/library/os-ecl-subversion/?ca=dgr-jw22EclipseSubversion&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Getting up to speed on Subversion is on my to-do list.  This will no doubt come in handy when the tiime comes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115310046066871349?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115310046066871349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115310046066871349' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115310046066871349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115310046066871349'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/07/using-subversion-w-eclipse.html' title='Using Subversion w/ Eclipse'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115301915472883676</id><published>2006-07-15T19:52:00.000-07:00</published><updated>2006-07-15T20:05:54.750-07:00</updated><title type='text'>Things Never Taught In Design School</title><content type='html'>&lt;a href="http://www.designobserver.com/archives/000121.html"&gt;Michael McDonough’s Top Ten Things They Never Taught Me in Design School&lt;/a&gt; - Design Observer article by way of &lt;a href="http://weblogs.macromedia.com/jd/archives/2006/07/work_tips.cfm"&gt;John Dowdell&lt;/a&gt;. I really like this one and don't want to lose it, so am posting it here.&lt;br /&gt;&lt;br /&gt;My particular favorite: show me the output!  It's not enough to have an idea, you must also make it manifest (working on that as a bit of self-development, actually).  Many people have ideas, few actually make something of them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115301915472883676?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115301915472883676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115301915472883676' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115301915472883676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115301915472883676'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/07/things-never-taught-in-design-school.html' title='Things Never Taught In Design School'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115298334280232908</id><published>2006-07-15T09:55:00.000-07:00</published><updated>2006-07-15T10:19:13.786-07:00</updated><title type='text'>All FOUCed Up</title><content type='html'>I recently ran across a problem with CSS where IE would momentarily display unstyled content until the external stylesheets loaded.  This bug is called "Flash of Unstyled Content" or "FOUC", and is documented here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.bluerobot.com/web/css/fouc.asp"&gt;http://www.bluerobot.com/web/css/fouc.asp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This can happen if you reference your external stylesheets using @import.  The fix is to use at least one link element or one script element in the head of your document.  An interesting wrinkle:  the link element or script element can be completely empty.&lt;br /&gt;&lt;br /&gt;The reason I'd never encountered it before is that I never had created a page which did not use either a link element or a script element in the head element.  You see, I developed a habit over the years where I specify a print media stylesheet using a link element and then include other stylesheets with the @import statement, which prevents them from being loaded by IE 3 and NS 3.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115298334280232908?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115298334280232908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115298334280232908' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115298334280232908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115298334280232908'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/07/all-fouced-up.html' title='All FOUCed Up'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115291595732429433</id><published>2006-07-14T15:13:00.000-07:00</published><updated>2006-07-24T13:04:00.226-07:00</updated><title type='text'>JamJar, Flex 2 - A Little Worried</title><content type='html'>So Flash Player 9 and Flex 2 are both available now, and I finally have the chance to show off what they can do.  I've been bragging up Flex 2 to all of my colleagues, many of whom simply don't get the Flash Platform at all.  I'm hearing great things about the JamJar demo, and it sound like a perfect app to show off the power of Flex.  Except that when I run it, I get this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;ReferenceError: Error #1069: Property hasDefinition not found on&lt;br /&gt;flash.system.ApplicationDomain and there is no default value. at&lt;br /&gt;mx.managers::SystemManager/getDefinitionByName() at&lt;br /&gt;mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::addingChild() at&lt;br /&gt;mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt() at&lt;br /&gt;mx.managers::SystemChildrenList/addChild() at&lt;br /&gt;mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize() at&lt;br /&gt;mx.managers::SystemManager/::initHandler()&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I have a "Dismiss All" button and a "Continue" button, both of which yield the same result: a lovely blue-green screen with a nice gradient (you know, the standard Flex background).  That's it.&lt;br /&gt;&lt;br /&gt;I updated my Flash Player, but that's all I can think of to do... I've been a Flash developer for years, and I am at a total loss.  Imagine when the average user comes up against one of these error boxes!&lt;br /&gt;&lt;br /&gt;I knew AS3 would not fail silently, and I've always had a feeling that was a bad idea.  But, I guess I just figured I'd get my code 100% right.  But if the Flex team can't get it right, what chance do I have?&lt;br /&gt;&lt;br /&gt;I've got a feeling there's more going on than buggy code.  Maybe my Flash player didn't update itself correctly - that would be a bad thing too.  I really want the Flex platform to succeed (I want to make a living at it!), but if this kind of user experience becomes common, it will only give ammunition to the anti-Flash crowd and make it a tougher sell.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115291595732429433?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115291595732429433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115291595732429433' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115291595732429433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115291595732429433'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/07/jamjar-flex-2-little-worried.html' title='JamJar, Flex 2 - A Little Worried'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115264022065159983</id><published>2006-07-11T10:40:00.000-07:00</published><updated>2006-07-11T10:50:20.673-07:00</updated><title type='text'>ExternalInterface Out Of Memory Error</title><content type='html'>With the release of Flash Player 9, one of the web sites for which I am responsible began throwing "out of memory" errors in Internet Explorer. This happened when a user would navigate away from the page. Stepping into the debugger revealed the following problematic code:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;&lt;br /&gt;function __flash_unloadHandler() {&lt;br /&gt;mySwf.style.display = 'none';&lt;br /&gt;for (var prop in mySwf) {&lt;br /&gt;if (typeof(mySwf[prop]) == "function") {&lt;br /&gt;mySwf[prop]=null;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;if (__flash_savedUnloadHandler != null) {&lt;br /&gt;__flash_savedUnloadHandler();&lt;br /&gt;}&lt;br /&gt;} &lt;/p&gt;&lt;p&gt;&lt;br /&gt;function __flash_setupUnloadHandler() {&lt;br /&gt;if (window.onunload != __flash_unloadHandler) {&lt;br /&gt;__flash_savedUnloadHandler = window.onunload;&lt;br /&gt;window.onunload = __flash_unloadHandler;&lt;br /&gt;}&lt;br /&gt;} &lt;/p&gt;&lt;p&gt;&lt;br /&gt;__flash_setupUnloadHandler();&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;My first reaction was "Whaa? I didn't write any of that code", but then I remembered &lt;a href="http://codinginparadise.org/weblog/2006_02_03_archive.html"&gt;this neat little article by Brad Neuberg&lt;/a&gt; showing how the Flash Player uses JavaScript methods for serializing incoming ExternalInterface calls. So, my problem was related to ExternalInterface.&lt;br /&gt;&lt;br /&gt;A quick search for "ExternalInterface out of memory error" yielded the following Flashcoders discussion: &lt;a href="http://chattyfig.figleaf.com/pipermail/flashcoders/2006-July/168998.html"&gt;http://chattyfig.figleaf.com/pipermail/flashcoders/2006-July/168998.html&lt;/a&gt;. So I was not alone, and it seems the issue is related to having multiple swfs using ExternalInterface on one page.&lt;br /&gt;&lt;br /&gt;(The same search also turned up &lt;a href="http://blog.deconcept.com/2006/05/18/flash-player-bug-streaming-content-innerhtml-ie/"&gt;this page&lt;/a&gt;, where Geoff Stearns talks about fixing problems with audio streams and SWFObject. The code which fixes Geoff's issue looks mighty familiar when I look at my debugger.)&lt;br /&gt;&lt;br /&gt;The part where IE gets stuck is in executing __flash_savedUnloadHandler(); At first glance it looks to me like __flash_savedUnloadHandler() would be executed for every swf you have embedded in your page. In the &lt;a href="http://chattyfig.figleaf.com/pipermail/flashcoders/2006-July/168998.html"&gt;Flashcoders thread I referred to earlier&lt;/a&gt;, Alexis Glass suggests the problem may be related to the fact that the unload handler is saved in a global variable: &lt;blockquote&gt;...it saves the previous unload handler in a global variable so that if&lt;br /&gt;ExternalInterface is initialized twice on one page it recursively calls the&lt;br /&gt;__flash_savedUnloadHandler until IE complains about no memory.&lt;/blockquote&gt;&lt;br /&gt;It may be possible to override the faulty JavaScript, but I don't want to go down that road for fear it will break with a future release. So, I will have to revert back to good ol' FSCommand and getURL for the time being. Yuk.  Anybody got something better for me?&lt;br /&gt;&lt;br /&gt;As an aside, in my research I also came across &lt;a href="http://weblogs.macromedia.com/jd/archives/2006/02/neuberg_on_exte.cfm#comments"&gt;John Dowdell's response to Brad Neuberg's original article&lt;/a&gt;.  I know it's a bit dated now, but the ensuing comments are interesting, because John seems to be focused on the context of Brad's usage of ExternalInterface, whereas Brad seems to be offering the exact points of failure.   It seems that John is saying "You're out of scope, the point is moot" while Brad is saying "My personal scope of use is not important, here are in-scope examples of how ExternalInterface is broken".  I encountered the same "perspective gap" when dealing with Macromedia's customer support folks a few years ago.  They seem to be trained to focus on the context in which you are using the functionality, so they can offer alternate means to your particular end.  But that can be frustrating when you are trying to present a unit test which is failing for no particular reason, and they are preoccupied with the question of why you want to do it in the first place.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115264022065159983?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115264022065159983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115264022065159983' title='31 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115264022065159983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115264022065159983'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/07/externalinterface-out-of-memory-error_11.html' title='ExternalInterface Out Of Memory Error'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>31</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115255817084580548</id><published>2006-07-10T11:58:00.000-07:00</published><updated>2006-07-10T12:02:50.866-07:00</updated><title type='text'>Flash Player 7 String Parsing Performance</title><content type='html'>I just came across the following in my notes from last year, thought it was worth saving:&lt;br /&gt;&lt;br /&gt;When performing String parse operations, the presence of characters above the ASCII 128 character range can slow the parsing significantly.  In my case, I was applying String.toLowerCase on a 45000 character string, and it was taking 2.5 seconds.  Removing the characters above character code 128 reduced the execution time to just 2 milliseconds.&lt;br /&gt;&lt;br /&gt;I have no idea if this applies to Flash Player 8 or 9, but I have a feeling I'll be checking into it soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115255817084580548?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115255817084580548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115255817084580548' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115255817084580548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115255817084580548'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/07/flash-player-7-string-parsing.html' title='Flash Player 7 String Parsing Performance'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115176978286366635</id><published>2006-07-01T08:56:00.000-07:00</published><updated>2006-07-01T09:03:02.876-07:00</updated><title type='text'>IE 5 currentStyle.display bug</title><content type='html'>In IE 5, Element.currentStyle.display will return "inline" for block elements that do not have a display property explicitly set.  This was corrected in IE5.5.  There is no known workaround.&lt;br /&gt;&lt;br /&gt;Test page &lt;a href="http://labs.tom-lee.com/Reduction/IE5currentstyle.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115176978286366635?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115176978286366635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115176978286366635' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115176978286366635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115176978286366635'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/07/ie-5-currentstyledisplay-bug.html' title='IE 5 currentStyle.display bug'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115125436261368137</id><published>2006-06-25T09:43:00.000-07:00</published><updated>2006-06-25T12:07:52.333-07:00</updated><title type='text'>ExternalInterface Slower Than getURL</title><content type='html'>The &lt;a href="http://labs.tom-lee.com/ExternalInterface/ExternalInterfacePerformanceTest.html"&gt;test page&lt;/a&gt; speaks for itself. Basically, I wanted to see whether it was worth using ExternalInterface for Flash-to-JavaScript communication when the JavaScript function doesn't return anything.&lt;br /&gt;&lt;br /&gt;It turns out getURL still has its advantages. My results from this test show the following:&lt;br /&gt;&lt;br /&gt;10000 ExternalInterface calls: 1593ms.&lt;br /&gt;10000 getURL calls: 83ms.&lt;br /&gt;&lt;br /&gt;That's pretty significant. My theory for the difference in execution speed is that ExternalInterface is waiting for the JavaScript function to finish executing before it allows the next call to take place. With getURL, I believe it is leaving it to the browser to queue up those JS calls, and doesn't bother waiting for a return value.&lt;br /&gt;&lt;br /&gt;In my test case, all the JavaScript function does is assign a variable, so it executes pretty quickly. However, in real life, a slow JavaScript function could have your ExternalInterface calls waiting for a return value that never comes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115125436261368137?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115125436261368137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115125436261368137' title='28 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115125436261368137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115125436261368137'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/externalinterface-slower-than-geturl.html' title='ExternalInterface Slower Than getURL'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>28</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115081635564672279</id><published>2006-06-20T07:38:00.000-07:00</published><updated>2006-06-20T08:12:35.750-07:00</updated><title type='text'>Flash RIA Testing Effort</title><content type='html'>Yesterday, in my post "&lt;a href="http://tom-lee.blogspot.com/2006/06/why-flash-vs-ajax-debate.html"&gt;Why a Flash vs Ajax Debate?&lt;/a&gt;" I talked about how targeting an older version of the Flash player in the development of RIAs can yield a multiplication in testing effort as compared to their Ajax counterparts. See the original post for more detail, but basically this is because you have to test every minor Flash Player version back to the targeted version, on every browser, in order to make a cross-platform compatibility promise.&lt;br /&gt;&lt;br /&gt;This prompted some great comments regarding QA methodologies for Flash, and I would like to hear more. &lt;br /&gt;&lt;br /&gt;I'll start:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;When developing solo, I test heavily on all major revisions of the Flash&lt;br /&gt;player back to the targeted version. If I am targeting Player 6, I also&lt;br /&gt;pay special attention to 6 r47. I spot-check a few minor revisions between&lt;br /&gt;each major version.&lt;br /&gt;&lt;br /&gt;My testing for browsers mirrors typical user&lt;br /&gt;agent statistics: 85% IE PC, 10% Firefox, 5% everything else.&lt;br /&gt;In other words, I test heavily on IE PC and spot-check virtually everything&lt;br /&gt;else, with a little extra attention paid to Firefox. &lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This ends up being a manageable testing effort for solo development, and very few bugs have ever made it through. With JavaScript, the testing is usually similar, except that the Flash player is not a factor at all. I pay a little more attention to IE 5.x and Safari because of differences in their JavaScript implementation, but usually those differences are handled by a framework and don't present much of a problem.&lt;br /&gt;&lt;br /&gt;Though my thoughts so far have been focused on the code behind the scenes, I would be remiss not to point out that one place where Flash can unquestionably reduce the QA effort is in the UI.  Rendering differences between Flash player versions are almost nonexistent.  In fact, this is one area in which I have come to take Flash for granted - you forget about the UI if it's not causing you problems.  Getting complex components to work identically everywhere is not always a sure thing, but you can be guaranteed that they'll LOOK the same.  Compare/contrast with HTML/CSS, and Flash clearly comes out the victor on that score.&lt;br /&gt;&lt;br /&gt;So, what Flash player/browser combinations do you test in? What known issues do you specifically look out for? If you're an Ajax developer, what frameworks do you use, and which browsers do you test in? This promises to be a great discussion and one well worth having.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115081635564672279?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115081635564672279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115081635564672279' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115081635564672279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115081635564672279'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/flash-ria-testing-effort.html' title='Flash RIA Testing Effort'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115076171233403535</id><published>2006-06-19T16:09:00.000-07:00</published><updated>2006-06-19T20:38:38.980-07:00</updated><title type='text'>Why a Flash vs Ajax Debate?</title><content type='html'>I've been wondering for a while why Ajax has become so popular recently, when Flash has had the same capabilities and more for several years. I've been working with both JavaScript and Flash since 1999, and for me, there's never been a debate over which was the superior technology.  I avoided JavaScript when possible, mostly because cross-platform compatibility was my prime directive, and because it was possible to do things in Flash that JavaScript was incapable of. For a long time, the Flash Player was more ubiquitous than the presence of advanced JavaScript capability.&lt;br /&gt;&lt;br /&gt;Today it seems to me that the Flash Player and advanced JavaScript capability are almost on an even footing in terms of ubiquity (I say this based on user agent stats I've seen from a few different market segments). When you consider that MSIE 6 can make up 90% of the traffic to a consumer-oriented site, that's a pretty good chunk of it. Then, you've got the IE 5.x's, the Firefox's and the occasional Safari. Really, the browser that can't do Ajax is increasingly rare.&lt;br /&gt;&lt;br /&gt;I still believe Flash is superior, in many ways. But ironically, the things that used to be its main strengths are becoming liabilities.&lt;br /&gt;&lt;br /&gt;I used to rely on Flash because it reduced my testing effort. With Flash, I could be basically assured that what worked on PC IE would work on Mac IE (no small feat, by JavaScript standards). Unfortunately, over the last several versions of the Flash Player, many obscure bugs have come and gone, bugs that existed for perhaps only one minor version of the Player on one browser. I recall one particularly egregious bug in Player 6-dot-something for Mac IE, where you could not cancel a loadMovie request once it was made (hogging up bandwidth to an unusable degree, in my case).&lt;br /&gt;&lt;br /&gt;Fortunately, Macromedia was great about fixing those bugs. Unfortunately, the public was not so great about updating their players. These days, if you want to reach that 97% audience that Adobe advertises, you have to target Player 6. I recently came across a scenario where the company-wide IT policy was Player 6, no hope of upgrade (in some companies, shockwave is just completely blocked at the firewall level).&lt;br /&gt;&lt;br /&gt;[As a long-time Flash devotee, I cringe while writing the following]&lt;br /&gt;&lt;br /&gt;The upshot of all this is that Flash represents a multiplication in testing effort for every back-version you target. Even some of the simplest tasks, such as Local Shared Object read and write, can not in my experience be relied upon to work identically across all minor player versions back to 6.0. If you want to make a compatibility promise, the only way to do so is to test every feature of your application in every version of every targeted browser, in every minor version of the Flash player going back to the targeted version.&lt;br /&gt;&lt;br /&gt;To put that in perspective, there are 6 releases in the Player 6 archive, and Player 7 had 7. Let's ignore Player 8 for now. Let's suppose we want to target MSIE 5 and greater, Firefox 1 and greater, and Safari 2 and greater. That's at least 3 versions of IE, at least 3 of Firefox, and probably 2 of Safari (I'm speaking loosely here, I'm sure there are more). That makes 8 browsers to test on, and 13 versions of the player - a total of 104 test configurations.&lt;br /&gt;&lt;br /&gt;Yikes.&lt;br /&gt;&lt;br /&gt;No development team in their right mind would take on such a testing effort, even for a mildly involved project.  (Now, I'm not suggesting that you have to - you can definitely achieve high quality products in Flash without all that. But to be precise, you can't make a cross-platform compatibility promise without actually testing on all targeted configurations.)  Compare this to JavaScript, where you have only the browsers themselves to concern yourself with.&lt;br /&gt;&lt;br /&gt;Now, I have never tested a complex application in every minor version of the Player, and more often than not, the cross-platform compatibility promise of Flash does hold true.  But I have also had situations where bugs didn't present themselves until the product was launched and customers complained.  Those situations have made me very cautious, and even though I don't test all the minor versions, I do end up with longer QA cycles on my Flash projects than the JavaScript ones.&lt;br /&gt;&lt;br /&gt;Not that testing JavaScript-based apps is easier: there tend to be more unanticipated bugs than in Flash, so I probably end up with more QA cycles.&lt;br /&gt;&lt;br /&gt;Ultimately, Flash can still do way more than JavaScript, and I firmly believe it remains a better solution for RIA.  But I don't think Adobe can rightfully trumpet cross-platform compatibility and player ubiquity in the same breath.  If you want all the considerable advantages that the Flash Player has to offer, you have to sacrifice some market penetration.  If you want 97% reach, you have to author for Player 6 and test like mad.&lt;br /&gt;&lt;br /&gt;One thing Adobe could do to help the situation would be to publicize the bug databases from old releases of the player.  That would at least allow us to know what we're dealing with when developing for older player versions.  A lot of the bugs that have given me the most grief in the past were only documented in the Flashcoders archives, and only in the ad hoc format of a discussion thread. &lt;br /&gt;&lt;br /&gt;I have had a hard time understanding why so many developers were so keen to jump on the Ajax bandwagon when Flash has been around so much longer.  Maybe this testing effort thing has something to do with it.  Am I onto something here?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115076171233403535?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115076171233403535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115076171233403535' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115076171233403535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115076171233403535'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/why-flash-vs-ajax-debate.html' title='Why a Flash vs Ajax Debate?'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115075831771373066</id><published>2006-06-19T15:37:00.000-07:00</published><updated>2006-06-19T16:06:39.553-07:00</updated><title type='text'>Flash Bug - Contents of TextField w/autoSize = true Scroll When Selected</title><content type='html'>This one's for &lt;a href="http://novemberborn.net"&gt;Mark Wubben&lt;/a&gt; of SIFR fame -&lt;br /&gt;&lt;br /&gt;When you create a multiline TextField and set its autoSize = true, the TextField should expand to accomodate its contents, and the contents should not scroll when selected by clicking and dragging within the text field. However, sometimes when you select the text, it scrolls and the top gets chopped off. This seems to happen most frequently when the mouse exits the TextField at the bottom edge, rather than the right edge.&lt;br /&gt;&lt;br /&gt;The best solution I have found for this is not to use the autoSize property at all, but rather to simulate it, and add a little extra height:&lt;br /&gt;&lt;br /&gt;myTextField._height = myTextField.textHeight + 7;&lt;br /&gt;&lt;br /&gt;7 seems to be the magic number. This is just enough extra padding to prevent the scrolling, and is only a pixel or two taller than the autoSize = true version. 7 seems pretty aribitrary, and the difference between the autoSized TextField and the non-autoSized TextField varys with font face and font size. So, I use 10px to be on the safe side. I've tested this with a lot of different font faces and sizes, and it hasn't failed me yet. To maintain an accurate visual representation, I subtract 10px from the height of the containing object (in the case of SWF Headings, its the ActiveX object or plugin, but it could also be a masked movieclip).&lt;br /&gt;&lt;br /&gt;Here's a &lt;a href="http://labs.tom-lee.com/TextFieldScrolling"&gt;test case&lt;/a&gt;, and the &lt;a href="http://labs.tom-lee.com/TextFieldScrolling/testing_autoheight.fla"&gt;source&lt;/a&gt; as well.&lt;br /&gt;&lt;br /&gt;[Edit: in the test case, the TextField on the left is autoSize = true, the one on the right has the workaround applied ]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115075831771373066?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115075831771373066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115075831771373066' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115075831771373066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115075831771373066'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/flash-bug-contents-of-textfield.html' title='Flash Bug - Contents of TextField w/autoSize = true Scroll When Selected'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115033956512275604</id><published>2006-06-14T19:45:00.000-07:00</published><updated>2006-06-14T20:15:23.566-07:00</updated><title type='text'>More About Failing Eolas Patent Workarounds</title><content type='html'>I happen to be one of those lucky people for whom the Eolas workarounds do not always work.  The issue for me is that if I clear IE's cache and then visit an Eolas-remediated site, the workarounds fail.  If I restart the browser after clearing the cache, the workarounds are fine.  Not all of my PCs exhibit this behavior.&lt;br /&gt;&lt;br /&gt;I found the following article which says essentially that the problem may be due to a faulty installation of the Eolas patch:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.metawrap.com/blog/MicrosoftsEolasActiveXPatchForIESometimesBreaksJavaScriptWorkaround.aspx"&gt;http://blog.metawrap.com/blog/MicrosoftsEolasActiveXPatchForIESometimesBreaksJavaScriptWorkaround.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Awesome article.  Too bad I can't uninstall the patch to prove the theory.  Windows gives me Access Denied errors, and won't even let me do System Restore to a date prior to the Eolas patch.  I feel a rant coming on...&lt;br /&gt;&lt;br /&gt;But I'll spare you my feelings on Mac v. Windows.  I think I'll instead keep an eye out for a JavaScript tweak to fix the issue, although at the moment I'm feeling very doubtful that such a critter exists.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115033956512275604?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115033956512275604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115033956512275604' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115033956512275604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115033956512275604'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/more-about-failing-eolas-patent.html' title='More About Failing Eolas Patent Workarounds'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115029403158440767</id><published>2006-06-14T07:00:00.000-07:00</published><updated>2006-06-14T07:07:13.980-07:00</updated><title type='text'>A Sad Day on Flashcoders - Update</title><content type='html'>As of about 6 PM yesterday, Flashcoders is offline.  Maybe it began loathing what it had become and decided to end it all?  Start casting your votes - if Flashcoders was standing on a ledge, would you&lt;br /&gt;&lt;br /&gt;a) Talk it down - it has so much to live for&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;b) Give it a nudge?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115029403158440767?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115029403158440767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115029403158440767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115029403158440767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115029403158440767'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/sad-day-on-flashcoders-update.html' title='A Sad Day on Flashcoders - Update'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115023919491824580</id><published>2006-06-13T15:08:00.000-07:00</published><updated>2006-06-13T15:53:15.043-07:00</updated><title type='text'>A Sad Day on Flashcoders</title><content type='html'>Today was a dark day in Flashcoders history.  I counted no fewer than 45 posts on the topic of "Flash coders content degrading" today, and this was a carry over from yesterday.  Many of these posts were multi-paragraph rants regarding noobs, RTFM &amp; Googable questions, the place of newbies in the mailing list ecosystem, elitists, etc.  The tone of the posts ranged from irate to juvenile to jovial to concerned.  The vitriol spilled into other threads as well, with accusations being hurled as to who did and did not Google or read the Help manual before posting.  Scorn was heaped, soap-boxes were stood upon, and real questions went unanswered.&lt;br /&gt;&lt;br /&gt;I resisted the temptation to voice my own opinion, except to defend one hapless soul who happened across Micael Stuhr's inbox at the wrong time.  But my hackles are up, and this blog is the correct forum to voice my opinion, and so here it is:&lt;br /&gt;&lt;br /&gt;The only people degrading the content on Flashcoders are the ones who post messages about people degrading the content on Flashcoders, and the occasional "joke of the day".  What about the noobs and all their silly questions, you say?  I believe there is no such thing as a stupid question, as long as it is sincere.  I have learned more from answering "newbie" questions, and from reading answers to "newbie" questions than I have learned from almost any other source.  Anybody who thinks they're above "newbie" questions simply doesn't see the benefit they can gain from a review of the basics.&lt;br /&gt;&lt;br /&gt;Like many others, I love Flashcoders for its potential to provide answers to really difficult questions.  But I recognize that some of the very people who today are asking "simple" questions are the same ones who will be answering hard questions in the future.  Over the years, I have watched some great minds at work on Flashcoders, many of whom no longer post to the list.  Today, those guys are legends in the Flash world, and probably busier than hell.&lt;br /&gt;&lt;br /&gt;Who has taken their place? From today's conversation, it looks like their places are empty.&lt;br /&gt;&lt;br /&gt;So, what can be done?  &lt;a href="http://www.bitchwhocodes.com"&gt;Stacey Mulcahey&lt;/a&gt; issued a call to save Flashcoders, but then promptly disappeared from the scene.  (I don't mean that as a personal attack on Stacey... it's just that 1) I love her blog and have been looking for an excuse to link to it, and 2) I was right there with her and a little disappointed not to see her on Flashcoders anymore).  She's not the only one who complained and then dropped out of site.  But if you want to save Flashcoders, you can't abandon it.&lt;br /&gt;&lt;br /&gt;Here's what can be done: do not respond to off-topic messages.  There are those who will... Ignore them.   With regard to newbies and RTFM questions: either answer the question, or do not answer the question.  It seriously does not take long to determine if a question is of interest to you. &lt;br /&gt;&lt;br /&gt;The key thing to remember is this:  it is not your civic duty to reprimand anyone for OT, RTFM, or anything else.  You are not the OT Police.  Dave Watts is pretty much the only person who can be attributed that title, and he seems disinterested in the job.&lt;br /&gt;&lt;br /&gt;I know this is an idealistic approach, and not likely to reduce the amount of OT.  But it WILL cut the amount of OT about OT, and that actually seems to be more of a problem these days.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115023919491824580?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115023919491824580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115023919491824580' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115023919491824580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115023919491824580'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/sad-day-on-flashcoders.html' title='A Sad Day on Flashcoders'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-115017065805763918</id><published>2006-06-12T20:47:00.000-07:00</published><updated>2006-06-16T07:52:13.023-07:00</updated><title type='text'>Shared Libraries - Branden Hall's Original Solution</title><content type='html'>I was researching shared fonts for my SWF Headings library, and I kept coming across references to a post on Branden Hall's blog where he found a slick way to allow dynamic creation of elements from shared libraries. Alas, the post no longer seems to exist anywhere on his blog.&lt;br /&gt;&lt;br /&gt;Finally, I found this post on Flashcoders which contains a sizable excerpt:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://chattyfig.figleaf.com/pipermail/flashcoders/2002-August/045588.html"&gt;http://chattyfig.figleaf.com/pipermail/flashcoders/2002-August/045588.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Interesting technique. Not sure I'll be able to use it, but good to have in the arsenal just the same.&lt;br /&gt;&lt;br /&gt;[Edit] Found a more complete writeup elsewhere on Flashcoders: &lt;a href="http://chattyfig.figleaf.com/pipermail/flashcoders/2004-June/115662.html"&gt;http://chattyfig.figleaf.com/pipermail/flashcoders/2004-June/115662.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;[Edit] Naturally, the Wayback Machine is the first place I should have thought to look:&lt;br /&gt;&lt;a href="http://web.archive.org/web/20021206180401/http://www.waxpraxis.org/archives/000062.html"&gt;http://web.archive.org/web/20021206180401/http://www.waxpraxis.org/archives/000062.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-115017065805763918?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/115017065805763918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=115017065805763918' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115017065805763918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/115017065805763918'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/shared-libraries-branden-halls.html' title='Shared Libraries - Branden Hall&apos;s Original Solution'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114990974229582902</id><published>2006-06-09T20:17:00.000-07:00</published><updated>2006-06-13T15:01:27.026-07:00</updated><title type='text'>Flash 8 ColorMatrix Explained</title><content type='html'>Here are a couple sources I found really useful in understanding the ColorMatrix class:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.adobe.com/devnet/flash/articles/matrix_transformations_04.html"&gt;http://www.adobe.com/devnet/flash/articles/matrix_transformations_04.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://chattyfig.figleaf.com/pipermail/flashcoders/2005-September/150592.html"&gt;http://chattyfig.figleaf.com/pipermail/flashcoders/2005-September/150592.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;These were simple and straightforward, unlike many of the articles on ColorMatrix that assume you have prior knowledge of matrices in general. Also, much better than the help docs on this topic.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114990974229582902?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114990974229582902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114990974229582902' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114990974229582902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114990974229582902'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/flash-8-colormatrix-explained.html' title='Flash 8 ColorMatrix Explained'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114977914458834866</id><published>2006-06-08T07:56:00.001-07:00</published><updated>2006-06-13T14:59:39.220-07:00</updated><title type='text'>JavaScript - Concatenating NodeLists</title><content type='html'>In JavaScript, you cannot concatenate two nodeLists using Array.concat(). This is because nodeLists are not true Arrays, they are more like Objects that happen to have a length property. Here's an example scenario:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;var pElements = document.body.getElementsByTagName("p");&lt;br /&gt;var divElements = document.body.getElementsByTagName("div");&lt;br /&gt;&lt;br /&gt;// This results in a new array where the last element is the entire&lt;br /&gt;divElements nodeList&lt;br /&gt;var pAndDivElements = pElements.concat(divElements);&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;As a workaround, I wrote a quick method that will join two nodelists:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;joinNodeLists: function(list1,list2){&lt;br /&gt;var i = list2.length - 1; &lt;/p&gt;&lt;p&gt;do{ list1[list1.length] = list2[i]; &lt;/p&gt;&lt;p&gt;}&lt;br /&gt;while(i--); &lt;/p&gt;&lt;p&gt;return list1;&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;Note that I use list1[list1.length] = list2[i] instead of list1.push(list2[i]). This is for compatibility with IE 5.&lt;br /&gt;&lt;br /&gt;To Do: Make a function that accepts an unlimited number of nodeLists and joins them all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114977914458834866?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114977914458834866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114977914458834866' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114977914458834866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114977914458834866'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/javascript-concatenating-nodelists_08.html' title='JavaScript - Concatenating NodeLists'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114961533733749947</id><published>2006-06-06T10:35:00.000-07:00</published><updated>2006-06-13T14:56:40.316-07:00</updated><title type='text'>Great Info on Closures in JavaScript</title><content type='html'>If you ever want to know more than you ever wanted to know about closures in ECMA Script, here's the place to go:&lt;br /&gt;&lt;a href="http://jibbering.com/faq/faq_notes/closures.html"&gt;http://jibbering.com/faq/faq_notes/closures.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114961533733749947?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114961533733749947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114961533733749947' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114961533733749947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114961533733749947'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/great-info-on-closures-in-javascript.html' title='Great Info on Closures in JavaScript'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114954645801638740</id><published>2006-06-05T15:01:00.000-07:00</published><updated>2006-06-16T22:30:44.116-07:00</updated><title type='text'>SIFR Alternative - Update</title><content type='html'>I have posted the latest build of my heading replacement library at &lt;a href="http://labs.tom-lee.com/HeadingReplacement/"&gt;http://labs.tom-lee.com/HeadingReplacement/&lt;/a&gt;. This build includes numerous performance tweaks, a couple of bug fixes, and a major change to the element selection methodology.&lt;br /&gt;&lt;br /&gt;First off, I fixed Ian's bug, where some headings scrolled when highlighted by dragging the mouse. Secondly, I have greatly refined the process by which you specify which heading elements will be replaced, and in the process provided support for multiple fonts. Here's how it works:&lt;br /&gt;&lt;br /&gt;1) Specify the path to your fonts in a css font or font-family declaration. Paths must be in double or single quotes:&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;h1{&lt;br /&gt;     font-family:"Swf/FranklinGothicBook.swf", Helvetica, sans-serif;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;p&gt;Note that the font lists still work: if you don't include the JS library, the CSS selector behaves as you'd expect it to, and you'd get Helvetica.  Also, inheritance works the way you'd expect it to, and you can override the declaration later in the style sheet or in an inline style.&lt;/p&gt;&lt;p&gt;I really like this approach because it allows me to specify fonts where style information should be specified (in STYLE sheets), and it does not require a lot of JavaScript overhead for the purpose of parsing CSS selectors.   The swf path is merely passed along in the computed style of the element.  Sadly, there is no way I know of to make this approach work in Opera, as it does not support document.styleSheets and it does not pass along the swf path from the font declaration.  So, I'm making a decision at this point that I will not make any further efforts to be compatible with Opera.  I think it's a safe bet that the few people who do use Opera will not miss the smooth fonts, since the pages will gracefully degrade to normal web text anyway.  &lt;/p&gt;&lt;p&gt;My next steps will include tweaking the swf path stuff.  Presently, you specify FontName.swf and the parser changes that to FontNameV6.swf and FontNameV8.swf, both of which must be on your server.  I'd like to come up with something cleaner, more of a single font package that would work for both version 6 and 8.  Also, I have some performance tuning to do in terms of decreasing the number of function calls that are made between the swf files and the JavaScript.  I may try to create some kind of automatic switching between a high-performance and low-performance mode.&lt;/p&gt;&lt;p&gt;As always, let me know what you think of the &lt;a href="http://labs.tom-lee.com/HeadingReplacement/"&gt;demo&lt;/a&gt;!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114954645801638740?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114954645801638740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114954645801638740' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114954645801638740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114954645801638740'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/sifr-alternative-update_05.html' title='SIFR Alternative - Update'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114948354380155430</id><published>2006-06-04T21:55:00.000-07:00</published><updated>2006-06-05T12:47:31.500-07:00</updated><title type='text'>Flash 8 ExternalInterface Crash Bug</title><content type='html'>This is one of those things that you can stay up until 1 AM trying unsuccessfully to debug, and then the next morning you spot the trouble immediately.&lt;br /&gt;&lt;br /&gt;If a swf uses ExternalInterface to call a JavaScript function that removes the swf from the document, the browser will crash.  PC Firefox gives the dubiously helpful error "The plugin performed an illegal operation.  You are strongly advised to restart Firefox."&lt;br /&gt;&lt;br /&gt;Simply delay the removing call using setTimout, and all is well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114948354380155430?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114948354380155430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114948354380155430' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114948354380155430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114948354380155430'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/flash-8-externalinterface-crash-bug.html' title='Flash 8 ExternalInterface Crash Bug'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114930584708016804</id><published>2006-06-02T20:24:00.000-07:00</published><updated>2006-06-16T22:29:16.850-07:00</updated><title type='text'>SIFR Alternative - Update</title><content type='html'>As suggested by Scott Moore of nonsponsored.com, I've got dynamic font resizing for Safari 2.0 working.  Hey, nothing better to do on a Friday night!  It may work in earlier versions of Safari as well, but I have not tested it.  As before, the test page is at http://labs.tom-lee.com/HeadingReplacement/.  I'll be addressing some other issues soon.&lt;br /&gt;&lt;br /&gt;Thanks to everyone who has offered their comments so far.  I plan to put some sort of bug-tracking system in place for this project in the near future.  Hopefully it will be public so that everyone can be included in the process.  &lt;br /&gt;&lt;br /&gt;I'm also thinking about giving it an official name... I don't really like calling it "SIFR Alternative", although that does say exactly what it is.   Any suggestions?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114930584708016804?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114930584708016804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114930584708016804' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114930584708016804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114930584708016804'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/sifr-alternative-update.html' title='SIFR Alternative - Update'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114927628863775850</id><published>2006-06-02T12:06:00.000-07:00</published><updated>2006-06-16T22:28:48.820-07:00</updated><title type='text'>Eolas Workaround Fails If Triggered From Deferred Script</title><content type='html'>As a workaround to the gruesome IE Eolas patch, you must write your SWFs into the DOM from an external JavaScript library or other external source.  This can happen via a function call within the body of your document, or can be triggered by an onload event.&lt;br /&gt;&lt;br /&gt;These two triggers have their downsides.  It is often not desirable to put a JS function call within the body of your HTML document, as this makes your code more difficult to maintain.  If you have a large site, you probably want a single library that you can snap in and out at will.  A lot of function calls sprinkled throughout your site can make it difficult to remove the functionality if you need to.&lt;br /&gt;&lt;br /&gt;As far as the onload event goes, it is better to do any DOM manipulation BEFORE document.body.onload, so that if you are replacing images and so forth, they don't need to be completely loaded before they are replaced.  It's about bandwidth savings.&lt;br /&gt;&lt;br /&gt;So, I thought I'd be clever and trigger my SWF injection script when the DOM is ready, but before the page load completes by using &lt;a href="http://dean.edwards.name/weblog/2005/09/busted/"&gt;Dean Edwards IE onload solution&lt;/a&gt;.  Basically, any script that you include with "defer" in the script tag will execute when the DOM has loaded, but before document.body.onload.&lt;br /&gt;&lt;br /&gt;Unfortunately, though the swf is injected into the page properly, the Eolas patch is in full effect complete with the "Click to Activate And Use This Control" message.  &lt;a href="http://labs.tom-lee.com/ReadyState/"&gt;Check out this test page to see it for yourself&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I've tried a bunch of ways around this.  It turns out that if the SWF file is already cached, the Eolas garbage goes away, so I could possibly work out some kind of prefetch scheme.  If anyone else has come across this and has a solution, let me know!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114927628863775850?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114927628863775850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114927628863775850' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114927628863775850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114927628863775850'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/eolas-workaround-fails-if-triggered.html' title='Eolas Workaround Fails If Triggered From Deferred Script'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114927406401033363</id><published>2006-06-02T11:44:00.000-07:00</published><updated>2006-06-02T11:47:44.010-07:00</updated><title type='text'>Protecting SWFs</title><content type='html'>This is by far the most informative article I've found to date on SWF obfuscation and protection techniques.  &lt;a href="http://www.gotoandplay.it/_articles/2004/04/swfProtection.php"&gt;http://www.gotoandplay.it/_articles/2004/04/swfProtection.php&lt;/a&gt;  - I've been referencing this for years.&lt;br /&gt;&lt;br /&gt;Posting it so I never lose it - it wasn't easy to find.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114927406401033363?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114927406401033363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114927406401033363' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114927406401033363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114927406401033363'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/protecting-swfs.html' title='Protecting SWFs'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114920182455859759</id><published>2006-06-01T15:36:00.000-07:00</published><updated>2006-06-16T22:27:32.370-07:00</updated><title type='text'>SIFR Alternative - Demo Page</title><content type='html'>As promised, I have been working to clean up my codebase and post a working demo of my SWF Headings library. This is really a proof of concept: it has a few known issues, and is not feature-complete. At the moment, it only supports one font for all heading elements, and the methods for specifying which headings get replaced are not done. But what it does have is dynamic font resizing and dynamic text reflow.&lt;br /&gt;&lt;br /&gt;The demo is a liquid layout, so by resizing your browser window, you should see it in action! Also, be sure to do View &gt; Text Size and play with that a bit.&lt;br /&gt;&lt;br /&gt;Let me know if you have any problems, and I'll be working in the meantime to iron out the remaining issues.&lt;br /&gt;&lt;br /&gt;Without further adieu, &lt;a href="http://labs.tom-lee.com/HeadingReplacement/"&gt;the demo&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114920182455859759?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114920182455859759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114920182455859759' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114920182455859759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114920182455859759'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/06/sifr-alternative-demo-page.html' title='SIFR Alternative - Demo Page'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114851227228297271</id><published>2006-05-24T15:35:00.000-07:00</published><updated>2006-05-24T16:11:34.513-07:00</updated><title type='text'>SIFR3 - An Alternative</title><content type='html'>SIFR is an awesome concept. I hate sacrificing the visual quality of my web sites in favor of accessibility and search engine compatibility, and so when I learned about SIFR I immediately fell in love with the idea. Its not great that we have to resort to these kinds of things to achieve our web design goals, but if it works well, then why not?&lt;br /&gt;&lt;br /&gt;As I started using SIFR 2, I became more aware of its limitations. SIFR doesn't allow for dynamic text re-flow (which is vital to liquid layouts). Also, if you modify the text size of your page using View &gt; Text Size (or equivalent), SIFR doesn't resize the text for you. These are not deal breakers, since SIFR is still better than using images. But these limitations are nonetheless a "stone in my shoe", as it were. People (my clients and end users alike) don't care if you're using Flash to display the headers, as long as they don't notice it. But as soon as they try to change font sizes and it doesn't work, they begin to become dissatisfied with the work.&lt;br /&gt;&lt;br /&gt;Also, I found SIFR 2 difficult to configure. It was quite a chore to get it to work in my layouts, and the process of updating a special SIFR stylesheet was not intuitive.  Also, I had to explain to the other developers why we had to include this whacky css file in the first place.&lt;br /&gt;&lt;br /&gt;As SIFR 3 did not seem to be on the horizon, I began developing my own version.  My goal was to create a SWF header replacement solution that supported dynamic text reflow, on-the-fly text resizing, and did not require special stylesheets.  Ideally, it would get all same style information as the headers it would replace, and be a truly seamless integration.  Also, it would be compatible with Flash Player 6 and higher, take advantage of Flash 8 font technology where available, and be compatible with as wide a range of browsers as possible.&lt;br /&gt;&lt;br /&gt;I borrowed some ideas from the SIFR 2 libraries (standing on the shoulders of giants), and discarded others.  Things like browser detection and cross-platform compatibility were abstracted into other parts of my overall JS framework.  And I tested, tested, and tested some more.&lt;br /&gt;&lt;br /&gt;And in the end, I was successful.  I met every objective I set out to achieve.  So now I'm considering releasing the source code into the public domain.  I've seen the &lt;a href="http://novemberborn.net/sifr3/feature-list-1"&gt;feature list for SIFR 3&lt;/a&gt;, which is currently in Alpha, and I've seen the &lt;a href="http://dev.novemberborn.net/sifr3/alpha/demo/"&gt;Alpha page&lt;/a&gt; too, and I'm not sure whether SIFR 3 will support text reflow as my library does.  Also not sure whether it will allow you to set the size of the text using your browser.  So, I think there's a possibility my library will be useful to some people. &lt;br /&gt;&lt;br /&gt;I don't consider my work to be competing with SIFR at all.  I have no intention of matching SIFR feature-for-feature, since I'd rather just use SIFR than do all that development and testing myself.  But I do think my work is pretty good, and I'd like to see it help someone other than me.  So, in the near future I'll be scrubbing the code, writing a little documentation, and posting a demo page where you can see it in action.&lt;br /&gt;&lt;br /&gt;Let me know if you think you would find a SIFR alternative useful, and I'll work to deliver a high-quality product.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114851227228297271?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114851227228297271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114851227228297271' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114851227228297271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114851227228297271'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/05/sifr3-alternative.html' title='SIFR3 - An Alternative'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114841894249085789</id><published>2006-05-23T14:02:00.000-07:00</published><updated>2006-05-23T15:08:06.226-07:00</updated><title type='text'>&lt;DL&gt; within &lt;CITE&gt; in Mozilla</title><content type='html'>Another arcane css issue... Sometimes I like to use a definition list within a cite element to display the name and title of a person I am quoting, like this:&lt;br /&gt;&lt;br /&gt;&amp;lt;blockquote&amp;gt;I am not a crook.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;&amp;lt;cite&amp;gt;&lt;br /&gt;&amp;lt;dl&amp;gt;&lt;br /&gt;&amp;lt;dt&gt;Richard Nixon&amp;lt;/dt&amp;gt;&lt;br /&gt;&amp;lt;dd&gt;President, USA&amp;lt;/dt&amp;gt;&lt;br /&gt;&amp;lt;/dd&amp;gt;&amp;lt;/dl&amp;gt;&lt;br /&gt;&amp;lt;/cite&amp;gt;&lt;br /&gt;&lt;br /&gt;To me, this makes semantic sense. The cite tag is used to show that the information within it is the citation for what's in the blockquote, and the definition "President, USA" defines the term "Richard Nixon". The advantage to all this markup is that now I have style hooks to work with.&lt;br /&gt;&lt;br /&gt;The problem is that in Mozilla browsers, if you make "cite" a block element, it will not contain the definition list within it. In fact, it doesn't seem to matter what you put in it. If, for example, you want to give the cite a border, the child element will appear outside the border.&lt;br /&gt;&lt;br /&gt;Adding a span tag around the child element fixes the problem:&lt;br /&gt;&lt;br /&gt;&amp;lt;blockquote&amp;gt;I am not a crook.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;&amp;lt;cite&amp;gt;&lt;br /&gt;&amp;lt;span&amp;gt;&lt;br /&gt;&amp;lt;dl&amp;gt;&lt;br /&gt;&amp;lt;dt&gt;Richard Nixon&amp;lt;/dt&amp;gt;&lt;br /&gt;&amp;lt;dd&gt;President, USA&amp;lt;/dt&amp;gt;&lt;br /&gt;&amp;lt;/dd&amp;gt;&amp;lt;/dl&amp;gt;&lt;br /&gt;&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;lt;/cite&amp;gt;&lt;br /&gt;&lt;br /&gt;This is cruft, and I hate it. But it's the best fix I've found so far. Anyone else got a solution?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114841894249085789?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114841894249085789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114841894249085789' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114841894249085789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114841894249085789'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/05/in-mozilla.html' title='&amp;lt;DL&amp;gt; within &amp;lt;CITE&amp;gt; in Mozilla'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114729190024894470</id><published>2006-05-10T13:07:00.000-07:00</published><updated>2006-05-10T13:11:40.263-07:00</updated><title type='text'>Select Blocks (Not Rows) of Text</title><content type='html'>I always forget how to do this, so I figured I'd post it here.&lt;br /&gt;&lt;br /&gt;To select a block of text in some applications, hold ALT + SHIFT while dragging.  Try it, you'll like it!&lt;br /&gt;&lt;br /&gt;I'm not sure what programs this works in, although it seems to work in most Microsoft apps.&lt;br /&gt;&lt;br /&gt;Sadly, this trick doesn't seem to work in Dreamweaver or Flash.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114729190024894470?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114729190024894470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114729190024894470' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114729190024894470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114729190024894470'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/05/select-blocks-not-rows-of-text.html' title='Select Blocks (Not Rows) of Text'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114714522750414866</id><published>2006-05-08T20:09:00.000-07:00</published><updated>2006-05-08T20:27:07.536-07:00</updated><title type='text'>Playing with Flex 2 Beta 3</title><content type='html'>Had to download and install Flex 2 Beta 3 as soon as I heard about it. I like the new welcome screen, although I doubt I'll look at it any more than the last one. I thought it was interesting that they actually performed usability testing on this, and &lt;a href="http://kuwamoto.org/2006/04/29/sneak-peek-at-flex-beta-3/"&gt;discovered that most people skipped it&lt;/a&gt;.  That's what people DO with welcome screens, after all: skip them, and never return.&lt;br /&gt;&lt;br /&gt;I quickly migrated some of my test projects over to the new beta, and compiled them.  After a bit of fiddling, and referencing &lt;a href="http://labs.adobe.com/wiki/index.php/Flex:Beta_2_to_Beta_3_Changes"&gt;this page&lt;/a&gt; heavily, I was able to get them to work.  &lt;br /&gt;&lt;br /&gt;Some thoughts regarding the changes:&lt;br /&gt;&lt;br /&gt;1) The StringBuilder class is gone, the reason given being that the performance gain it achieved was not enough to justify having two string manipulation classes.  Now, I'm all for having a clean API.  But I think I'd rather have the (mildly confusing) choice between two similar classes if it means I can have even slightly better performance.&lt;br /&gt;&lt;br /&gt;2) Trace is back out of flash.utils, so now you can call it without importing the package.  I think I liked it better in flash.utils.  The point of putting it there in the first place was (I think) to put control in the hands of the developer.  If I don't need it, why load it?  Again, convenience be damned if it makes for even SLIGHTLY poorer performance.  Plus, it just seemed at home in flash.utils, rather than floating about the ether as a global method.&lt;br /&gt;&lt;br /&gt;Anyway, that's my first quick look at things.  I will no doubt be posting more on the subject as I delve more deeply.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114714522750414866?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114714522750414866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114714522750414866' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114714522750414866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114714522750414866'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/05/playing-with-flex-2-beta-3.html' title='Playing with Flex 2 Beta 3'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114712782473749711</id><published>2006-05-08T15:23:00.000-07:00</published><updated>2006-05-08T15:37:04.766-07:00</updated><title type='text'>Best Flash Blog Ever?</title><content type='html'>In my book, the title might go to &lt;a href="http://www.kaourantin.net/"&gt;this man&lt;/a&gt;, who is an engineer at Macrome... er... Adobe and works on the Flash Player.  Every time he posts, I learn something new about the internals of the Player, or how decisions are made on the Player team.&lt;br /&gt;&lt;br /&gt;Today's &lt;a href="http://www.kaourantin.net/2006/05/frame-rates-in-flash-player.html"&gt;post on frame rates&lt;/a&gt; was typical Tinic quality.  I had always wondered about why frame rates can be so imprecise, and now I know... in detail.&lt;br /&gt;&lt;br /&gt;Also, he always seems to convey a healthy irreverence for the Player as a piece of software.  He's not afraid to point out flaws or room for improvement.  Now, if we can just get him to post more frequently!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114712782473749711?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114712782473749711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114712782473749711' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114712782473749711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114712782473749711'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/05/best-flash-blog-ever.html' title='Best Flash Blog Ever?'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114600415203737051</id><published>2006-04-25T15:20:00.000-07:00</published><updated>2006-05-01T18:42:21.223-07:00</updated><title type='text'>Dynamically Inserting FSCommand-Capable Flash Objects With innerHTML</title><content type='html'>Let me preface this post by saying that if you've never tried to dynamically write a bunch of FSCommand-enabled swfs into an HTML page, you'll probably be really confused by what follows.  In point of fact, there's a good likelihood you'll be confused anyway, since my writing is not particulary lucid.  But glean what you can.  Forging ahead...&lt;br /&gt;&lt;br /&gt;Suppose you have a series of SWF files to dynamically insert into a page (maybe, just maybe, as a result of the infernal Eolas patch) and these SWF files need to communicate via FSCommand. You must also add a script block for each swf, to capture the FSCommand calls. Typically, this would be a block of VB Script, like the one Flash puts into the HTML files it publishes with your SWF.&lt;br /&gt;&lt;br /&gt;Now suppose we have the filenames of the swfs in an array, and we want to loop through the array and write each swf into the document.  We need to dynamically create an ID for each one, create a VBScript for it, and then insert them into the document.  Since you can't use innerHTML to insert VB Script, you have to use the DOM:&lt;br /&gt;&lt;br /&gt;for(var i=0; i &lt; swfArray.length; i++){&lt;br /&gt;     var mySwfId = "swf"+i;&lt;br /&gt;&lt;br /&gt;     var myVB = document.createElement("script");&lt;br /&gt;     myVB.language = "VBScript";&lt;br /&gt;     myVB.text = "Sub "+mySwfId+"_FSCommand(ByVal command, ByVal args) \n call "+mySwfId+"_DoFSCommand(command, args) \n end sub ";&lt;br /&gt;     // Insert the VBScript into the Head element&lt;br /&gt;     document.getElementsByTagName("head")[0].appendChild(myVB);&lt;br /&gt;     &lt;br /&gt;     // Insert the swf into the target element&lt;br /&gt;     var mySwf = '&lt; object id='+mySwfId+' ... swf code omitted ... &lt; / object&gt;';&lt;br /&gt;     targetElement.innerHTML = mySwf;   &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This method works pretty well as long as the VBScript is inserted before the swf is, and as long as you're doing this before the page load completes.  For some reason, the VBScript doesn't seem to work if it is written into the page after loading completes.  I fooled around with some techniques for simulating onDomReady in IE, but while some of them worked locally, none of them worked under live network conditions.  This meant that I had to put my init() call before the closing body tag, which I hate to do because it makes my code less maintainable.&lt;br /&gt;&lt;br /&gt;Happily, it turns out that you can use JavaScript instead of VBScript if you prefer, and JavaScript is much more forgiving in this matter.  You can also insert the JavaScript via the innerHTML property:&lt;br /&gt;&lt;br /&gt;for(var i=0; i &lt; swfArray.length; i++){&lt;br /&gt;     var mySwfId = "swf"+i;&lt;br /&gt;&lt;br /&gt;     var myJS =  '&lt; script event=FSCommand(command,args) for='+mySwfId+'&gt;\n '+mySwfId+'_DoFSCommand &lt;\ /script&gt;';&lt;br /&gt;     &lt;br /&gt;     var mySwf = '&lt; object id='+mySwfId+' ... swf code omitted ... &lt; / object&gt;';&lt;br /&gt;     &lt;br /&gt;    // Insert the swf and the JavaScript into the target element.&lt;br /&gt;     targetElement.innerHTML = mySwf+myJS;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The order here is important: the JS must be inserted AFTER the swf for it to work if the swf is inserted after page load. If you insert the swf onDomReady, it seems to work in either order.  I always add the JS after the swf just to be on  the safe side.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.metawrap.com/blog/DynamicGenerationOfFlashElementsThatUseFSCommandJavaScriptAndVBScriptDoNotWorkViaInnerHTML.aspx"&gt;Here's where I found out about using JavaScript instead of VBScript to catch the FSCommand calls.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I know this post is a bit confusing, since the code is pseudo-code and out of context.  But I'll do my best to answer any questions you might have.  At any rate, maybe this will help someone who, like me, was Googling for hours trying to find the answer to this obscure question.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114600415203737051?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114600415203737051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114600415203737051' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114600415203737051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114600415203737051'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/04/dynamically-inserting-fscommand.html' title='Dynamically Inserting FSCommand-Capable Flash Objects With innerHTML'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114590183298069272</id><published>2006-04-24T10:52:00.000-07:00</published><updated>2006-04-24T11:56:50.846-07:00</updated><title type='text'>IE bug:  background-image and :hover kills page load status</title><content type='html'>This bug relates to anchor tags with a background-image defined on the hover pseudo-class, as follows:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;a:hover{&lt;br /&gt;background-image:url("yourimage.gif");&lt;br /&gt;} &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;When the user clicks this link and then moves their mouse off of the link, Internet Explorer's page load status indicators (the wavy Windows animation in the upper right corner of the browser, as well as the status-bar at the bottom of the browser) will revert to their default states, seemingly indicating that nothing is loading. However, the requested page actually IS loading, and will appear when the process is complete.&lt;br /&gt;&lt;br /&gt;This is most noticeable when submitting a form, or with high-latency network conditions.&lt;br /&gt;&lt;br /&gt;There is a workaround, although it is imperfect:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;a:active{&lt;br /&gt;background-image:none;&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;This works well, although if the user clicks anywhere on the screen, the link will revert to its default state, and the load status indicators will go to their default states as well, showing no page load activity.&lt;br /&gt;&lt;br /&gt;See &lt;a href="http://www.nabu-beraterteam.de/dev/ie6-bg-img-link/"&gt;http://www.nabu-beraterteam.de/dev/ie6-bg-img-link/&lt;/a&gt; for more information. This bug may be related to the &lt;a href="http://www.brunildo.org/test/IEAbackima.html"&gt;IE background-image caching flicker bug&lt;/a&gt;, although applying the IIS fixes did not resolve the problem for me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114590183298069272?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114590183298069272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114590183298069272' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114590183298069272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114590183298069272'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/04/ie-bug-background-image-and-hover.html' title='IE bug: &lt;a&gt; background-image and :hover kills page load status'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114547677215274308</id><published>2006-04-19T12:53:00.000-07:00</published><updated>2006-04-19T12:59:32.170-07:00</updated><title type='text'>Flash Minutia: getURL("javascript:function();") fails on Mac Opera 8.0</title><content type='html'>Using the getUrl command to call a javascript function from a swf fails on Opera 8.0 for the Mac.  For example, the following code:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;getURL("javascript:alert('Hello World');");&lt;/blockquote&gt;&lt;br /&gt;should cause a dialog box to appear.  However, in Opera 8.0 for the Mac, it does not.&lt;br /&gt;&lt;br /&gt;The fix, as described by Alex at &lt;a href="http://www.linecraft.com/b2/index.php"&gt;Linecraft Blog&lt;/a&gt; is to ensure that the AllowScriptAccess parameter of your embed or object statement is set to "always", or to simply omit the AllowScriptAccess parameter altogether, which has the same effect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114547677215274308?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114547677215274308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114547677215274308' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114547677215274308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114547677215274308'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/04/flash-minutia-geturljavascriptfunction.html' title='Flash Minutia: getURL(&quot;javascript:function();&quot;) fails on Mac Opera 8.0'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114496816136352481</id><published>2006-04-13T15:32:00.000-07:00</published><updated>2006-06-16T22:27:00.293-07:00</updated><title type='text'>More IE Fieldset Wackiness</title><content type='html'>If you have a legend element styled position: relative; within a fieldset, the top border of the fieldset will be pushed down the page.  The amount the top border of the fieldset is pushed down the page is equal to the height of the content preceding the fieldset.&lt;br /&gt;&lt;br /&gt;This is true only for the first fieldset on the page.  Subsequent fieldsets will display normally, regardless of whether their legend elements use position:relative.  See the &lt;a href="http://labs.tom-lee.com/fieldsettest2.html"&gt;test page&lt;/a&gt; for a demonstration.&lt;br /&gt;&lt;br /&gt;The good news is, there is a fix: simply applying position:relative to the fieldset element in addition to the legend element will fix the bug.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114496816136352481?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114496816136352481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114496816136352481' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114496816136352481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114496816136352481'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/04/more-ie-fieldset-wackiness.html' title='More IE Fieldset Wackiness'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114496288352645992</id><published>2006-04-13T13:47:00.000-07:00</published><updated>2006-06-16T22:26:12.193-07:00</updated><title type='text'>Fieldset Border Bug in IE</title><content type='html'>There are many problems with the way that fieldsets are rendered across virtually all browsers. This is yet another for the IE pile, and it only happens in obscure circumstances, so I'm not too surprised I haven't seen it posted elsewhere.&lt;br /&gt;&lt;br /&gt;If you apply a negative margin to the top or bottom of an input or select element in a fieldset that has a legend, the top border of the fieldset will be repeated at the position of each input or select element. Sound a little murky? Check out the &lt;a href="http://labs.tom-lee.com/fieldsettest.html"&gt;test page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The test page has a strict doctype, but the bug also occurs with transitional doctypes. I've confirmed the bug in IE 5, IE 5.5, and IE 6.  Let me know if you have a workaround!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114496288352645992?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114496288352645992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114496288352645992' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114496288352645992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114496288352645992'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/04/fieldset-border-bug-in-ie.html' title='Fieldset Border Bug in IE'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114485494436690778</id><published>2006-04-12T08:07:00.000-07:00</published><updated>2006-04-12T08:15:44.386-07:00</updated><title type='text'>Flash Quirk: ExternalInterface IE "Expected ;" Bug</title><content type='html'>This information applies to Flash Player 8,5,0,246 and may also apply to other versions. &lt;br /&gt;&lt;br /&gt;If you use an integer for the id of your swf object element, ExternalInterface.call will fail and IE will report a script error:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Expected: ';'&lt;/blockquote&gt;&lt;br /&gt;The solution is to not use integers for element ids.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114485494436690778?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114485494436690778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114485494436690778' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114485494436690778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114485494436690778'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/04/flash-quirk-externalinterface-ie.html' title='Flash Quirk: ExternalInterface IE &quot;Expected ;&quot; Bug'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114470831838416020</id><published>2006-04-10T15:23:00.000-07:00</published><updated>2006-04-10T15:31:58.413-07:00</updated><title type='text'>Open Source CSS Helper Library - What features would you like to see included?</title><content type='html'>I plan on releasing a library of JS functions designed to provide functionality for CSS properties that Internet Explorer does not support.  It will work in conjunction with the IE-only expression operator.  This will be an open source effort, so it will be free to use, but it will adhere to the strict standards of quality I follow in my professional work.&lt;br /&gt;&lt;br /&gt;I intend to do the usual min-width, max-width, min-height, max-height, etc.  Which CSS properties would you like to see support for?  Let me know, and I'll do my best to include them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114470831838416020?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114470831838416020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114470831838416020' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114470831838416020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114470831838416020'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/04/open-source-css-helper-library-what.html' title='Open Source CSS Helper Library - What features would you like to see included?'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114459992918713618</id><published>2006-04-09T09:15:00.000-07:00</published><updated>2006-04-09T09:25:29.253-07:00</updated><title type='text'>Windows XP Service Pack 1 with Apple Bootcamp - DON'T TRY IT</title><content type='html'>I wasn't able to immediately get my hands on a Win XP disc with Service Pack 2 included, so I decided I'd try a Service Pack 1 installation.  Everything went normally, until the very last step when Windows reboots your computer, which it failed to do.  I manually rebooted the system, and was able to bring up Windows, but the Mac drivers would not install on SP1.&lt;br /&gt;&lt;br /&gt;Now, this is a bad thing, because that includes the ethernet drivers.  They wouldn't install either.  No internet, no upgrade to Service Pack 2.&lt;br /&gt;&lt;br /&gt;I downloaded SP2 on another machine, burned it to CD, and tried to update the SP1 installation.  This failed as well. &lt;br /&gt;&lt;br /&gt;Ultimately, I had to remove the partition I had made with Bootcamp and start the whole process over again, this time with a WinXP Sp2 disc in hand.  This time, everything went smoothly.  The whole ordeal makes for a long and boring Saturday night, so I recommend against making the attempt with Service Pack 1.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114459992918713618?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114459992918713618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114459992918713618' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114459992918713618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114459992918713618'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/04/windows-xp-service-pack-1-with-apple.html' title='Windows XP Service Pack 1 with Apple Bootcamp - DON&apos;T TRY IT'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114454455877350239</id><published>2006-04-08T17:59:00.000-07:00</published><updated>2006-04-08T18:02:38.803-07:00</updated><title type='text'>Installing Windows on My New Mac Mini</title><content type='html'>Well, I took the leap and bought my dual-core Mac Mini today... Everything about the experience has been awesome so far, except installing Windows on it.  That is to say, Bootcamp is working perfectly, and the installation is working perfectly, but I am reminded anew of just how much Windows installations suck.  Tonight I will probably have "Setup will complete in approximately: 36 minutes" stamped across all my dreams.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114454455877350239?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114454455877350239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114454455877350239' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114454455877350239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114454455877350239'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/04/installing-windows-on-my-new-mac-mini.html' title='Installing Windows on My New Mac Mini'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114425336897336739</id><published>2006-04-05T08:12:00.000-07:00</published><updated>2006-04-05T09:09:29.086-07:00</updated><title type='text'>Windows on a Mac, or The Final Nail in the Wintel Coffin</title><content type='html'>As an art student, I was educated on Macs, but I never could understand why all my colleagues were so in love with them. Yes, the colors on the display were more natural. Theoretically, they could crunch graphics faster than Wintel machines, but the Wintel machines had faster processors, so they seemed about equal to me. When the G2s in the lab broke (which they frequently did) you couldn't really fix them. When they became outdated, you couldn't go down to Staples and snag some new hardware for them.&lt;br /&gt;&lt;br /&gt;Fast-forward to Christmas 2005. I have 16 hours of digital footage of my son that I need to edit down to a 45-minute DVD. The import process on my 3GHZ 1GB RAM Wintel box is going poorly. Video is coming in with huge green blocky artifacts, and Windows Movie Maker (or whatever it's called) is unusably slow. Even the mighty Adobe Premiere has been brought to its knees. Hours of trying to tweak out performance bottlenecks have proven fruitless. The Mac Mini on my desk (that I only use for cross-platform compatibility checks) is giving me a shy little wink.&lt;br /&gt;&lt;br /&gt;"This thing has firewire? Ok, let's give it a whirl", I think to myself. Within minutes, I've got iMovie importing my footage flawlessly. Editing is a breeze with no signs of sluggishness in the UI. It just works. Granted, it took 14 hours to export a disc image from iDVD (a known issue), but I was asleep for most of it, so I didn't really care.&lt;br /&gt;&lt;br /&gt;Fast-forward again to the present. I have a workstation at home that needs to be replaced (433 MHz PII with a fan that sounds like a llama giving birth), and the dual-core Macs are looking mighty sexy. That slick OSX interface is calling to me. The comparitively garish color pallete of my Wintel machine is beginning to finally destroy my retinas.  Windows Vista will likely not ship until 2007.  But I have all this Windows software... I can't afford to run out and buy Mac versions of Studio MX and Creative Suite (especially since CS2 will &lt;a href="http://blogs.adobe.com/scottbyer/2006/03/macintosh_and_t.html"&gt;probably never be a Universal Binary&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Enter &lt;a href="http://www.apple.com/macosx/bootcamp/"&gt;Apple Bootcamp&lt;/a&gt;.  This has finalized my decision to buy a Mac.  With Bootcamp, Apple is releasing an officially supported means of dual-booting your Intel-based Mac with Windows and OSX.  This will allow me to continue to use my legacy Windows apps, while slowly migrating over to a total Mac environment.  My wallet likes slow transitions.&lt;br /&gt;&lt;br /&gt;I wonder how many other Windows users are in the same situation?  The move to Intel chipsets and dual-booting with Windows seems like a smart strategy for Apple.  With the ubiquity of Apple stores in major cities, it's now easier than ever to get supplies and support for Macs.  The popularity of the iPod has done awesome things for the Apple brand. &lt;br /&gt;&lt;br /&gt;It seems like a lot of pieces are coming together in Apple's favor.  I, for one, am finally convinced.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114425336897336739?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114425336897336739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114425336897336739' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114425336897336739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114425336897336739'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/04/windows-on-mac-or-final-nail-in-wintel.html' title='Windows on a Mac, or The Final Nail in the Wintel Coffin'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114420226645032604</id><published>2006-04-04T18:45:00.000-07:00</published><updated>2006-04-04T18:58:38.816-07:00</updated><title type='text'>Comma operator in ECMA script</title><content type='html'>From &lt;a href="http://72.14.203.104/search?q=cache:mbF0mOg3oUoJ:www.jasonkarldavis.com/articles/gir/+IE+CSS+expressions+Active+scripting+disabled&amp;hl=en&amp;amp;gl=us&amp;ct=clnk&amp;amp;cd=1"&gt;this page&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;Enter a technique I discovered out of necessity, which I call "one-time use expression()". It relies upon the rarely used comma operator in ECMAScript. The expression expr1, expr2 evaluates both expressions, but returns only the value of the second. So we do 2 things inside expression() using this. The first being our dirty deed, secretly inserting markup into the header. The second removes the mechanism we utilized itself! We simply set the value of the property to "none", overriding the current expression() value. It goes away, but leaves the inserted markup. This hack effectively allows "CSS" (I'll use the term loosely) content-generation in IE4+ in Windows! The limitation being, of course, that one must have scripting enabled. Some have told me that expression() works with scripting disabled (that would be a serious security issue in IE, which wouldn't be surprising in the least), however my tests seem to indicate otherwise. &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I had seen this done in IE expressions before, but had never seen an explanation of how/why it worked.  Firing up Flash to see if the comma operator works in ActionScript...&lt;br /&gt;&lt;br /&gt;...and it does!!  Really cool!  I can see the uses for the comma operator as a shortcut syntax, and perhaps as a weak-strength obfuscation technique, but aside from IE expressions, I can think of no other practical use for it.  Everything you can do with it can already be done with other, more maintainable techniques.  Am I missing something??&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114420226645032604?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114420226645032604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114420226645032604' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114420226645032604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114420226645032604'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/04/comma-operator-in-ecma-script.html' title='Comma operator in ECMA script'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114373935486374570</id><published>2006-03-30T09:16:00.000-08:00</published><updated>2006-03-30T09:22:34.883-08:00</updated><title type='text'>IE CSS Expressions - Javascript Disabled</title><content type='html'>On my test machine, I have found that IE's proprietary CSS expressions do not work with JavaScript disabled.  This is in conflict with a number of postings on the subject, including &lt;a href="http://www.positioniseverything.net/articles/sidepages/jello-piefecta-clean.html"&gt;this one&lt;/a&gt; at Position Is Everything.  Midway down the page, it says:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;The upper limit is enforced by a max-width on #sizer, and IEwin is included&lt;br /&gt;via an "expression" hidden in a Conditional Comment in the head. While this is a&lt;br /&gt;script, the user cannot disable this type of CSS expression when disabling&lt;br /&gt;JavaScript.&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I'm thinking that this probably USED to be true, and has since been changed by a security patch.  Does anyone know for sure?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114373935486374570?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114373935486374570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114373935486374570' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114373935486374570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114373935486374570'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/03/ie-css-expressions-javascript-disabled.html' title='IE CSS Expressions - Javascript Disabled'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114368732410056504</id><published>2006-03-29T18:37:00.000-08:00</published><updated>2006-03-29T18:57:17.963-08:00</updated><title type='text'>Differences between Element.offsetWidth and CSS width property</title><content type='html'>I'm sure most CSS jockeys are probably already aware of this, but I'll make a note of it for posterity.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;This information is specifically for IE6 in Strict mode. Other browsers differ in their implementation of the box model.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;The width property in CSS and the offsetWidth property in JavaScript are two very different things. For example, if you set an element's width to 500px in CSS, the element's offsetWidth may not be 500, depending on the margins, borders, and padding you have applied to the element. Here's how it breaks down:&lt;br /&gt;&lt;br /&gt;Element.offsetWidth = CSS width + total horizontal padding width + total horizontal border width&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;div style="BORDER-RIGHT: green 5px solid; PADDING-RIGHT: 5px; BORDER-TOP: green 5px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; MARGIN: 5px; BORDER-LEFT: green 5px solid; WIDTH: 300px; PADDING-TOP: 5px; BORDER-BOTTOM: green 5px solid"&gt;width:300px, border:5px solid green, padding:5px, margin:5px&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;In IE6 strict mode, the offsetWidth will return 320, rather than 300 as you might expect. Also, offsetWidth does not include the margin, so to get the actual width that the element takes up on the screen, you have to add the total horizontal margin to the offsetWidth.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114368732410056504?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114368732410056504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114368732410056504' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114368732410056504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114368732410056504'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/03/differences-between-elementoffsetwidth.html' title='Differences between Element.offsetWidth and CSS width property'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114360041287626032</id><published>2006-03-28T18:19:00.000-08:00</published><updated>2006-06-16T22:25:22.183-07:00</updated><title type='text'>Max-width in IE Using a CSS Expression</title><content type='html'>This post is a continuation of the "&lt;a href="http://tom-lee.blogspot.com/2006/03/how-many-pixels-in-em-part-2.html"&gt;How Many Pixels in an EM?&lt;/a&gt;" series I have been working on, although now that I know exactly how to calculate the number of pixels in an em, I've moved on to refining other aspects of the expression itself, and so I've decided to move away from that title.&lt;br /&gt;&lt;br /&gt;I contacted &lt;a href="http://www.svendtofte.com/code/max_width_in_ie/"&gt;Svend Tofte&lt;/a&gt; himself regarding this work, and he took time away from his very busy schedule to give me some very valuable feedback (many thanks to Svend!). He pointed out to me that expressions that may work well in quirks mode can cause the browser to crash in strict mode, due to differences in the box model than can trigger infinite loops.&lt;br /&gt;&lt;br /&gt;As I am no stranger to danger, I slapped a strict doctype on my test page and... voila... brought my mighty workstation to its knees. CTRL-ALT-DELETE did nothing. I actually had to manually switch off the box for the first time ever.&lt;br /&gt;&lt;br /&gt;As soon as I could power back up, I removed all margins, padding, and borders from my test elements, loaded the page, and started resizing my browser like a madman. The divs scaled perfectly this time... No locked-up IE, no smoke coming off my CPU, just good old-fashioned max-width joy.&lt;br /&gt;&lt;br /&gt;To make this long story short (or at least a reasonable length) I did some investigating and found that you have to factor in the total width of your margins, padding, and borders in order to use the expression safely in strict mode. Since you're testing the offsetWidth and then setting the CSS width property, you have to compensate for &lt;a href="http://tom-lee.blogspot.com/2006/03/differences-between-elementoffsetwidth.html"&gt;the differences between the two&lt;/a&gt;. Otherwise, it is possible for the expression to enter an infinite loop where setting the width of the element causes the parent element to change its size, which again fires the expression, and so on.&lt;br /&gt;&lt;br /&gt;Without further adieu, here is the expression in all its hairy glory:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;width:expression((this.parentElement.offsetWidth - (parseInt(this.parentElement.currentStyle.paddingLeft)+parseInt(this.parentElement.currentStyle.paddingRight)+parseInt(this.parentElement.currentStyle.borderLeftWidth)+parseInt(this.parentElement.currentStyle.borderRightWidth)))&lt;br /&gt;&gt; ( Math.round((30*(screen.deviceXDPI?screen.deviceXDPI:96)/72)*parseInt(document.body.currentStyle.fontSize)) + (parseInt(this.currentStyle.marginLeft)+parseInt(this.currentStyle.marginRight)+parseInt(this.currentStyle.paddingLeft)+parseInt(this.currentStyle.paddingRight)+parseInt(this.currentStyle.borderLeftWidth)+parseInt(this.currentStyle.borderRightWidth)))&lt;br /&gt;? "30em":"auto");&lt;/blockquote&gt;Quite a beast, no? Pretty it's not, but it works really well in strict mode, in IE 5, 5.5, and 6. With any combination of margins, borders, and padding you care to throw at it, and at any screen resolution. Don't believe me? Take a look at my &lt;a href="http://labs.tom-lee.com/max-width.htm"&gt;test page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;There are two places where you have to specify the desired max-width. Just replace the number 30 with the number of your choosing. You can also replace "auto" with another value, but I would be very careful when doing so. If that value should somehow evaluate to greater than your max-width value, I would expect to start seeing flames shooting out of your USB ports. ;) (ok, so maybe I'm being dramatic).&lt;br /&gt;&lt;br /&gt;I'll be testing variations on this expression in the near future, so stop back and check out my progress. Also, please check out &lt;a href="http://labs.tom-lee.com/max-width.htm"&gt;the test page&lt;/a&gt; and let me know how it works for you!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114360041287626032?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114360041287626032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114360041287626032' title='45 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114360041287626032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114360041287626032'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/03/max-width-in-ie-using-css-expression.html' title='Max-width in IE Using a CSS Expression'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>45</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114357590475871088</id><published>2006-03-28T11:54:00.000-08:00</published><updated>2006-03-28T11:58:34.840-08:00</updated><title type='text'>Bump Mapping in Flash 8</title><content type='html'>&lt;a href="http://www.unitzeroone.com/blog/flash_examples/flash_8_example_3d_bumpmapping_using_filters_source_included.html"&gt;This is just awesome&lt;/a&gt;. Ralph Hauwert at &lt;a href="http://www.unitzeroone.com/"&gt;http://www.unitzeroone.com/&lt;/a&gt; is doing some great stuff in the "you mean you can do that in Flash?!!" department. I'm curious to see how these techniques become utilized in real-world artwork, as opposed to the laboratory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114357590475871088?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114357590475871088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114357590475871088' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114357590475871088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114357590475871088'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/03/bump-mapping-in-flash-8.html' title='Bump Mapping in Flash 8'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114357480770393626</id><published>2006-03-28T11:29:00.000-08:00</published><updated>2006-03-28T11:40:07.723-08:00</updated><title type='text'>Technique: Google Analytics for Dynamic Pages</title><content type='html'>I'm evaluating Google Analytics, and I'm fairly impressed so far.  Not bad, for free stuff!&lt;br /&gt;&lt;br /&gt;The first question that I had after reading the installation notes was "How do I track different states of a dynamic page?".   For example, it is quite common to use Panel controls in ASP.Net to show different steps in a multi-step form, rather than having a separate page for each step.  Since the Analytics urchinTracker Javascript is embedded once on each unique page, I was concerned that different states of a dynamic page would be untrackable.&lt;br /&gt;&lt;br /&gt;Fortunately, this is not the case.  You can call the urchinTracker JavaScript call from each state of your dynamic page, and simply pass it a made-up page name:&lt;br /&gt;&lt;br /&gt;urchinTracker("checkout.html")&lt;br /&gt;urchinTracker("confirm.html")&lt;br /&gt;urchinTracker("success.html")&lt;br /&gt;&lt;br /&gt;These "virtual" pages can be used by Analytics the same purposes as a real page.  See the &lt;a href="http://www.google.com/support/analytics/bin/answer.py?answer=26918&amp;query=dynamic+pages&amp;amp;topic=0&amp;type=f"&gt;Google Analytics help info&lt;/a&gt; for more.  Pretty cool!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114357480770393626?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114357480770393626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114357480770393626' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114357480770393626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114357480770393626'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/03/technique-google-analytics-for-dynamic.html' title='Technique: Google Analytics for Dynamic Pages'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114351723871918244</id><published>2006-03-27T19:29:00.000-08:00</published><updated>2006-03-27T19:40:38.733-08:00</updated><title type='text'>Transferring large files the easy way....?</title><content type='html'>I used to use Dropload, and I still hear it being recommended all the time.  However, I can't remember my account info, so I can't log in.  I have hit the "I forgot my password" link several times and never had my account info emailed to me.  I have tried to sign up for a new account several times and never succeeded.  Their FAQ's failed me, and the trouble ticket I opened was never responded to by their customer service people.&lt;br /&gt;&lt;br /&gt;So now, I am a satisfied user of &lt;a href="http://www.yousendit.com"&gt;www.yousendit.com&lt;/a&gt;.  It says what it does, it does what it says.  No account necessary, which I think is a smart move on the part of their IT people.  No account management means less work for them, and no login hassle for me.&lt;br /&gt;&lt;br /&gt;Lessons learned?  If you have a service that requires customer support, be prepared to provide it, or you'll drop your customers like some kind of... well... load.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114351723871918244?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114351723871918244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114351723871918244' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114351723871918244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114351723871918244'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/03/transferring-large-files-easy-way.html' title='Transferring large files the easy way....?'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114350619493159320</id><published>2006-03-27T15:30:00.000-08:00</published><updated>2006-03-27T16:36:39.640-08:00</updated><title type='text'>Flash Player 8: Right features, wrong time?</title><content type='html'>There was a time, not so long ago, when I used to frequently think things like "If only Flash had blur built in!!" and "Oh, for a Flash Player with Photoshop-style blend modes!".  I personally requested the latter feature for 3 major versions of the Flash Player.  I spent hours trying to discover ways of achieving those effects through other means, beating my head against the keyboard until F, G, H, and J were imprinted permanently on my forehead.  I stayed up until 4 A.M. far too often.  And, I figured out some cool stuff... all of which is, since the release of Flash Player 8, completely and utterly irrelevant.&lt;br /&gt;&lt;br /&gt;We all got used to being a bit confined.  &lt;a href="http://www.alistapart.com/articles/flashaesthetic/"&gt;An entire aesthetic&lt;/a&gt; developed around the constraints of the Flash Player, typified by 2D design, heavy strokes, flat colors, simple gradients.  This aesthetic hit the big-time with &lt;a href="http://www.macworld.com/news/2004/10/12/bono.jpg"&gt;the iPod ads&lt;/a&gt;, and a slew of others.  I didn't like the style at first, but it grew on me, or I grew with it, and it eventually took over.  Now everything that &lt;a href="http://www.billybussey.com/intro/"&gt;I used to think was awesome&lt;/a&gt; looks dated and trite.  This is a natural part of evolving as an artist, but when I realize a shift has taken place in the design world, I begin to wonder what's next.&lt;br /&gt;&lt;br /&gt;Flash 8 promised such a shift.  I anticipated its arrival with a great deal of panting and salivation... But now that it has arrived, I am unexpectedly at a loss for inspiration.  Now that I can easily layer alpha-channeled video over my whirling, swirling "vortex of infinity" background, why would I bother?  It was so much cooler when it was hard to do.&lt;br /&gt;&lt;br /&gt;I came across an &lt;a href="http://www.commarts.com/ca/coldesign/cecH_305.html"&gt;article&lt;/a&gt; last evening that I think explains part of the let-down.  In it, Cecelia Holland writes about her experience teaching inmates at a maximum security prison.  She describes how one imate would spend hours building beautifully detailed sculptures out of foil gum wrappers, the only viable medium he had available.  Another inmate was an amazing novelist: until he was released from prison, from which point he was never again able to write with the same passion or skill.&lt;br /&gt;&lt;br /&gt;The point of it all is that old adage: necessity is the mother of invention.  The inmates in Pelican Bay State Prison made beautiful art, but only because it was their only means of expression.  Now that I am out of the prison of old Flash, what will I do with new Flash?  Maybe I can violate my parole and get sentenced to life developing for Flash Lite. &lt;br /&gt;&lt;br /&gt;Or maybe I can take these new tools and apply them to my craft as a mature artist rather than as someone who is merely pushing the limits of their medium.  I used to try to discover every cool new trick I could so that my designs would be unique, or so that I could feel like I was at the top of my game.  I'm still going to do that, but now I think it will be less of an end unto itself.  Flash 8 has levelled the playing field.  Now, we all have pretty much the same toolset, regardless of our ability to hack the Flash Player.  So, what's next?  I think the future of Flash design is less about gimmicks and more about plain old artistic merit.  And that's a life sentence I can live with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114350619493159320?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114350619493159320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114350619493159320' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114350619493159320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114350619493159320'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/03/flash-player-8-right-features-wrong.html' title='Flash Player 8: Right features, wrong time?'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114261105494991427</id><published>2006-03-17T07:36:00.000-08:00</published><updated>2006-03-17T08:40:01.826-08:00</updated><title type='text'>How Many Pixels in an EM? Part 2</title><content type='html'>Yesterday, I blogged about a &lt;a href="http://tom-lee.blogspot.com/2006/03/how-many-pixels-in-em.html"&gt;formula&lt;/a&gt; I came up with for determining the number of pixels in an em. &lt;a href="http://jan.moesen.nu/"&gt;Jan&lt;/a&gt; commented that perhaps this approach isn't such a good idea, because it might break when someone changes the font-size of their OS. This is actually not the case: changing the font-size in your OS doesn't change the pixel size of a point or an em.&lt;br /&gt;&lt;br /&gt;However, Jan's comment prompted me to dig a little deeper. Can the size of an em change based on the screen resolution? Turns out, it does. At least according to &lt;a href="http://style.cleverchimp.com/font_size_intervals/altintervals.html"&gt;this article&lt;/a&gt;, which I can only assume is correct given my lack of different displays to test it on. About mid-way down the page, in a lovely yellow block, is the following critical information:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Pixels per em is a crucial concept. As much as any other single factor&lt;br /&gt;(such as &lt;a href="http://www.w3.org/TR/REC-CSS2/fonts.html#propdef-font-size-adjust"&gt;ex-height&lt;/a&gt;), it determines the legibility of characters on screen at a nominal point size. The higher the ppem, the better defined are the characters' features, and the more and larger decrements are possible before hitting the legibility floor. If the ppem of the base size is low, fewer and smaller steps are&lt;br /&gt;possible.&lt;br /&gt;&lt;br /&gt;Pixels-per-em refers to the number of screen pixels required to render the &lt;a href="http://css.nu/articles/typograph1-en.html#Ch23"&gt;em&lt;/a&gt; of a font at a size given in points.&lt;br /&gt;&lt;br /&gt;A point is 1/72". On a system displaying 72 pixels per logical inch (Mac OS standard ppi), 1 point equals 1 pixel. On a system displaying 96 or 120 ppi (standard Windows settings), 1 point equals 1.333 or 1.667 pixels, respectively. The formula for ppem is a(b/72), where a is the font size, and b is the logical resolution figure.&lt;br /&gt;&lt;br /&gt;For example, 12 points at 72 ppi (the legacy Mac OS browser default) or 9 points at 96ppi have a ppem value of 12. Twelve points at 96ppi (the legacy Windows browser default), or 16 points at 72ppi both have a ppem of 16. Twelve points at 90ppi have 15ppem, and 12 points at 120 ppi (Windows "large fonts") have 20ppem.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Nice. This both proves my formula, and puts a monkey wrench in it. If someone has changed their display resolution from the Windows default 96ppi, the formula is no longer accurate. &lt;br /&gt;&lt;br /&gt;All is not lost. Since we're dealing with an IE-only expression to begin with, we can take advantage of an IE-only JavaScript property, screen.deviceXDPI. Our expression becomes:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;width:expression( document.body.clientWidth &gt;&lt;br /&gt;(30*(screen.deviceXDPI/72))* parseInt(document.body.currentStyle.fontSize)?&lt;br /&gt;"30em": "auto" );&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;This expression would yield a max-width of 30em.  Naturally, it couldn't be this easy... Now, the expression no longer works in IE 5 or IE 5.5 because they don't support our new best friend, the deviceXDPI property.  Well, I don't have too much of a problem with that.  Out of the 5% or so of my visitors who have IE5 or IE5.5, how many of those would also have changed their display DPI?  I think not many.  But, just so the expression degrades well, let's test for the existence of the deviceXDPI property and adjust accordingly:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;width:expression(document.body.clientWidth &gt;&lt;br /&gt;(30*((screen.deviceXDPI?screen.deviceXDPI:96)/72))*&lt;br /&gt;parseInt(document.body.currentStyle.fontSize)? "30em": "auto" );&lt;/blockquote&gt;&lt;br /&gt;In this (increasingly long) expression, if screen.deviceXDPI is undefined, the default value of 96ppi is used.  That oughtta do it.  Comments?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114261105494991427?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114261105494991427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114261105494991427' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114261105494991427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114261105494991427'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/03/how-many-pixels-in-em-part-2.html' title='How Many Pixels in an EM? Part 2'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114254276820392447</id><published>2006-03-16T12:29:00.000-08:00</published><updated>2006-03-17T00:52:43.100-08:00</updated><title type='text'>How Many Pixels in an EM?</title><content type='html'>In the interest of creating CSS-only layouts, it often makes sense to emulate CSS properties that IE doesn't support by using IE-only expressions. An example is the work of Svend Tofte in &lt;a href="http://www.svendtofte.com/code/max_width_in_ie/"&gt;emulating max-width&lt;/a&gt;, which I reference quite often even though it is now 2 years old. I recently created a min-width expression based on this. Here is Svend's expression for max-width:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;width:expression( document.body.clientWidth &gt; (500/12) *&lt;br /&gt;parseInt(document.body.currentStyle.fontSize)? "30em": "auto" );&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Quite nice, but requires a bit of experimentation to get it to work right. In Svend's words:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;Basically, with document.body.clientWidth, we get how wide the browser&lt;br /&gt;window is. Using parseInt(document.body.currentStyle.fontSize), we get the font&lt;br /&gt;size in pt's, that the user has currently set. I experimented, and at 12pts (the&lt;br /&gt;normal size), the browser window gets wider then 30em's, at more or less 500&lt;br /&gt;pixels. Of course, it's then a small matter, of calculating backwards, in the&lt;br /&gt;scale, and see, if that if the default font size is 14pt (larger), then 30em's&lt;br /&gt;will be exceeded at 583 pixels (roughly). The sad thing is, that you will need&lt;br /&gt;to find the magic number, for whatever width you want for your letters. For&lt;br /&gt;30ems, 500 pixels is the magic number.&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;Just as a reference for myself, I began tabulating the width of a 1em-wide div at various font sizes. In other words, I took screen captures and measured them in Photoshop.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;body{&lt;br /&gt;font-size: 500pt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;div{&lt;br /&gt;background-color:black;&lt;br /&gt;width:1em;&lt;br /&gt;}&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;This yields a div that is 667 pixels wide.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Then I realized that if I graphed the pixel width of the div versus the font size in ems, a nice curve emerged, which meant to me that there must be a common factor. So, I took the pixel width of the largest measurement and divided it by the pt size of the font:&lt;/p&gt;&lt;blockquote&gt;667px/500pt = 1.334&lt;/blockquote&gt;&lt;p&gt;A little bit of algebra yields the formulae:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;px per em = 1.334 * pts&lt;/p&gt;&lt;p&gt;and&lt;/p&gt;&lt;p&gt;px = ems*1.334*pts&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;I tested this out in IE and Firefox with serif, sans-serif, and monospaced font families, and it holds true regardless of font size. Applying it to Svend's original expression gives me the following max-width expression (where the desired max-width = 30em):&lt;/p&gt;&lt;blockquote&gt;width:expression( document.body.clientWidth &gt; (30*1.334)*&lt;br /&gt;parseInt(document.body.currentStyle.fontSize)? "30em": "auto" );&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Hope you like it... Please comment if you find it doesn't work for you!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114254276820392447?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114254276820392447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114254276820392447' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114254276820392447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114254276820392447'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/03/how-many-pixels-in-em.html' title='How Many Pixels in an EM?'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24210730.post-114253962022336960</id><published>2006-03-16T11:46:00.000-08:00</published><updated>2006-03-16T12:07:00.233-08:00</updated><title type='text'>My First Time</title><content type='html'>This is the inaugural post for my first-ever blog, TL on PL.  PL stands for "presentation layer" technologies, specifically Flash, CSS &amp; HTML.  I'm sure I'll also write occasionally about Photoshop, Illustrator and other graphics and animation tools.  I do a ton of research on these subjects in my career as a web designer/developer and I needed a permanent place to log my discoveries.  As I come across useful tidbits of information, I'll post them here where they won't become casualties of my numerous Windows reinstallations.&lt;br /&gt;&lt;br /&gt;I would also like to compile a comprehensive list of Flash Player quirks: stuff that you only find out about by chance, bugs that maybe only exist in specific minor versions.  The kind that keep you up until 4 AM before you figure out that you weren't doing anything wrong.  Until I can get Macr/Adobe to give me a copy of their bug database (hint hint) I'll have to do this a very little bit at a time.&lt;br /&gt;&lt;br /&gt;Naturally, I'll also be creating a custom template for this blog...  I just know I won't be able to handle using someone else's design for very long.  So, look for that to change fairly soon.&lt;br /&gt;&lt;br /&gt;Hopefully, this blog will be helpful to someone else looking for answers, and not bore them to death in the process.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24210730-114253962022336960?l=tom-lee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tom-lee.blogspot.com/feeds/114253962022336960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24210730&amp;postID=114253962022336960' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114253962022336960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24210730/posts/default/114253962022336960'/><link rel='alternate' type='text/html' href='http://tom-lee.blogspot.com/2006/03/my-first-time.html' title='My First Time'/><author><name>tom</name><uri>http://www.blogger.com/profile/11054562777690231046</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
