<?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-24667812</id><updated>2012-01-13T12:32:56.616-07:00</updated><title type='text'>Lapsus Bloggus :: Flash - Flex</title><subtitle type='html'>Tips, hints and gotcha's in Actionscript, Flash and Flex</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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>50</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-24667812.post-2264075153991454120</id><published>2011-08-25T10:14:00.000-06:00</published><updated>2011-08-25T10:14:51.917-06:00</updated><title type='text'>Flash Player 10.3.183.7 Released</title><content type='html'>Glory Be!&lt;br /&gt;&lt;br /&gt;All the issues from the catastrophic release of Flash Player 10.3.183.5 appear to have been fixed. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://get.adobe.com/flashplayer/" target="_blank"&gt;get.adobe.com/flashplayer&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Still counting the cost of the previous update - well into the thousands of dollars. On the bright side, the hypertension it gave me didn't cause a heart attack!&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-2264075153991454120?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/2264075153991454120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=2264075153991454120' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/2264075153991454120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/2264075153991454120'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2011/08/flash-player-1031837-released.html' title='Flash Player 10.3.183.7 Released'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-7248072487311711276</id><published>2011-08-16T17:14:00.004-06:00</published><updated>2011-08-17T12:13:29.833-06:00</updated><title type='text'>Flash Player 10.3.183.5 AS1 Shared Library Bug</title><content type='html'>I came across a critical bug in Flash Player 10.3.183.5, a security update that was released on Thursday 11th August 2011.&lt;br /&gt;&lt;br /&gt;Basically, if you use shared libraries from circa Flash 6 / AS1 with a 2 frame preloader that uses either nextFrame() and/or gotoAndPlay(1), the whole containing swf movie will unload itself and you're left with a blank screen.&lt;br /&gt;&lt;br /&gt;Here's the detail:&lt;br /&gt;&lt;a href="http://forums.adobe.com/message/3865740" target="_blank"&gt;http://forums.adobe.com/message/3865740&lt;/a&gt;&lt;br /&gt;&lt;a href="https://bugbase.adobe.com/index.cfm?event=bug&amp;id=2940617" target="_blank"&gt;https://bugbase.adobe.com/index.cfm?event=bug&amp;id=2940617&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Google Chrome users get Flash updated immediately and automatically and were the first to call tech support. The legacy games would load and then... nothing! Calls from IE and FF users soon followed. As we have lots and lots of swfs for old games still in use, a mild wave of panic started to fill the office. &lt;br /&gt;&lt;br /&gt;Luckily the fix is simple, it's just a case of altering the preloader by removing the offending nextFrame() or gotoAndPlay(1). We ended up removing the preloader entirely as the 40k file size of the shared library is tiny by today's standards. Unfortunately for us, we had to do this on 400+ fla's, test them and release them as a hotfix to our clients.&lt;br /&gt;&lt;br /&gt;Another cracking update from Adobe! In the UK, this is known as "dropping a bollock!"&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-7248072487311711276?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/7248072487311711276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=7248072487311711276' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/7248072487311711276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/7248072487311711276'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2011/08/flash-player-1031855-as1-shared-library.html' title='Flash Player 10.3.183.5 AS1 Shared Library Bug'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-2846531063395831390</id><published>2011-02-24T22:16:00.000-07:00</published><updated>2011-02-24T22:16:27.354-07:00</updated><title type='text'>Particle Code</title><content type='html'>&lt;a href="http://www.particlecode.com/"&gt;Particle Code&lt;/a&gt;, unlike its name suggests, is a new cross platform SDK for mobile devices. I first became interested in it when I discovered Actionscript was one of the supported languages.&lt;br /&gt;&lt;br /&gt;The basic idea behind Particle Code is to write once and deploy eveywhere and the language you chose to write your code is up to you. The code will then be compiled to native code and packaged as apps for:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;iOS&lt;/li&gt;&lt;li&gt;Android&lt;/li&gt;&lt;li&gt;BlackBerry&lt;/li&gt;&lt;li&gt;Windows Phone 7&lt;/li&gt;&lt;li&gt;J2ME&lt;/li&gt;&lt;li&gt;Symbian&lt;/li&gt;&lt;/ul&gt;Compiling to native code is an important difference between Adobe's paradigm: AIR apps deployed to mobile devices that require the AIR runtime installed in order to work.&lt;br /&gt;&lt;br /&gt;This looks like a great idea and has the potential to save hundreds of hours porting an app between devices. However, even though Actionscript is supported, it is a completely separate platform to Flash/Flex, &lt;b&gt;you will not be able to write a Flash Platform application with Particle Code.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Looking at the Particle Code API, it looks fairly similar to the way you would develop apps in Android, you can use Java or Actionscript to create your apps, though I suspect more will be added to that list.&lt;br /&gt;&lt;br /&gt;From a Flash Platform developer perspective, there are lots of things missing, MovieClips, Sprites etc. plus you won't be able to do any E4X. You will undoubtedly need to write more code to get anywhere close to the animation capabilities of Flash, but the amount of platforms you can deploy to, may justify that extra effort.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-2846531063395831390?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/2846531063395831390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=2846531063395831390' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/2846531063395831390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/2846531063395831390'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2011/02/particle-code.html' title='Particle Code'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-1925272217401549062</id><published>2011-02-09T14:41:00.000-07:00</published><updated>2011-02-09T14:41:10.373-07:00</updated><title type='text'>Flash Player 10.2 now available</title><content type='html'>Following my&lt;a href="http://lapsusbloggus.blogspot.com/2010/10/xmlappendchild-flashplayer-10-known-bug.html"&gt; previous rant&lt;/a&gt; about some issues in FP10.1, you'll be pleased to know they're still there in 10.2. Obviously this fix is waiting for the 11.0 release.&lt;br /&gt;&lt;br /&gt;Still, it's good to see that the CPU usage for video is vastly improved with &lt;a href="http://www.adobe.com/devnet/flashplayer/articles/stage_video.html" target="_blank"&gt;Stage Video&lt;/a&gt;. However, this comes at a price as it bypasses the usual software rendering pipeline and passes the stream straight to the hardware. Therefore you can only rotate in 90º increments and you can't skew, transform or convert to bitmaps. This is a pure video acceleration feature, which is good news as it saves battery time and will hopefully cause Apple to reconsider its increasingly irrational position regarding the FlashPlayer on iOS.&lt;br /&gt;&lt;br /&gt;Although I wouldn't put much faith in that - Mac users beware - this is a known issue:&lt;br /&gt;&lt;i&gt;"On some Macintosh systems with NVidia 9400, GT 320, or GT 330 GPUs, live video streams render all black with hardware acceleration, or all white when using the software decoder."&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Other new features include full-screen support for multiple monitors, hardware rendering support for IE9, custom native mouse cursors (use responsibly people!) and sub-pixel text rendering. That's great news if you're Chinese - you may actually be able to read something in 12pt. text!&lt;br /&gt;&lt;br /&gt;This looks like a good "point" update, plus the 64-bit "square" version is now out of beta too. Time will tell if I have to go through my API's and fix a load of things as I did for FP10.1, but so far it looks impressive.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://get2.adobe.com/flashplayer/" target="_blank"&gt;FlashPlayer 10.2 Download &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://kb2.adobe.com/cps/890/cpsid_89050.html" target="_blank"&gt;FlashPlayer 10.2 Release Notes&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-1925272217401549062?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/1925272217401549062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=1925272217401549062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/1925272217401549062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/1925272217401549062'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2011/02/flash-player-102-now-available.html' title='Flash Player 10.2 now available'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-2944271989538825428</id><published>2011-02-02T17:39:00.005-07:00</published><updated>2011-02-02T18:13:58.422-07:00</updated><title type='text'>Google vs Bing - my tuppence worth.</title><content type='html'>As you probably know already, Google is accusing Microsoft of copying its search results on the Bing search engine. you can read a detailed account of the complaint here:&lt;br /&gt;&lt;a href="http://searchengineland.com/google-bing-is-cheating-copying-our-search-results-62914"&gt;Google: Bing is Cheating, Copying Our Search Results&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you don't want to read all that, it basically says that Microsoft was using IE8 to capture the result of what people were searching for on Google, then copying that result, which would eventually appear on Bing. Google discovered this by adding "synthetic searches", searches made of random strings such as "mbzrxpgjys", added by Google engineers, that would only return results on Google itself. Strange, then, that they started to appear on Bing a few weeks after the Google engineers started searching for those terms using IE8 with the Bing Toolbar and the Suggested Sites feature switched on.&lt;br /&gt;&lt;br /&gt;Is what Microsoft doing illegal? It's certainly cheeky, yet many sites use Google's search, albeit branded with a Google logo. I think the key to this is IE8.&lt;br /&gt;&lt;br /&gt;The article above examines the T's and C's of IE8 and the Suggested Sites feature, which has 2 key points:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;"&lt;b&gt;addresses of websites you visit are sent to Microsoft, together with standard computer information."&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;"&lt;/b&gt;&lt;b&gt;Information associated with the web address, such as search terms or data you entered in forms might be included."&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;By accepting these terms, you are in effect allowing IE8 to act as spyware, to monitor your web activity. It may well be used to improve your search results on Bing, but it also has the ability to glean information from Google search.&lt;br /&gt;&lt;br /&gt;Personally I think passing off the Suggested Sites feature as something other than what it is - spyware - is dodgy in the first place, but the T's and C's probably do give adequate warning. Obviously information gathered by Suggested Sites is used to improve the search results for Bing, which is fair enough, but was the ulterior motive to scrape results from Google?&lt;br /&gt;&lt;br /&gt;Aggregating results from search engines is common practice and can be quite useful, but if Microsoft want to use Google results in Bing, then it's only fair play to add the "powered by Google" logo next to them. If they're too precious to do that, then they should stop using Google's results, or at least pay Google to use their results without have to acknowledge the source.&lt;br /&gt;&lt;br /&gt;At the end of the day, web searches are based on copying, storing and ranking information from all over the web, it's the forming of relevance and context which is the trick, something that Google nailed in the late 90's. As Isaac Newton admitted to "standing on the shoulders of giants" in order to create the Theory of Gravitation, Bing should be equally gracious if they are to use Google as a part of a utopian search service, vastly superior than its competitors. Bing certainly isn't that.&lt;br /&gt;&lt;br /&gt;Cheats never prosper, unless you're Microsoft, which has arguably spent the last 30 odd years copying other peoples ideas. I'd like to think it's time for Google to give them a good hiding, but I doubt this will go any further than exposing Microsoft's practices to the public. If this did go to court, Google may have to openly explain how its precious algorithms work.&lt;br /&gt;&lt;br /&gt;Google had concrete proof of this issue on December 31st, but waited until February 1st to release its findings - why? Because that was the date of the Farsight 2011 search engine conference, perfect timing to undermine everything Microsoft was to eulogise about Bing. Google seems to want to fight this battle with hearts and minds rather than through the courts (to date at least). Blog posts like this are popping up all over the web and if it only serves to steer your average computer user away from Internet Explorer, that can only be a good thing!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-2944271989538825428?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/2944271989538825428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=2944271989538825428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/2944271989538825428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/2944271989538825428'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2011/02/google-vs-bing-my-tuppence-worth.html' title='Google vs Bing - my tuppence worth.'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-7218967441054498098</id><published>2011-01-20T14:08:00.009-07:00</published><updated>2011-01-20T14:36:23.070-07:00</updated><title type='text'>HTML5 or HTML? Fallen at the First.</title><content type='html'>I found recent developments from &lt;a href="http://www.w3.org/"&gt;W3C &lt;/a&gt;and &lt;a href="http://www.whatwg.org/"&gt;WHATWG &lt;/a&gt;rather humorous, as they don't seem to have agreed on the name for&lt;br /&gt;HTML ... erm ... version 5.&lt;br /&gt;&lt;br /&gt;W3C recently pushed out a load of marketing tat for HTML5 which includes a snazzy superhero-laundry-detergent &lt;a href="http://www.w3.org/html/logo/" target="_blank"&gt;logo &lt;/a&gt;and the geekiest &lt;a href="http://html5shirt.com/" target="_blank"&gt;t-shirts&lt;/a&gt; known to man. &lt;br /&gt;&lt;br /&gt;"You have HTML5 on the brain. Tell the world!" is the message from W3C.&lt;br /&gt;&lt;br /&gt;Shame nobody spoke to WHATWG, who are also working with W3C (supposedly) on the specification: &lt;br /&gt;&lt;br /&gt;"HTML is the new HTML5" they declare on their &lt;a href="http://blog.whatwg.org/html-is-the-new-html5" target="_blank"&gt;blog&lt;/a&gt;. They suggest renaming HTML5 back to plain old HTML and dropping the version number. "Time to move on!", they say. What will W3C do with all those t-shirts!?&lt;br /&gt;&lt;br /&gt;The sad truth is, the organisations that are creating the HTML(5) specification can't even agree on the name, which seems like a case of falling at the first hurdle and doesn't inspire confidence in future developments!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.w3.org/html/logo/" target="_blank"&gt;http://www.w3.org/html/logo/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blog.whatwg.org/html-is-the-new-html5" target="_blank"&gt;http://blog.whatwg.org/html-is-the-new-html5&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-7218967441054498098?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/7218967441054498098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=7218967441054498098' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/7218967441054498098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/7218967441054498098'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2011/01/html5-or-html-fallen-at-first.html' title='HTML5 or HTML? Fallen at the First.'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-1639809954323621364</id><published>2011-01-12T14:12:00.003-07:00</published><updated>2011-01-12T14:26:50.916-07:00</updated><title type='text'>IntelliJ 10: A Real Alternative to Flash Builder</title><content type='html'>Have you ever had a large project in Flash Builder and you need to refactor a whole chunk of code into a new namespace and also have it move the files in SVN?&lt;br /&gt;&lt;br /&gt;Have you tried to run an ANT build and got an "OutOfMemory error:PermGen Space" error and needed to up the memory to 1GB or over?&lt;br /&gt;&lt;br /&gt;Has your machine been bogged down by massive memory/processor usage?&lt;br /&gt;&lt;br /&gt;Much as I like Flash Builder, with its UI features and its ability to publish Flash projects, it has one major flaw: it's built on Eclipse. &lt;br /&gt;&lt;br /&gt;Refactoring code and updating SVN in Flash Builder with Subclipse is possible but it can take a few minutes, plus it does have a tendency to go wrong and the whole SVN project can get addled, causing much grief.&amp;nbsp; Doing the same refactoring job in IntelliJ can take seconds and it will also update all your package declarations to match the new namespace. I can link to and run my ANT or Maven builds in a much more pleasing way, and it never seems to run out of memory, and all the while during coding, refactoring or building I'm using &amp;lt; 200MB of memory.&lt;br /&gt;&lt;br /&gt;With IntelliJ you can debug swfs running in the FlashPlayer, unit test and refactor with ease. The downside is you don't get the memory profiler, the ability to publish Flash projects, or Flash Builder design view (I'm sure most proficient Flex developers hardly use it anyway).&lt;br /&gt;&lt;br /&gt;I've been using IntelliJ 9 for 6 months now (I was previously using FDT), and IntelliJ 10 has added extra support for Actionscript, Flex and AIR. If you develop large scale Flash, Flex or AIR projects, IntelliJ saves time and frustration and is also a great editor for many other languages too.&lt;br /&gt;&lt;br /&gt;Here's the Flex features: &lt;a href="http://www.jetbrains.com/idea/features/flex_ide.html"&gt;IntelliJ 10 Flex Features&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I still use Flash Builder at home for my own projects. At home I tend to follow Adobe's recommended workflows between Flash Platform applications which all works reasonably well. So it's horses for courses, but for my job which deals with many large Actionscript heavy frameworks, IntelliJ is much more pleasant to use than FDT, FlashDevelop or Flash Builder.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-1639809954323621364?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/1639809954323621364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=1639809954323621364' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/1639809954323621364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/1639809954323621364'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2011/01/intellij-10-real-alternative-to-flash.html' title='IntelliJ 10: A Real Alternative to Flash Builder'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-6834431185716200307</id><published>2010-11-04T15:33:00.005-06:00</published><updated>2010-11-04T15:40:07.470-06:00</updated><title type='text'>FlashPlayer 10.1 Throttling Problems</title><content type='html'>While the idea to throttle SWFs in inactive or minimised tabs/windows down to 2fps to reduce CPU usage is a good thing, it can cause havoc with SWFs that use both time-based and frame-based timing.&lt;br /&gt;&lt;br /&gt;The frames will tick at 500ms, yet any time based event will still fire after &lt;code&gt;TIMER_COMPLETE&lt;/code&gt; or after &lt;code&gt;setTimeout()&lt;/code&gt;. You cannot rely on sequencing between the two, which is not a good idea anyway, but potential problems are made worse by the throttling.&lt;br /&gt;&lt;br /&gt;If possible, do not mix frame and time based sequencing (which is good practice), but if you need to know when the SWF is minimised you can listen for:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Event.ACTIVATE&lt;br /&gt;Event.DEACTIVATE&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now, this works on FF 3.5.15 with FP 10.1, it may behave differently between browsers and FlashPlayer versions, so it could be fairly unreliable.&lt;br /&gt;&lt;br /&gt;In another experiment, I played a silent audio track while it was minimised, this kept the movie running at 8fps, which gave better resolution which was just enough to prevent some of the timer / frame sync issues, but again wasn't 100% reliable.&lt;br /&gt;&lt;br /&gt;In short: don't mix your timers, try and keep it frame based. Until Adobe roll out an event we can use to detect throttling, we're stabbing in the dark.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-6834431185716200307?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/6834431185716200307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=6834431185716200307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/6834431185716200307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/6834431185716200307'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2010/11/flashplayer-101-throttling-problems.html' title='FlashPlayer 10.1 Throttling Problems'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-1113033008611150072</id><published>2010-10-08T12:08:00.007-06:00</published><updated>2010-10-08T12:38:04.415-06:00</updated><title type='text'>XML.appendChild FlashPlayer 10 - Known Bug. But wait...there's more!</title><content type='html'>I just hit a problem with XML.appendChild not accepting String values when you publish a swf for Flash Player 10.1&lt;br /&gt;&lt;br /&gt;Doing this:&lt;br /&gt;&lt;code&gt;myXml.appendChild("&amp;lt;node&amp;gt;"+value+"&amp;lt;/node&amp;gt;");&lt;/code&gt;&lt;br /&gt;Will not work, this will:&lt;br /&gt;&lt;code&gt;myXml.appendChild(&amp;lt;node&amp;gt;{value}&amp;lt;/node&amp;gt;);&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Which is fair enough as it's strict E4X. What irks me is something that has worked now doesn't, which has caused problems with our custom swc API libraries that I've just spent a few hours fixing.&lt;br /&gt;&lt;br /&gt;In the &lt;a href="http://kb2.adobe.com/cps/838/cpsid_83808.html" target="_blank"&gt;release notes&lt;/a&gt; for Flash Player 10.1 there is this entry:&lt;br /&gt;"XML.appendChild does not function correctly when published as SWF10; works fine as SWF9. (2340839)"&lt;br /&gt;&lt;br /&gt;"works fine as SWF9" - thanks! Not "fine" when I'm trying to implement 10.1 specific features.&lt;br /&gt;&lt;br /&gt;Read those release notes some more and you discover fundamental issues:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;[FP-1569] AS3 Timeline: Child Sprite ADDED_TO_STAGE event is fired twice. (2300936)&lt;/li&gt;&lt;li&gt;AS3 Timeline: First frame of Movie Clip animation played twice when created and added to stage with ActionScript. (2520095)&lt;/li&gt;&lt;li&gt;[FP-4423] onEnterFrame gets called more often than necessary. (2614589)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; All of which look to be related at some lower level.&lt;br /&gt;&lt;br /&gt;So as long as you're not doing any Flash development that requires listening to ADDED_TO_STAGE,  or that requires accurate timing when adding MovieClips or using onEnterFrame, you will be fine!&lt;br /&gt;&lt;br /&gt;And I certainly won't be using this post to rant about how such critical issues with fundamental features that have worked correctly for years have passed through Adobe QA with little more than a footnote which itself was missing two important words: "Oops, sorry!"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-1113033008611150072?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/1113033008611150072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=1113033008611150072' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/1113033008611150072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/1113033008611150072'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2010/10/xmlappendchild-flashplayer-10-known-bug.html' title='XML.appendChild FlashPlayer 10 - Known Bug. But wait...there&apos;s more!'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-7245282443129542847</id><published>2010-09-22T07:11:00.004-06:00</published><updated>2010-09-22T07:15:09.961-06:00</updated><title type='text'>Russ Rolling. It's like Rick Rolling, but worse!</title><content type='html'>Yes, that annoying habit of Rick Rolling is so last decade. The new video of the times is Russ Abbot's "Atmosphere", a #7 UK hit back in 1984. It's pretty awful, but what's worse is that it sticks in your head like a botfly larva.&lt;br /&gt;&lt;br /&gt;Russ Roll someone today: &lt;a href="http://www.youtube.com/watch?v=RFPLk5mJ1D4"&gt;http://www.youtube.com/watch?v=RFPLk5mJ1D4&lt;/a&gt; , they'll hate you for it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-7245282443129542847?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/7245282443129542847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=7245282443129542847' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/7245282443129542847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/7245282443129542847'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2010/09/russ-rolling-its-like-rick-rolling-but.html' title='Russ Rolling. It&apos;s like Rick Rolling, but worse!'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-6567075362463336465</id><published>2010-05-26T02:02:00.002-06:00</published><updated>2010-05-26T02:04:38.318-06:00</updated><title type='text'>Time to learn HTML5? No... learn Android</title><content type='html'>All the media hyperbole surrounding the recent Steve Jobs rant about Flash has given HTML5 a boost. Reading various blogs and Apple Fan Boy comments would lead you to believe Flash is dead and we're all going to be out of a job in the next couple of years. This is far from the truth. Already Flash is part of the Open Screen project and there will soon be an AIR runtime released for Android.&lt;br /&gt;&lt;br /&gt;HTML5 is a long awaited update to HTML and, yes, it will render certain applications of Flash redundant, crappy add banners for one - and good riddance! However HTML5 is still not fully supported by all browsers and until browsers support a Javascript language up to ECMA 3 standard, it just feels like taking a step back into the archaic days of AS1 and Flash 4!&lt;br /&gt;&lt;br /&gt;Apple don't want to support Flash for various reasons and they will push along with HTML 5 and Objective C apps on their closed software platform. Flash is part of the Open Screen project being adopted by all major mobile phone manufacturers, except one... guess who!?  iPhone app development is a tempting prospect but it's current popularity, mainly due to lack of competition, will be eroded in the months to come as the mobile phone giants start to offer their own alternatives. Once this happens, the iPhone will look isolated on its proprietary island as apps able to run on a multitude of devices will begin to dominate the market. However, it will be harder for developers to make money in this open arena. It also remains to be seen if Apple really are turning into the Mobile Microsoft and try to stifle development of open source products and force you to use their OS and apps. Unlikely.&lt;br /&gt;&lt;br /&gt;Flash, Flex and AIR are perfectly poised to enter the Open Screen app space, so really, you could stick with what you know. Yet, if you're feeling the cold hand of progress pushing your office chair towards the exit, learn HTML5 by all means, learn Objective C if you dare, but those of you with Flash/Flex or Java experience should learn Android as soon as you can&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-6567075362463336465?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/6567075362463336465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=6567075362463336465' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/6567075362463336465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/6567075362463336465'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2010/05/time-to-learn-html5-no-learn-android.html' title='Time to learn HTML5? No... learn Android'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-4412552157726744158</id><published>2009-02-02T12:30:00.015-07:00</published><updated>2009-02-02T13:43:07.332-07:00</updated><title type='text'>Amazon S3 and the "Cloud"</title><content type='html'>I've recently got into Amazon S3 to backup my files off site and at low cost.&lt;br /&gt;&lt;br /&gt;If you have no idea what Amazon S3 is, you can read about it &lt;a href="http://aws.amazon.com/s3/" target="_blank"&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Once you've set up your S3 account, you need to be able to connect to it. There are many S3 client products to help you do this. I've tried out the following 3:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://code.google.com/p/s3fs/" target="_blank"&gt;&lt;span style="font-weight:bold;"&gt;S3fs&lt;/span&gt;&lt;/a&gt; for Linux is free and it allows you to simply connect to your S3 "buckets" via the command line.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.subcloud.com" target="_blank"&gt;&lt;span style="font-weight:bold;"&gt;SubCloud&lt;/span&gt;&lt;/a&gt; is essentially S3fs with more functionality, most importantly encryption, https transfer and rsync functionality. This costs $129 for a one off licence.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.jungledisk.com/" target="_blank"&gt;&lt;span style="font-weight:bold;"&gt;JungleDisk&lt;/span&gt;&lt;/a&gt; has most, if not all of the features SubCloud offers, but it comes in Windows, OS X and linux versions with JungleDisk Monitor, a GUI application to help you configure your connection to Amazon S3. Most importantly it only costs $20 per licence.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;When you use these S3 clients, your Amazon S3 "buckets", which act like virtual folders as they're probably distributed over many servers, are mounted to you file system like any other drive (or folder depending on your Operating System).&lt;br /&gt;&lt;br /&gt;Without doubt, JungleDisk is the cheapest and easiest to set up for Windows / OS X, however, I couldn't work out how to get JungleDisk working from the command line on Linux machines. It kept coming up with a problem with a missing domain in the config file?&lt;br /&gt;&lt;br /&gt;SubCloud boasts faster upload speed and it was easier to set up from the Linux command line, but at $129 dollars, I've not seen anything that would tempt me away from JungleDisk on Windows or OS X. &lt;br /&gt;&lt;br /&gt;In Summary: Use JungleDisk for Windows / OS X and SubCloud for command line Linux.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The Importance of Encryption&lt;/span&gt;&lt;br /&gt;Files transmitted by the connection software are MD5 encyrpted with your Amazon S3 access and secret keys. In addition to that, you need to be using https to make the connection to your buckets.&lt;br /&gt;&lt;br /&gt;If you're backing up important and/or sensitive information (which is why you'd want this service in the first place, right?) then you wouldn't want anyone to hack into Amazon or have a dodgy Amazon employee looking at your unencrypted information on their servers. That's why JungleDisk and SubCloud allow you to further encrypt your files using a password that only you (or your organisation) will know. This means the files stored on Amazon's cloud can only be read by people who know that password. &lt;br /&gt;&lt;br /&gt;This password encryption / decryption happens transparently when using the JungleDisk or SubCloud client software, so once you've entered that password then the file system acts as normal. &lt;br /&gt;&lt;br /&gt;Now, the problem with that is what if you want to change that password? As far as I can tell, the answer is "DON'T"! Which could be a problem you've just fired a disgruntled IT employee. (please feel free to correct me on this)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Using the "Cloud"&lt;/span&gt;&lt;br /&gt;Amazon S3 looks cheap - very cheap but there are some things to consider before you dive in.&lt;br /&gt;Firstly, lets deal with a few plus points:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Amazon infrastructure is vast and the SLA's Amazon provides means your data is as safe as it possibly can be&lt;/li&gt;&lt;li&gt;It's incredibly cheap, compared to using other back up / hosting options for most home / small business usage.&lt;/li&gt;&lt;li&gt;File access should also be incredibly fast anywhere in the world, due to the fact Amazon have server farms everywhere&lt;/li&gt;&lt;/ol&gt;But beware:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;It is initially cheap, but over time, you will always be storing and transferring more and more data too and from the service. It could become very expensive very quickly.&lt;/li&gt;&lt;li&gt;Over reliance on this service may suck you in. Cheap prices are good for now, but down the line, you'll be at the mercy of Amazon or whoever holds all your information.&lt;/li&gt;&lt;li&gt;Once you're hooked by the pencil pushers, this will become yet another monthly bill like your cell phone or electricity. In fact when Steve Ballmer says the future of computing is in the Cloud, this is exactly what he sees: a monthly billed reliance on centralised data services that you can't easily get out of!&lt;/li&gt;&lt;li&gt;It also begs the question: what happens to your data if you don't pay up, or just miss a monthly payment?&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;The Cloud is the future, whether we like it or not. At the moment I like it, but ask me again in a few years when I'm struggling to pay my "data" bills!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-4412552157726744158?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/4412552157726744158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=4412552157726744158' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/4412552157726744158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/4412552157726744158'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2009/02/amazon-s3-and-cloud.html' title='Amazon S3 and the &quot;Cloud&quot;'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-6189026285872741544</id><published>2009-01-19T14:17:00.005-07:00</published><updated>2009-01-19T15:40:44.619-07:00</updated><title type='text'>OS X Leopard Virtual Hosts and Symbolic Links</title><content type='html'>I'll keep this quick.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Say you have an SVN working copy in your Documents Folder: Documents/SVN/MyProject/&lt;/li&gt;&lt;li&gt;There is a webroot in there: Documents/SVN/MyProject/webroot/&lt;/li&gt;&lt;li&gt;You've got the following in etc/hosts : 127.0.0.1 localhost dev&lt;/li&gt;&lt;li&gt;You've created a Virtual Host for "dev" in /private/etc/apache2/extra/httpd-vhosts.conf&lt;/li&gt;&lt;li&gt;You included FollowSymLinks in the virtual host Directory settings for Documents/SVN/MyProject/webroot&lt;/li&gt;&lt;li&gt;You get a "Forbidden" error when you try to view http://dev&lt;/li&gt;&lt;li&gt;You did a chmod -R 777 on the Documents/SVN/MyProject/webroot/ folder and you still get "Forbidden"&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;If this sounds familiar to you, then here's the solution:&lt;br /&gt;&lt;br /&gt;Use: &lt;span style="font-weight:bold;"&gt;chmod a+x&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;Open a terminal window use the chmod command for each folder in the path to the webroot. In the example path, it would be:&lt;br /&gt;chmod a+x ~/Documents&lt;br /&gt;chmod a+x ~/Documents/SVN&lt;br /&gt;chmod a+x ~/Documents/SVN/MyProject&lt;br /&gt;chmod a+x ~/Documents/SVN/MyProject/webroot&lt;br /&gt;&lt;br /&gt;As solutions go, this is quite a bad one as it makes your Documents folder accessible to all. But after hours of trying, that's all I could do to get this to work.&lt;br /&gt;&lt;br /&gt;Has anyone got a better way?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-6189026285872741544?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/6189026285872741544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=6189026285872741544' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/6189026285872741544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/6189026285872741544'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2009/01/os-x-leopard-virtual-hosts-and-symbolic.html' title='OS X Leopard Virtual Hosts and Symbolic Links'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-966004156019962985</id><published>2008-11-26T15:44:00.005-07:00</published><updated>2008-11-26T15:59:43.680-07:00</updated><title type='text'>YouTube Mashing</title><content type='html'>I was listening to &lt;a href="http://www.bbc.co.uk/6music" target="_blank"&gt;BBC 6 Music&lt;/a&gt;, a cracking radio station that plays amazing new stuff you've never heard of, when I was sent the standard YouTube comedy clip of kittens doing silly things.&lt;br /&gt;&lt;br /&gt;I was listening to Smoke Fairies - Living with Ghosts when I opened the kitten video.&lt;br /&gt;&lt;br /&gt;By pure luck, I opened the video at the perfect moment in an almost seemless mix with the radio.&lt;br /&gt;&lt;br /&gt;Try it yourself, follow these instructions:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Load each video in a separate browser tab or window.&lt;br /&gt;&lt;br /&gt;Here's the Smoke Fairies video:&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=4ey8UQ21_jk" target="_blank"&gt;http://www.youtube.com/watch?v=4ey8UQ21_jk&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And here's the "Lookin' Kitties" video:&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=MnR3bAICsDM" target="_blank"&gt;http://www.youtube.com/watch?v=MnR3bAICsDM&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Press pause on both videos until they're completely downloaded.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Cue the Smoke Fairies video to about 1:48&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In a quick manoeuvre, start the Smoke Fairies video, then flip to the kitties video and press play.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;Goes together pretty well doesn't it? &lt;br /&gt;&lt;br /&gt;So budding DJ's, get out there and start a new trend, &lt;br /&gt;"YouTube Mashing" ! But don't forget, you heard it here first ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-966004156019962985?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/966004156019962985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=966004156019962985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/966004156019962985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/966004156019962985'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2008/11/youtube-mashing.html' title='YouTube Mashing'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-1194902364908901343</id><published>2008-11-24T16:12:00.005-07:00</published><updated>2008-11-24T16:26:10.672-07:00</updated><title type='text'>Glenbow Museum - Art Pad</title><content type='html'>Here lies ArtPad:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.glenbow.org/artpad" target="_blank"&gt;http://www.glenbow.org/artpad&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Technically it's a fantastic site. I only worked on a very small part of it myself, but many of my colleagues worked very hard to produce a site which is artistically stunning, yet adheres to strict accessibility standards - a tough job!&lt;br /&gt;&lt;br /&gt;A big hurrah to everyone who worked on it. A slow clap to the fact it was poorly managed, vastly over budget and released 2 years after it was initially completed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-1194902364908901343?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/1194902364908901343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=1194902364908901343' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/1194902364908901343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/1194902364908901343'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2008/11/glenbow-museum-art-pad.html' title='Glenbow Museum - Art Pad'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-8589381065093119744</id><published>2008-11-04T10:47:00.005-07:00</published><updated>2008-11-04T11:34:42.923-07:00</updated><title type='text'>Accessing Scenes in loaded SWFs (AS3)</title><content type='html'>Ok, ok, I can hear you now, "don't use scenes, silly boy!", but really, they're the best compromise to allow animators to freely draw avatars and allow me to control the avatar orientation with each scene.&lt;br /&gt;&lt;br /&gt;Animators would send me swfs containing scenes named as each avatar orientation (N, S, E, W etc). I would then load these swfs into the game and use the scenes to control the avatars orientation. The problem is I couldn't access any of the scenes I got from the animators swfs. My proof of concept worked perfectly, but when I got the real stuff, it wasn't working!?&lt;br /&gt;&lt;br /&gt;If I checked loadedMC.scenes.length, I would get a value of 1 instead of the expected 5, yet it would still cycle through all the scenes, but where were they?&lt;br /&gt;&lt;br /&gt;I asked for the fla's and all seemed fine. However there was 1 minor difference: the animators were using Graphic symbols on the timeline in each scene, not MovieClips. I added a blank MovieClip to each scene and hey-presto, the scenes were accessible! &lt;br /&gt;&lt;br /&gt;So if you use scenes, make sure you have MovieClip symbols inside them, otherwise you won't be able to access them at run-time.&lt;br /&gt;&lt;br /&gt;*** Update ***&lt;br /&gt;Please read comments to this post&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-8589381065093119744?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/8589381065093119744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=8589381065093119744' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/8589381065093119744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/8589381065093119744'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2008/11/accessing-scenes-in-loaded-swfs-as3.html' title='Accessing Scenes in loaded SWFs (AS3)'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-6488954263881200403</id><published>2008-10-16T09:13:00.004-06:00</published><updated>2011-03-06T10:40:24.847-07:00</updated><title type='text'>My Intel iMac is dead, logic board failure, how's yours?</title><content type='html'>With much dismay, I resigned myself to the fact my 2006 17" Intel iMac is kaput. I've had it since July 2006, so in just 2 years and 3 months it's died. It's the first total failure of any PC I've ever owned and also turns out to be the most expensive. To replace a logic board here in Canada costs around $1000, so it's an economic write off, I might as well buy a new machine. &lt;br /&gt;&lt;br /&gt;When I bought the machine in the UK, back in 2006 I didn't bother getting AppleCare as I thought it was just another extended warranty you don't need. Somewhat ironically I think there's a European consumer law (which I'll have to research), that covers you  outside the 1 year manufacturers warranty, but now I'm in Canada, I doubt that applies.&lt;br /&gt;&lt;br /&gt;Two things disappoint me here: &lt;br /&gt;&lt;br /&gt;1) It's shattered my perception of Apple producing reliable machines. I've been using Macs for years with no trouble with the machines at all. The expensive price tag stood for style and reliability - something that was made to last.&lt;br /&gt;&lt;br /&gt;2) The sheer expense to myself. What ever I do, it's going to cost me. I cannot afford another Mac for a few months now and I'm back to using my old Sony Vaio, which the Mac replaced and is still going (it just about runs Flex 3). I need a machine to do my work, but can I really justify buying another iMac at $1500+ ? In Canada, Apple doesn't offer any credit schemes and I'm only allowed a $500 credit card limit as I've not lived in the country for long. It pains me to be actually considering buying a PC with Vista on it!&lt;br /&gt;&lt;br /&gt;Doing a bit of Goolging and speaking to the guy in the Apple Store, it seems early Intel iMacs are prone to this problem. Potentially thousands of machines could be dropping like flies, out of warranty and at great expense to the consumer. Apple are probably keeping this one quiet, so please post here if you've had a logic board failure (or any other catastrophic problem) with the 2006/2007 Intel iMac models (the white ones).&lt;br /&gt;&lt;br /&gt;**** UPDATE  - MARCH 2011 ****&lt;br /&gt;Thank you everyone for posting. There is a petition you can sign to recall 2006 iMacs.&lt;br /&gt;&lt;a href="http://www.petitionspot.com/petitions/imacrecall" target="_blank"&gt;http://www.petitionspot.com/petitions/imacrecall&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Alas I ripped my iMac apart to get the HDD out and sent it for recycling. But if you still have your dead iMac, it may be worth signing the petition and get on a Class Action Lawsuit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-6488954263881200403?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/6488954263881200403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=6488954263881200403' title='215 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/6488954263881200403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/6488954263881200403'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2008/10/my-intel-imac-is-dead-logic-board.html' title='My Intel iMac is dead, logic board failure, how&apos;s yours?'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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>215</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24667812.post-8715344825551420380</id><published>2008-10-01T13:03:00.003-06:00</published><updated>2008-10-01T13:23:01.093-06:00</updated><title type='text'>Flash Player Audio Sync and Frame Rates</title><content type='html'>So, it's the end of my hiatus since I last posted. I got married, changed job, house, car - actually pretty much all my life. &lt;br /&gt;&lt;br /&gt;I'm back to creating Flash games, which is always enjoyable. I'm currently building a multiplayer world and various games attached to it. At the moment I'm building a Dance Dance Revolution type game which initially sounds simple, and it would be, but for the fact the Flash Player frame rate is all over the place.&lt;br /&gt;&lt;br /&gt;If you have a 24fps movie, each frame should fire every 41.166* ms - or they *should*. In reality the frame rate can vary +- 20ms, which means after a short while the animation drifts away from the audio quite considerably. This problem is caused by a number of factors, mainly CPU speed/load and platform. It's bad on PC but terrible on an Mac.&lt;br /&gt;&lt;br /&gt;So the problem is how do you get your beat hits to be absolutely precise to the music? I've managed to solve this problem by creating a "deltaTime" variable which calculates the drift per frame. If you know how many milliseconds it should be and how much drift you have, you can convert that to pixels to move, based on frame rate.&lt;br /&gt;&lt;br /&gt;The net effect is a bit weird. The beat hits are spot on with the music, but this comes at a price because as the instructions scroll down the screen, the distance the instruction icons move is different each frame. This results in a jerky scrolling motion.&lt;br /&gt;&lt;br /&gt;I'm hoping FP10 has more accurate frame rates that would solve this problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-8715344825551420380?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/8715344825551420380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=8715344825551420380' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/8715344825551420380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/8715344825551420380'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2008/10/flash-player-audio-sync-and-frame-rates.html' title='Flash Player Audio Sync and Frame Rates'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-2173209943942504247</id><published>2008-03-25T19:54:00.015-06:00</published><updated>2008-03-25T20:22:49.167-06:00</updated><title type='text'>The Statistics of Argh!</title><content type='html'>You know those days when you just cannae take it any more (Capt'n) and end up typing "AAAAARRRRRRRRRRRRRRGGGGGHHHHH!!!!" into Google? Yet have you ever wondered how many AAAA's RRRR's GGGG's and HHHH's to use? &lt;br /&gt;&lt;br /&gt;Well here's the answer:&lt;br /&gt;&lt;a href="http://osteele.com/words/aargh"&gt;http://osteele.com/words/aargh&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The most common spelling appears to be "argh", which is really more of an apathetic sigh than a gut wrenching scream of annoyance. &lt;br /&gt;&lt;br /&gt;Only 14 people seem to have gone with my spelling of 5 A's and 15 R's. You certainly need more than one A to get it going and there definitely needs to be more R's in the "argh" as I consider that the "body" of the scream when it audibly starts to blend with the multitude of A's.&lt;br /&gt;&lt;br /&gt;What the statistics don't show are the G's and H's which, in my opinion, round the scream off. You need a good few G's to release that guttural sound of pain, followed by a few strained, aspirated H's as your lungs, exhausted of air, begin to collapse.&lt;br /&gt;&lt;br /&gt;You see? T'interweb has its uses!&lt;br /&gt;&lt;br /&gt;Back to work.... AAAAARRRRRRRRRRRRRRGGGGGHHHHH!!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-2173209943942504247?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/2173209943942504247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=2173209943942504247' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/2173209943942504247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/2173209943942504247'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2008/03/statistics-of-argh.html' title='The Statistics of Argh!'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-834524086118737169</id><published>2008-03-18T22:35:00.005-06:00</published><updated>2008-03-18T22:47:18.492-06:00</updated><title type='text'>Use Weak References for Your Event Listeners</title><content type='html'>Please read this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.gskinner.com/blog/archives/2006/07/as3_weakly_refe.html"&gt;http://www.gskinner.com/blog/archives/2006/07/ as3_weakly_refe.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Using weakly referenced event listeners means an object can be cleared during Garbage Collection even if there's an event listener acting upon it.&lt;br /&gt;&lt;br /&gt;It's very useful when you're spawning / deleting a lot of objects, in my case bubble "bullets" that I'm firing at targets underwater.&lt;br /&gt;&lt;br /&gt;It saved my bacon (and my forehead) as I've been banging my head on my desk wondering why objects I thought I'd removed still persisted in memory.&lt;br /&gt;&lt;br /&gt;The fact it's not a default setting and not very well explained, nor is its importance highlighted (this should be stapled to the front of the Flash CS3/Flex DVD box), is bloody annoying.&lt;br /&gt;&lt;br /&gt;Thanks Grant.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-834524086118737169?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/834524086118737169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=834524086118737169' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/834524086118737169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/834524086118737169'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2008/03/use-weak-references-for-your-event.html' title='Use Weak References for Your Event Listeners'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-3015830273295555116</id><published>2008-02-24T09:01:00.014-07:00</published><updated>2008-02-24T10:12:41.629-07:00</updated><title type='text'>Creating Class Instances from a DisplayObject in AS3</title><content type='html'>*** The technique below doesn't clone a class instance, but allows you to create a new class instance derived from an unknown DisplayObject ***&lt;br /&gt;&lt;br /&gt;After selecting an item by clicking the mouse, I needed to create a new instance of the selected item to be added to an item inventory. I needed to find out what type of  object was being passed into the MouseEvent handler so I could create a new object of a specific type i.e. &lt;br /&gt;&lt;code&gt;&lt;br /&gt;private function mouseHandler(e:MouseEvent):void&lt;br /&gt;{&lt;br /&gt;// this is only a DisplayObject - what is it?       &lt;br /&gt;trace(e.target);&lt;br /&gt;&lt;br /&gt;//  this is what I want to do, but how do I know if e.target is a Rock?&lt;br /&gt;var newItem:IItem = new Rock(); &lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The following function uses &lt;code&gt;flash.utils.getQualifiedClassName()&lt;/code&gt; to return a string that contains the name of the class including full namespace.&lt;br /&gt;&lt;br /&gt;It then uses &lt;code&gt;flash.utils.getDefinitionByName()&lt;/code&gt; to return a Class object which can then be used to create a new class.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;public function duplicateItem(obj:*):*&lt;br /&gt;{&lt;br /&gt; var className:String = getQualifiedClassName(obj).split('::').join('.');&lt;br /&gt; var ClassRef:Class = getDefinitionByName(className) as Class;&lt;br /&gt; var item:* = new ClassRef();&lt;br /&gt; return item;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;So to create a duplicate object, just use call the duplicateItem function. You can also cast the returned class instance, if required, as shown below:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;private function mouseHandler(e:MouseEvent):void&lt;br /&gt;{&lt;br /&gt;       var newItem:IItem = duplicateItem(e.target) as IItem;&lt;br /&gt;}&lt;br /&gt;&lt;code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-3015830273295555116?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/3015830273295555116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=3015830273295555116' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/3015830273295555116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/3015830273295555116'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2008/02/duplicating-classes-in-as3.html' title='Creating Class Instances from a DisplayObject in AS3'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-5239967985363236760</id><published>2008-01-29T13:39:00.000-07:00</published><updated>2008-01-29T14:55:07.132-07:00</updated><title type='text'>Flex 2: Embedding Flash 9 swfs and controling the MainTimeline</title><content type='html'>I've been embedding Flash 9 swfs into a Flex 2 project using the following code:&lt;blockquote&gt;&lt;code&gt;&lt;br /&gt;[Bindable]&lt;br /&gt;[Embed(source="myFlash9.swf")]&lt;br /&gt;private var mySwf:Class;&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;This creates the bindable variable "mySwf" which can be bound to the backgroundImage attribute of certain components e.g.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;mx:Canvas backgroundImage="{mySwf}"  /&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;However much I tried, I couldn't access the timeline of that swf as it was cast as a Class type and essentially wasn't a MovieClip. Flex only permits Class or String variables when embedding in this way. &lt;br /&gt;&lt;br /&gt;I needed to find a way to load a swf into Flex and use it as a fully accessible MovieClip. Here's what I did:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Create a bindable MovieClip variable&lt;/li&gt;&lt;li&gt;Load in the swf using the flash.display.Loader class&lt;/li&gt;&lt;li&gt;Assign the result from the Loader class to the bindable MovieClip variable&lt;/li&gt;&lt;li&gt;used the Image component in Flex to add the swf to the application&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Here's the complete MXML code:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;&amp;lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"&amp;gt;&lt;br /&gt; &amp;lt;mx:Script&amp;gt;&lt;br /&gt;  &amp;lt;![CDATA[&lt;br /&gt;   import flash.net.URLRequest;&lt;br /&gt;   import flash.display.MovieClip;&lt;br /&gt;   import flash.display.Loader;&lt;br /&gt;   import flash.events.*;&lt;br /&gt;     &lt;br /&gt;   [Bindable]&lt;br /&gt;   private var mySwf:MovieClip;&lt;br /&gt;   &lt;br /&gt;   private function init():void{&lt;br /&gt;    var bgURL:URLRequest = new URLRequest("Test.swf");    &lt;br /&gt;    var bgLoader:Loader = new Loader();  &lt;br /&gt;    bgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); &lt;br /&gt;    bgLoader.load(bgURL);&lt;br /&gt;   }&lt;br /&gt; &lt;br /&gt;         private function completeHandler(event:Event):void {&lt;br /&gt;             mySwf = event.target.content as MovieClip;&lt;br /&gt;             mySwf.gotoAndPlay(20); // access the timeline of the loaded swf&lt;br /&gt;         }&lt;br /&gt;  &lt;br /&gt;  ]]&amp;gt;&lt;br /&gt; &amp;lt;/mx:Script&amp;gt;&lt;br /&gt; &lt;br /&gt; &amp;lt;mx:Canvas width="856" height="527" horizontalCenter="0" verticalCenter="0"&amp;gt; &lt;br /&gt;  &amp;lt;mx:Image source="{mySwf}" /&amp;gt;&lt;br /&gt; &amp;lt;/mx:Canvas&amp;gt;&lt;br /&gt;&amp;lt;/mx:Application&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;You can now directly access the timeline of the loaded swf using the "mySwf" variable.&lt;br /&gt;&lt;br /&gt;Using the backgroundImage attribute caused errors as it expected a Class variable to be passed into it. Using Image seems to have got around this problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-5239967985363236760?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/5239967985363236760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=5239967985363236760' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/5239967985363236760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/5239967985363236760'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2008/01/flex-2-embedding-flash-9-swfs-and.html' title='Flex 2: Embedding Flash 9 swfs and controling the MainTimeline'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-2241417312673044847</id><published>2008-01-15T15:12:00.001-07:00</published><updated>2008-01-15T15:35:11.690-07:00</updated><title type='text'>Calgary Flash and Flex User Group Meetings</title><content type='html'>It'll be an interesting couple of months with the releases of Flex 3 and AIR and as usual, Adobe reps are doing their pre-release tours.&lt;br /&gt;&lt;br /&gt;There are 2 events in Calgary that can't be missed:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.flexcalgary.org/node/10"&gt;Calgary Flex User Group - Jan 30th 2008&lt;/a&gt;&lt;br /&gt;Flex and AIR Pre-release Tour with Adobe’s with Duane Nickull&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.flashcalgary.org/announcement/special-event-meeting/"&gt;Calgary Flash User Group - Feb 25th 2008&lt;/a&gt;&lt;br /&gt;Presentation by Adobe Chief Software Architect, Kevin Lynch&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-2241417312673044847?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/2241417312673044847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=2241417312673044847' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/2241417312673044847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/2241417312673044847'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2008/01/calgary-flash-and-flex-user-group.html' title='Calgary Flash and Flex User Group Meetings'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-390727758763623082</id><published>2008-01-14T15:25:00.001-07:00</published><updated>2008-01-14T15:35:53.439-07:00</updated><title type='text'>AS3 mp3 streaming problem with Facebook</title><content type='html'>I created a Flash game for Facebook and had a problem with the audio I was streaming through the Sound class. Loud clicks, pops and squelches ruined the audio, hurt my ears and probably didn't do my speakers any good!&lt;br /&gt;&lt;br /&gt;This problem only occurred when the swf was embedded in Facebook, tests on other servers did not produce this error.&lt;br /&gt;&lt;br /&gt;To fix this problem I did the following:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Set Securtiy.allowDomain("foo.com"); in the document class&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I also specifically set the policy file with Security.loadPolicyFile("http://www.foo.com/crossdomain.xml");&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In crossdomain.xml, add the to-ports attribute:&lt;br /&gt;&amp;lt;allow-access-from domain="www.foo.com/" secure="false" to-ports="*" /&amp;gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;This removed all clicks, bleeps and squelchy noised from the audio. I guess it has something to do with Flash only granting access to ports 1024 and above by default. Specifying to-ports="*" presumably allowed access to all available ports below 1024 and the mp3 streamed without any problems.&lt;br /&gt;&lt;br /&gt;This documentation helped: &lt;a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/system/Security.html#loadPolicyFile()"&gt;Security.loadPolicyFile()&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-390727758763623082?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/390727758763623082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=390727758763623082' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/390727758763623082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/390727758763623082'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2008/01/as3-mp3-streaming-problem-with-facebook.html' title='AS3 mp3 streaming problem with Facebook'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-6329738730490184478</id><published>2008-01-14T14:02:00.000-07:00</published><updated>2008-01-14T14:32:03.117-07:00</updated><title type='text'>Canadian Cell Phone Industry - a rant!</title><content type='html'>I've about had it with the cell phone industry in Canada. Coming from the UK, it seems about 5 years behind, the networks and available phones are pants and it's run by a few restrictive monopolies - I guess an oligopoly(!) - that expect you to sign up for 3 year contracts so you can get a Sony Ericsson K790 for only $129 dollars - it's bloody free in the UK on a 1 year contract! And 3 year contracts? I don't know where I'll be in 3 months!?&lt;br /&gt;&lt;br /&gt;So here's the rant I sent to the Canadian Radio Television and Telecommunications Commission. &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Complaint Against Bell, Rogers and Other Network Owning Cellular Phone Companies in Canada&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Introduction&lt;/span&gt; &lt;br /&gt;The general consensus among most writers in the technology industry is that mobile communications will become ever more transparent and ubiquitous &lt;br /&gt;&lt;br /&gt;Most nations in Asia, Europe, the America’s and indeed Africa have comprehensive cell phone networks. The services offered by these networks vary from country to country but of all the 1st world counties, Canadian companies appear to be providing some of the worst service to its consumers. &lt;br /&gt;&lt;br /&gt;Although tariffs in Canada are also not consistent with other parts of the world (e.g. paying for incoming calls) this complaint concentrates on a more holistic view of the entire cell phone industry in Canada.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How Canadian Cell Phone Companies Fail the Consumer&lt;/span&gt;&lt;br /&gt;Buying a cell phone from any company in any country isn’t simple. There are always hidden charges and contractual obligations that the consumer has to decipher and there are always new plans with different more elaborate pricing structures being created on a regular basis. This is an industry wide problem and not specific to Canadian companies.&lt;br /&gt;&lt;br /&gt;There are 3 mains reasons why the Canadian companies offer worse service to their consumers than other 1st world (and some developing) countries, with each reason a consequence of the reason before it:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Canadian cell phone networks are not up to the standards of other 1st world nations e.g. 3G HSDPA networks in most of Europe, and East Asia.&lt;br /&gt;&lt;br /&gt;Canada is a vast country, but most dense urban area’s still do not have blanket 3G HSDPA coverage, even as we enter the 2nd decade of the 21st century. It appears a chronic lack of investment has made Canada’s cellular services lag behind.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Subsequently the range of mobile devices is poor and these devices are not as advanced as those available in other 1st world countries.&lt;br /&gt;&lt;br /&gt;Why would a manufacturer sell quad-band 3G phones in a country that doesn’t have the network capability to support them?&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Phone subsidies are small and often require 3 year contracts. The consumer still has to pay up-front for the mobile device.&lt;br /&gt;&lt;br /&gt;3 year contracts are not common elsewhere, but in Canada they’re used as a method to sell smart phones at a cheaper price while also locking the consumer to a company for a long period of time. In other countries, such as the UK, phone companies offer smart phones for free on 1 year or 18 month contracts that have slightly higher monthly payments (the subsidy). Usually you can stay with your provider and upgrade to the latest smart phone for free (or a small charge) at the end of your contract i.e. once per year. The consumer always has the latest device and the company has retained their business with that consumer. &lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Phone subsidies also play an important role in empowering the consumer with a device that can generate more revenue for the phone company (see The Monopolies are Stifling an Entire Industry)&lt;br /&gt;&lt;br /&gt;The bottom line is that Canadians are paying more for less i.e. they’re locked into unrealistically long contracts for phones that are worse than those offered in other parts of the world. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The Monopolies are Stifling an Entire Industry&lt;/span&gt;&lt;br /&gt;Canadians are not empowered with subsidised mobile devices, which is probably why the penetration rate of cell phones in Canada is so low (about 51%). It’s also conceivable that the number of people with top quality smart phones is also low as the consumer has to pay for it up front and/or be locked into an uncomfortably long 3 year contract.&lt;br /&gt;&lt;br /&gt;Therefore there is only a small audience for any company offering interactive mobile services to Canadians. Services such as: SMS short code payment, Java/Flashlite games or mp3 players, mobile payment handlers, GIS / cell location services, business directories, VoIP etc.&lt;br /&gt;&lt;br /&gt;Many of these services use data calls that network providers will charge per megabyte. The formula is simple:&lt;br /&gt;&lt;br /&gt;Network investment + subsidised phones = more people with smart phones = more online/data services = more downloading = more revenue = more business for the networks and a 3rd party economy utilising those networks.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Conclusion &lt;/span&gt;&lt;br /&gt;It seems ridiculous why the like of Bell, Rogers (and others) have not yet seen or acted upon this. We go back to reason #1 above: minimal investment by the network owners has provided a service which is only just good enough. They control the networks and supply of mobile devices. They must be making lots of profit by providing a mediocre service with minimal investment. They know it will cost them billions of dollars to set up modern networks to catch up with the rest of the world. &lt;br /&gt;&lt;br /&gt;Their myopic vision is stifling not just a business sector, but an entire technological and social revolution which is happening all over the world at an incredible speed. Speak to anyone in Europe and Asia about the mobile services they use and how it fits into their life and ask a Canadian the same thing, is like asking a teenager about filing taxes: they know what it is, but they just don’t quite get it. Why? Because they’ve never been fully exposed to it. &lt;br /&gt;&lt;br /&gt;The available interactive cellular services in Canada are at about the same level the UK was in 2002/2003 – an age in this industry. Soon, Canadians will look, embarrassed in front of the rest of the world (if they don’t already) and wonder “why are we so behind the times? Why do we not have the phones and services you can get in Europe, Asia and elsewhere?” Look no further than the restrictive monopolies of Bell, Rogers et al and the current communications regulations.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/////&lt;br /&gt;&lt;br /&gt;There... I feel so much better. Anyone fancy joining a Campaign for Free Phones in Canada?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-6329738730490184478?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/6329738730490184478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=6329738730490184478' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/6329738730490184478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/6329738730490184478'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2008/01/canadian-cell-phone-industry-rant.html' title='Canadian Cell Phone Industry - a rant!'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-5615966371319147659</id><published>2007-12-11T08:58:00.000-07:00</published><updated>2007-12-11T09:22:35.447-07:00</updated><title type='text'>Array.shuffle() in AS3</title><content type='html'>Here's an AS3 class called ExtendedArray that unsurprisingly extends the functionality of the Array class. One important thing to note is that it is a dynamic class. This allows you to add properties and methods to the base class at runtime.&lt;br /&gt;&lt;br /&gt;Another thing to note is looping through the optionalArgs (or "rest" arguments as they're known) and using super.push() to populate the Array in the constructor. Simply using super(optionalArgs) would create an array within the Array i.e. a 2d array.&lt;br /&gt;&lt;br /&gt;The shuffle function is just a slightly different version of the AS2 shuffle functions you can find on the web. Using the asterisk (*) as a datatype means that any type can be handled by the shuffle function.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;package com.utils&lt;br /&gt;{&lt;br /&gt; dynamic public class ExtendedArray extends Array&lt;br /&gt; {&lt;br /&gt;  public function ExtendedArray(... optionalArgs){&lt;br /&gt;   for each (var value:* in optionalArgs){&lt;br /&gt;    super.push(value);&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  public function shuffle(startIndex:int = 0, endIndex:int = 0):Array{ &lt;br /&gt;   if(endIndex == 0) endIndex = this.length-1;&lt;br /&gt;   for (var i:int = endIndex; i&gt;startIndex; i--) {&lt;br /&gt;    var randomNumber:int = Math.floor(Math.random()*endIndex)+startIndex;&lt;br /&gt;    var tmp:* = this[i];&lt;br /&gt;    this[i] = this[randomNumber];&lt;br /&gt;    this[randomNumber] = tmp;&lt;br /&gt;   }&lt;br /&gt;   return this;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;You could add many more functions to this to increase the functionality of the base Array class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-5615966371319147659?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/5615966371319147659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=5615966371319147659' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/5615966371319147659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/5615966371319147659'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/12/arrayshuffle-in-as3.html' title='Array.shuffle() in AS3'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-599731898793799784</id><published>2007-11-07T09:52:00.000-07:00</published><updated>2007-11-07T10:12:19.966-07:00</updated><title type='text'>Google AdWords and Math.random</title><content type='html'>A colleague just came across a problem with a Flash banner when uploading it to Google AdWords.&lt;br /&gt;&lt;br /&gt;The banner contained an effect where many movie clips were randomly generated and positioned. Yet when uploaded to Google AdWords, an error occurred stating that random numbers could not be used.&lt;br /&gt;&lt;br /&gt;The problem is with Math.random, Google AdWords doesn't allow it. We called the AdWords help desk and they confirmed that Math.random cannot be used, but were unable to give a reason why. &lt;br /&gt;&lt;br /&gt;Is this a security hole in Flash? LiveDocs say Math.random is "calculated in an undisclosed manner", so does it use the client hardware to generate that number? I'm now intrigued, if anyone can shed some light on this please comment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-599731898793799784?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/599731898793799784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=599731898793799784' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/599731898793799784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/599731898793799784'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/11/google-adwords-and-mathrandom.html' title='Google AdWords and Math.random'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-3800613907297710107</id><published>2007-08-07T16:04:00.000-06:00</published><updated>2007-08-07T17:10:46.953-06:00</updated><title type='text'>Two Flavours of AS3?</title><content type='html'>Actionscript 3 was first introduced with Flex 2 in the summer of 2006. At this time Macromedia (the inventors of Flex and Flash) were being acquired by Adobe. Previous to the acquisition all Macromedia class packages were prefixed with "mx" e.g. "mx.controls.Button".&lt;br /&gt;&lt;br /&gt;Flex 2 kept the Macromedia "mx" naming convention and it seems Flex 3 (due for release later in 2007) will do the same. However Flash CS3, has been "Adobefied" and class packages relating to Flash CS3 are prefixed with "fl" e.g. "fl.controls.Button" - makes sense though.&lt;br /&gt;&lt;br /&gt;These class libraries share a lot in common, though it appears that the Flex libraries are more extensive than Flash CS3. It'll be interesting to find the boundaries between Flash and Flex Actionsctipt as we use it more. &lt;br /&gt;&lt;br /&gt;Flex is component based and is used to build rich user interfaces quickly and easily - it's kind of a "Flash for Web Developers". Flash is more graphical and suited to visual presentations and games. Under the hood, they are essentially the same, Flex and Flash are programmed in AS3 and except for the MXML interpreter in Flex, the AS3 compiler (I currently believe - I may be wrong) is the same. &lt;br /&gt;&lt;br /&gt;This raises some important questions:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Can the Flex 2 compiler be used to compile AS3 for Flash? &lt;/li&gt;&lt;li&gt;Will we have 2 flavours of AS3? &lt;/li&gt;&lt;li&gt;Why buy 2 products that build swf's?&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;Ultimately I think the answer is that Adobe can have two $500 applications for sale rather than one. It is quite confusing (well it confuses me)! Should we now be called "Actionscript Developers" not "Flash" or "Flex" developers? &lt;br /&gt;&lt;br /&gt;This may be a good thing. For example, Java developers have many different routes to choose from and a Java developer who knows his/her beans (so to speak) get high-end salaries / contracting rates. It could also root Actionscript 3 as a "proper" programming language for RIA's (Rich Internet Applications).&lt;br /&gt;&lt;br /&gt;Another possibility is that Adobe merge the Flash timeline, library and drawing tools into the Flex Builder. Although that's probably never going to happen!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Compare the AS3 References&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/" target="_blank"&gt; Flash AS3 Language Reference&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://livedocs.adobe.com/flex/2/langref/" target="_blank"&gt;Flex 2 AS3 Language Reference&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-3800613907297710107?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/3800613907297710107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=3800613907297710107' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/3800613907297710107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/3800613907297710107'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/08/two-flavours-of-as3.html' title='Two Flavours of AS3?'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-768482470466637456</id><published>2007-07-30T09:09:00.000-06:00</published><updated>2007-07-30T09:42:31.839-06:00</updated><title type='text'>Edit and Compile AS3/Flex for FREE!</title><content type='html'>Having exhausted my supply of free trials of Flash CS3 and Flex Builder, I managed to work out how to attach the latest Flex 3 compiler to FlashDevelop. Editing AS3 in Flash Develop is as good as the Flex Builder's text editor in Eclipse. It does all the imports and the predictive typing drills into classes perfectly (including your own). MXML is not that good but can still be compiled by the Flex 3 compiler. In Flash develop you can choose between an AS3 project and an Flex (MXML) project, either of them can be compiled.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Setting it up&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These instructions are for the Flex 3 beta version (Moxie), the links to the Flex download will probably change once Flex 3 is fully released.&lt;br /&gt;&lt;br /&gt;For this you will need to download:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; &lt;a href="http://www.flashdevelop.org/community/viewforum.php?f=11" title="http://www.flashdevelop.org/community/viewforum.php?f=11" target="_blank"&gt;FlashDevelop&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; &lt;a href="http://labs.adobe.com/technologies/flex/sdk/flex3sdk.html"  title="http://labs.adobe.com/technologies/flex/sdk/flex3sdk.html" target="_blank"&gt;Flex 3 SDK&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt; Install the latest version of FlashDevelop&lt;/li&gt;&lt;li&gt; Unzip the SDK to C:\Program Files\FlashDevelop\Flex3SDK&lt;/li&gt;&lt;li&gt; Launch FlashDevelop&lt;/li&gt;&lt;li&gt; Go to Tools -&gt; Program Settings -&gt; Plugins -&gt; AS3Context -&gt; Settings.&lt;/li&gt;&lt;li&gt; Set "Flex2SDK Location" to "C:\Program Files\FlashDevelop\Flex3SDK"&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;To test do the following:&lt;br /&gt;&lt;ol&gt;&lt;li&gt; Go to Project -&gt; New Project&lt;/li&gt;&lt;li&gt; Select "ActionScript 3 - Default Project"&lt;/li&gt;&lt;li&gt; Set the Name as "Test" and select your Location and click OK&lt;/li&gt;&lt;li&gt; Project -&gt; Test Movie&lt;/li&gt;&lt;li&gt; You should see a new blank screen named Test.swf&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;As it' a .NET application it works only on a Windows PC. However, there are reports on the FlashDevelop messageboard that it also works fine on Intel based Macs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-768482470466637456?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/768482470466637456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=768482470466637456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/768482470466637456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/768482470466637456'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/07/edit-and-compile-as3flex-for-free.html' title='Edit and Compile AS3/Flex for FREE!'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-3295140651153121413</id><published>2007-07-16T15:00:00.000-06:00</published><updated>2007-07-16T15:04:00.615-06:00</updated><title type='text'>A Decent, FREE, AS3 Editor!</title><content type='html'>I used to use SEPY a lot, but it just didn't cut the mustard for AS3. Having used the Flex 2 Builder I wanted something that'd do all the imports and have good predictive typing to help me through my first AS3 projects until I get used to the class structures.&lt;br /&gt;&lt;br /&gt;After a lot of searching around, I found this:&lt;br /&gt;&lt;a href="http://www.flashdevelop.org/" target="_blank"&gt;http://www.flashdevelop.org/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-3295140651153121413?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/3295140651153121413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=3295140651153121413' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/3295140651153121413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/3295140651153121413'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/07/decent-free-as3-editor.html' title='A Decent, FREE, AS3 Editor!'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-841021795768565118</id><published>2007-07-09T20:59:00.000-06:00</published><updated>2007-07-09T21:07:11.094-06:00</updated><title type='text'>MySpace technical woes.</title><content type='html'>I, as many, have a page on MySpace (&lt;a href="http://www.myspace.com/lapsusmentismusic" target="_blank"&gt;www.myspace.com/lapsusmentismusic&lt;/a&gt;). There's always been little niggles with MySpace, occasional "an error has occurred" messages, which I put down to shoddy Fusebox programming. &lt;br /&gt;&lt;br /&gt;These days it seems the errors are occuring so frequently that the MySpace application is frustrating and almost impossible to use, without getting one of these errors. A large part of their problem lies in the success of MySpace and the huge amounts of traffic it generates. The architecture to support massive traffic volumes just wasn't there.&lt;br /&gt;&lt;br /&gt;I found this interesting article that explains their technical woes and is a lesson to us all: &lt;a href="http://www.doughughes.net/index.cfm?event=viewEntry&amp;entryId=116" target="_blank"&gt;http://www.doughughes.net/index.cfm?event=viewEntry&amp;entryId=116&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-841021795768565118?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/841021795768565118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=841021795768565118' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/841021795768565118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/841021795768565118'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/07/myspace-technical-woes.html' title='MySpace technical woes.'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-5373671523485673758</id><published>2007-06-13T17:10:00.000-06:00</published><updated>2007-06-14T09:13:02.394-06:00</updated><title type='text'>Adobe UK Licencing Problems</title><content type='html'>A friend of mine is have a real nightmare upgrading to CS3. He purchaced a 24 month MVLP licence in January 2006 which entitles him to free upgrades within that period. Adobe seem to have forgotten this and after 7 weeks of frustration with Adobe, Paul still has no CS3!&lt;br /&gt;&lt;br /&gt;Paul is self-employed and this delay has the potential to affect his business.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.creacog.co.uk/2007/06/13/my-experience-with-adobe-uk-licensing-horrible/" target="_blank"&gt;Click here to read his blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I've had a similiar experience trying to change my Flex Builder 2 licence from PC to Mac, as my poor 3 year old PC couldn't cope with it! After multiple phone calls and hours on the phone and not getting through, I sent an email to customer support who said "as this is a licencing issue, please call our customer support line". Thanks for that useful message Adobe! Just what I wanted.&lt;br /&gt;&lt;br /&gt;I tried to call a few more times, but decided it'd be easier using the Windows version of Flex Builder via Parallels on my Mac!&lt;br /&gt;&lt;br /&gt;Here's another interesting article about Adobe pricing:&lt;a href="http://web.mac.com/libine/iWeb/Site/Article.html" target="_blank"&gt;http://web.mac.com/libine/iWeb/Site/Article.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-5373671523485673758?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/5373671523485673758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=5373671523485673758' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/5373671523485673758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/5373671523485673758'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/06/adobe-uk-licencing-problems.html' title='Adobe UK Licencing Problems'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-6457263368716987429</id><published>2007-06-11T10:49:00.001-06:00</published><updated>2007-06-11T11:09:04.124-06:00</updated><title type='text'>Ways of connecting to Flex with Coldfusion</title><content type='html'>This is a brief outline of the ways it can be done. There are many more in-depth examples on the web:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Set up you data sources in Coldfusion&lt;/span&gt;&lt;br /&gt;Do as normal, but if you're using a MySQL version over 4, you must download the JDBC drivers. Follow this Adobe technote &lt;a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19170&amp;sliceId=2" target="_blank"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Design your CFC's&lt;/span&gt;&lt;br /&gt;There are many ways in which you can connect to Flex. Flex Remoting or using Coldfusion / Flex connectivity (for this make sure you have all the latest CF updates for Flex 2 &lt;a href="http://www.adobe.com/products/coldfusion/flex2/" target="_blank"&gt;here&lt;/a&gt;). &lt;br /&gt;&lt;br /&gt;Your CFC's must be designed to do the tasks required in an efficient way so that Flex uses the minimum of service calls. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Setting up Coldfusion for Flex Remoting&lt;/span&gt;&lt;br /&gt;There are a few ways to set up remoting in Coldfusion, the simplest way is to set all CFC functions that need connecting to Flex i.e. to act as web services, to access="remote". &lt;br /&gt;&lt;br /&gt;A more complex, but efficient way is to create a lightweight gateway CFC as an interface to the underlying CFC architecture. For example, consider CFC's called "MyService.cfc" and "MyGateway.cfc". &lt;br /&gt;&lt;br /&gt;MyService.cfc contains all the logic you need doing: database queries etc. function access="public". Load this CFC into the application scope onApplicationStart, this way it is only intantiated one throught the whole application. &lt;br /&gt;&lt;br /&gt;MyGateway.cfc is the remoting interface and contains no logic, it mearly calls the functions in MyService.cfc (now application.MyService). These function should be set to access="remote". &lt;br /&gt;&lt;br /&gt;When you call CFC's from Flex (or Flash), a new instance of the CFC is created in memory on the Coldfusion server. If you call the full, bloated MyService.cfc each time you make a request you'll be using more memory than necessary, therefore the lightweight MyGateway.cfc is the one that is instantiated multiple times by Flex.&lt;br /&gt;&lt;br /&gt;In Flex you need to use the HTTPService class/tag. Enter the URL for the CFC you want to call. Coldfusion will return a WDDX formatted XML response, which Flex components can parse and use natively. &lt;br /&gt;&lt;br /&gt;This architecture is used and explained more on:&lt;br /&gt;&lt;a href="http://www.asfusion.com"&gt;ASFusion.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Using Coldfusion / Flex connectivity&lt;/span&gt;&lt;br /&gt;Provided you've done all the updates. Create your myService.cfc as above containing all the logic. However, this time you won't need your MyGateway.cfc as you'll create equivalent classes in Flex which match MyService.cfc i.e. create MyService.as with all the same functions and arguments.&lt;br /&gt;&lt;br /&gt;You can then instantiate MyService.as in Flex and use it just like any other object. This allows you to access all the backend power of Coldfusion via normal Actionscript function calls - pretty powerful!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;My tuppence worth&lt;/span&gt;&lt;br /&gt;Great and powerful CF/Flex connectivity may be, I'd personally use remoting for my Flex applications as this will make your Flex application platform independent.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-6457263368716987429?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/6457263368716987429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=6457263368716987429' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/6457263368716987429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/6457263368716987429'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/06/ways-of-connecting-to-flex-with.html' title='Ways of connecting to Flex with Coldfusion'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-3132852671792065891</id><published>2007-06-05T12:58:00.001-06:00</published><updated>2007-06-05T13:26:08.453-06:00</updated><title type='text'>Resolution to the Flash 3 mintue load!  (And Acrobat Reader 8 and Firefox problems)</title><content type='html'>After a lot of trawling around and a lot of dead ends, the problem was actually font based.&lt;br /&gt;&lt;br /&gt;I noticed that csrss.exe was at 100% when I tried to load Flash CS3, Acrobat Reader 8 and get into Google News. The only Microsoft resolution (&lt;a href="http://support.microsoft.com/kb/555021"&gt;http://support.microsoft.com/kb/555021&lt;/a&gt;) suggests recreating your user profile - don't!&lt;br /&gt;&lt;br /&gt;I couldn't find any other posts that had a solution to my problem, but I considered it could be font based as Flash CS3 freezes when "Initializing fonts".&lt;br /&gt;&lt;br /&gt;In my system.ini file I noticed a list of .FON commands:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;[386enh]&lt;br /&gt;woafont=dosapp.FON&lt;br /&gt;EGA80WOA.FON=EGA80WOA.FON&lt;br /&gt;EGA40WOA.FON=EGA40WOA.FON&lt;br /&gt;CGA80WOA.FON=CGA80WOA.FON&lt;br /&gt;CGA40WOA.FON=CGA40WOA.FON&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I removed these and now everything works fine!&lt;br /&gt;&lt;br /&gt;I discovered that this is what Windows uses to emulate fonts in EGA and CGA monitors (it's 2007 for godssake!). So far, I've had no ill effects from removing them from my system.ini file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-3132852671792065891?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/3132852671792065891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=3132852671792065891' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/3132852671792065891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/3132852671792065891'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/06/resolution-to-flash-3-mintue-load.html' title='Resolution to the Flash 3 mintue load!  (And Acrobat Reader 8 and Firefox problems)'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-3778680105467362390</id><published>2007-05-24T10:20:00.000-06:00</published><updated>2007-05-24T10:30:49.479-06:00</updated><title type='text'>Convert Lines to Fills - smoothing shapes in Flash</title><content type='html'>This is a quirk of Flash, which has caught me out a few times. If you're drawing a rounded rectangle with an internal fill colour and a stroke (outline) of 3 pixels, for example, then you get a rather jagged apperance between the fill colour and the stroke.&lt;br /&gt;&lt;br /&gt;If you zoom into the shape, all looks fine and smooth, but zooming back to 100% the problem appears again.&lt;br /&gt;&lt;br /&gt;To solve this, you must select the stroke (outline) of the shape - double click it to make sure all of it is selected. Then choose Modify &gt; Shape &gt; Convert Lines to Fills.&lt;br /&gt;&lt;br /&gt;This solves the problem and your shape now looks smooth.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-3778680105467362390?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/3778680105467362390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=3778680105467362390' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/3778680105467362390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/3778680105467362390'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/05/convert-lines-to-fills-smoothing-shapes.html' title='Convert Lines to Fills - smoothing shapes in Flash'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-2344868945579872471</id><published>2007-05-17T17:29:00.000-06:00</published><updated>2007-05-17T18:04:25.425-06:00</updated><title type='text'>Extensible ServiceLoader</title><content type='html'>As part of the solution to the problem below, I've created a new ServiceLoader class that can be used for any remoting applications. Here's the class:&lt;br /&gt;&lt;br /&gt;&lt;code style="font-size: 10px;"&gt;&lt;br /&gt;import mx.remoting.*;&lt;br /&gt;import mx.rpc.*;&lt;br /&gt; &lt;br /&gt;class com.utils.ServiceLoader   {&lt;br /&gt; &lt;br /&gt; private var __servicePath:String;&lt;br /&gt;  &lt;br /&gt; function ServiceLoader(servicePath:String){&lt;br /&gt;  __servicePath = servicePath;&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; private function __openService(remoteName:String):Service {&lt;br /&gt;  trace(remoteName);&lt;br /&gt;  return new Service(__servicePath, null, remoteName);&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; public function callService(serviceName:String, methodName:String, scope:Object, success:String, error:String, args:Array):Void{&lt;br /&gt;  var pc:PendingCall = __openService(serviceName)[methodName].apply(this,args);&lt;br /&gt;  pc.responder = new RelayResponder(scope, success, error);&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Here's an example call of this class:&lt;br /&gt;&lt;code style="font-size: 10px;"&gt;&lt;br /&gt;var service:Object = new ServiceLoader("http://localhost:8300/flashservices/gateway/");&lt;br /&gt;&lt;br /&gt;service.callService("serviceName", "serviceMethodName", this, "successHandler", "errorHandler" &lt;i&gt;[,optional argument Array]&lt;/i&gt;);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So the ServiceLoader class calls whatever service you need and returns the result to handlers in a specified scope ("this" i.e. the calling class, in above the example).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-2344868945579872471?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/2344868945579872471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=2344868945579872471' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/2344868945579872471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/2344868945579872471'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/05/extensible-serviceloader.html' title='Extensible ServiceLoader'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-1468496027097439052</id><published>2007-05-17T14:42:00.000-06:00</published><updated>2007-05-17T14:53:46.642-06:00</updated><title type='text'>Accessing class function using a string</title><content type='html'>Here's a piece of dodgy looking code - but it works!?&lt;br /&gt;&lt;br /&gt;I've got a class called "ServiceLoader" which contains many service calls, I also have buttons which correspond to these service calls. I've named the buttons as the ServiceLoader function names e.g. "getRecord" button corresponds to the "getRecord" function in my ServiceLoader class.&lt;br /&gt;&lt;br /&gt;So I can grab the button name, which is a String and then call a function within the ServiceLoader class using associative array syntax:&lt;br /&gt;&lt;br /&gt;var func:String = activeButton._name;&lt;br /&gt;ServiceLoaderInstance[func](arg1,arg2);&lt;br /&gt;&lt;br /&gt;I'm not sure how "correct" this is, but it works. Any thoughts?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-1468496027097439052?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/1468496027097439052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=1468496027097439052' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/1468496027097439052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/1468496027097439052'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/05/accessing-class-function-using-string.html' title='Accessing class function using a string'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-4571778225390592833</id><published>2007-05-09T15:00:00.000-06:00</published><updated>2007-05-09T15:16:51.869-06:00</updated><title type='text'>Adobe Flash CS3 - 3 minute load!?</title><content type='html'>I've just downloaded Flash CS3. It promises much, but at 1.2GB, the install seems a little on the large side. Along with Flash comes Adobe Bridge, Device Central (whatever that is), ExtendScript Toolkit (eh?), and the video encoder. I'm sure all of these apps will be quite useful, once I've got to know what they do.&lt;br /&gt;&lt;br /&gt;To my annoyance, Flash CS3 seems to have been Adobefied in the same way as Acrobat Reader 8. Every time I try and open a pdf, no matter how big or small, Acrobat Reader grinds to a halt for about 5 minutes or crashes completely.&lt;br /&gt;&lt;br /&gt;I have a 3GHz dual core machine with 2GB of RAM and it takes 3 minutes for Flash CS3 to start!&lt;br /&gt;&lt;br /&gt;I'll put this down as a trial version quirk and hope the final version isn't as slow. But I'm not holding my breath, after 3 minutes I'd be clinically brain dead!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-4571778225390592833?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/4571778225390592833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=4571778225390592833' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/4571778225390592833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/4571778225390592833'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/05/adobe-flash-cs3-3-minute-load.html' title='Adobe Flash CS3 - 3 minute load!?'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-8900037246421837843</id><published>2007-05-07T15:53:00.000-06:00</published><updated>2007-05-07T16:04:46.075-06:00</updated><title type='text'>Flex Coldfusion Integration - don't follow Adobe!</title><content type='html'>So... I've had a bit of free time at work to brush up on Flex, specifically Flex and Coldfusion integration. &lt;br /&gt;&lt;br /&gt;I've been doing Flash remoting with Coldfusion Flash forms, which were really Flex 1.5. for the last 18 months. I followed the CFC structures as described on &lt;a href="http://www.asfusion.com"&gt;www.asfusion.com&lt;/a&gt; and &lt;a href="http://ray.camdenfamily.com/"&gt;ray.camdenfamily.com&lt;/a&gt;: store your CFC's in the Application scope and access them with a lightweight proxy CFC that handles the remoting. This structure improves performance, as the proxy CFC is instantiated on each request and it acts as an interface to the bulky CFC's that do all the complicated stuff. From Flex's point of view, this proxy CFC acts just like any other web service on any platform.&lt;br /&gt;&lt;br /&gt;So I've been confused by Adobe's instructions for Flex / Coldfusion integration. They suggest you create Actionscript equivalents of your CFC's and essentially map the properties and methods of the CFC into Actionscript. This has the benefit of accessing CFC's as if they were native classes and there'd be no problem with handling data types - essentially extending Flex with Coldfusion. &lt;br /&gt;&lt;br /&gt;However, my new job is in Calgary, Canada, where PHP reigns and Coldfusion is a rarity, hardly anyone uses it. So why would I create a Flex app which is so intertwined with Coldfusion? Even if I was in a Coldfusion centric environment, I still wouldn't build this way as I may need to port the Flex application to another Platform. I could quickly convert the CFC's to PHP classes and have no need to change the Flex application at all.&lt;br /&gt;&lt;br /&gt;The reason I rant, is that I've been following Flex tutorials which have been confusing and going against what I thought was "right". I think I'll just stick with tips from AS Fusion and Ray Camden from now on!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-8900037246421837843?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/8900037246421837843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=8900037246421837843' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/8900037246421837843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/8900037246421837843'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/05/flex-coldfusion-integration-dont-follow.html' title='Flex Coldfusion Integration - don&apos;t follow Adobe!'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-7375665852698955839</id><published>2007-04-09T11:50:00.000-06:00</published><updated>2007-04-09T11:59:18.805-06:00</updated><title type='text'>Declaring global array variables in classes</title><content type='html'>When declaring a global array public/private variable in a class, make sure you only call new Array() in the constructor like so:&lt;br /&gt;&lt;br /&gt;class myClass{&lt;br /&gt;&lt;br /&gt;private var __myArray:Array;&lt;br /&gt;&lt;br /&gt;function myClass(){&lt;br /&gt;__myArray = new Array();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;NOT like this:&lt;br /&gt;&lt;br /&gt;class myClass{&lt;br /&gt;&lt;br /&gt;private var __myArray:Array = new Array();&lt;br /&gt;&lt;br /&gt;function myClass(){}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;If you declare array vars as above,__myArray in subsequent instantiations of myClass will contain the data from the first instantiation of myClass. Seem like a bug to me, but at least I now know not to declare variables like this again!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-7375665852698955839?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/7375665852698955839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=7375665852698955839' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/7375665852698955839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/7375665852698955839'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/04/declaring-global-array-variables-in.html' title='Declaring global array variables in classes'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-716305986091279006</id><published>2007-03-08T13:23:00.000-07:00</published><updated>2007-03-08T13:34:21.883-07:00</updated><title type='text'>Flash wmode / Firefox: key.isDown() always returns false</title><content type='html'>If you set wmode when you embed your Flash movie, key presses will not work in Firefox. This is because, in Firefox, Key.isDown() always returns false.&lt;br /&gt;&lt;br /&gt;If using wmode, use Key.getCode() instead of Key.isDown()&lt;br /&gt;&lt;br /&gt;This post helped me solve the problem:&lt;br /&gt;&lt;a href="http://www.johanvanmol.org/content/view/47/41/" target="_blank"&gt;http://www.johanvanmol.org/content/view/47/41/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-716305986091279006?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/716305986091279006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=716305986091279006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/716305986091279006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/716305986091279006'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/03/flash-wmode-firefox-keyisdown-always.html' title='Flash wmode / Firefox: key.isDown() always returns false'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-834670007956247140</id><published>2007-02-13T13:22:00.000-07:00</published><updated>2007-02-13T13:56:47.326-07:00</updated><title type='text'>Dreamweaver 8 / IE 7 FTP bug</title><content type='html'>My computer at work melted recently (literally) and after IT rebuilt it I found all my FTP details for sites in Dreamweaver 8 would go missing every time I reopened it.&lt;br /&gt;&lt;br /&gt;This is a bug with the IE 7 "release candidate", which does weird things to registry entries. Here's the Adobe technote:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=3491671c"&gt;http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=3491671c&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-834670007956247140?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/834670007956247140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=834670007956247140' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/834670007956247140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/834670007956247140'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2007/02/dreamweaver-8-ie-7-ftp-bug.html' title='Dreamweaver 8 / IE 7 FTP bug'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-115288872051594383</id><published>2006-07-14T08:40:00.000-06:00</published><updated>2006-07-14T09:25:55.490-06:00</updated><title type='text'>CFC's - not all that object oriented</title><content type='html'>I had this cracking idea to store repopulate data in CF flash forms using a cfc and storing it in the session scope, then using a remoting function to broadcast this data so the form fields could data bind to remote service. Didn't quite work.&lt;br /&gt;&lt;br /&gt;My cfc basically looked like this:&lt;br /&gt;&lt;br /&gt;&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;cfset this.formData = StructNew() /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;cffunction name="getValues" returntype="remote"&amp;gt;&lt;br /&gt;&amp;lt;cfreturn this.formData /&amp;gt;&lt;br /&gt;&amp;lt;/cffunction&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;&lt;br /&gt;I instantiated the above cfc in the onSessionStart function:&lt;br /&gt;&lt;br /&gt;Session.objFormData = CreateObject("component","formData")&lt;br /&gt;&lt;br /&gt;I then used the onRequestStart function to populate the Session based object (as per the previous post):&lt;br /&gt;&lt;br /&gt;&amp;lt;cfloop list="#form.fieldnames#" index="item"&amp;gt;&lt;br /&gt;&amp;lt;cfset Session.objFormData.formData[item] = Evaluate(item) /&amp;gt;&lt;br /&gt;&amp;lt;/cfloop&amp;gt;&lt;br /&gt;&lt;br /&gt;This works fine and removes the need for an "action" page - just simply copy the form into the session until you need it (a bit wasteful, yes, but really quick code if you're in a hurry!)&lt;br /&gt;&lt;br /&gt;You'd think the value returned by "this.formData" would be the data stored in the session instance. Not so... all that was returned was an empty structure! This was essentially the uninstantiated cfc with no data. Doing a cfdump of the session showed that the object and data were still in the session scope, but "this" did not return the values of the object in the session.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-115288872051594383?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/115288872051594383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=115288872051594383' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/115288872051594383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/115288872051594383'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2006/07/cfcs-not-all-that-object-oriented.html' title='CFC&apos;s - not all that object oriented'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-115287389531045774</id><published>2006-07-14T04:27:00.000-06:00</published><updated>2007-01-10T21:36:57.646-07:00</updated><title type='text'>Copying form scope into session scope CFMX 7</title><content type='html'>I've just noticed a weird behaviour with the form scope in CFMX 7. I was trying to copy all the data in the form to a session variable e.g.&lt;br /&gt;&lt;br /&gt;Session.formData = StructNew()&lt;br /&gt;Session.formData = form&lt;br /&gt;&lt;br /&gt;Do a &amp;lt;cfdump var="#session#"&amp;gt; immediately after that line and you see the form structure inside the session structure. However, I noticed that when I redirect onto another page without form scope, the Session.formData structure was empty - it didn't persist, even though it was copied to the Session scope!?&lt;br /&gt;&lt;br /&gt;What must be happening is that a reference to the form scope is copied into the Session NOT the form data. When you move to another page where the form scope does not exist, then the data is not in the Session.&lt;br /&gt;&lt;br /&gt;You must loop though form.fieldnames and set the data explicitly, like so:&lt;br /&gt;&amp;lt;cfloop list="#form.fieldnames#" index="item"&amp;gt;&lt;br /&gt;&amp;lt;cfset Session.formData[item] = Evaluate(item) /&amp;gt;&lt;br /&gt;&amp;lt;/cfloop&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I should try and remember to start posting more!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-115287389531045774?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/115287389531045774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=115287389531045774' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/115287389531045774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/115287389531045774'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2006/07/copying-form-scope-into-session-scope.html' title='Copying form scope into session scope CFMX 7'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-114424211930605061</id><published>2006-04-05T06:53:00.000-06:00</published><updated>2006-04-05T08:14:18.433-06:00</updated><title type='text'>Should I buy a Mac or PC?</title><content type='html'>I thought long and hard about this and it really didn't come down to a hardware decision at all. I'd buy a computer that ran on hamsters in wheels if it was easy to use and had all the capabilities I need.&lt;br /&gt;&lt;br /&gt;The specs for the latest Toshiba Qosmio dual core machines are very simliar to the MacBook Pro: same CPU, same graphics cards etc., yet they're a few hundred quid cheaper. But with Macs, you get what you pay for: design, simplictiy and well intergrated components. However, I personally think the MacBook Pro is over priced, I don't really like the look of it and the keyboard is too small. It could have been made much bigger if they'd repositioned the speakers and reduced the size of the touch pad.&lt;br /&gt;&lt;br /&gt;I've upgraded from a 2.33GHz P4 Sony Vaio notebook (which I'll still use) to the 17" iMac 1.8GHz Core Duo. The iMac is truly great. I don't think &lt;b&gt;&lt;i&gt;any&lt;/i&gt;&lt;/b&gt; PC would have given me the same feeling of money well spent. I'm converted. Not specifically to Macs, but OS X. &lt;br /&gt;&lt;br /&gt;I can get all the apps I need on OS X, plus loads of free downloadable stuff - just like you can on Windows XP (although sometimes the open source stuff is hard to install). &lt;br /&gt;&lt;br /&gt;You never know Microsoft could surprise us all in January with Windows Vista - a stable well designed Operating System... but i doubt it. If Steve Jobs had any sense he'd make next version of OS X run on PC's and release it in October 2006.&lt;br /&gt;&lt;br /&gt;However, the thing that makes Windows so unreliable is the vast amount of hardware it has to support. OS X is designed for Macs with specific components, but under the cover Macs are looking more and more like PC's.&lt;br /&gt;&lt;br /&gt;Still, I reckon the iMac is probably the best computer for its price at the moment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-114424211930605061?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/114424211930605061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=114424211930605061' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/114424211930605061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/114424211930605061'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2006/04/should-i-buy-mac-or-pc.html' title='Should I buy a Mac or PC?'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-114365187207525718</id><published>2006-03-29T09:32:00.000-07:00</published><updated>2006-03-29T10:10:43.786-07:00</updated><title type='text'>Audio Cue Points in Flash MX 2004 Pro / Flash 8</title><content type='html'>Simple: turn the audio file into a video file (FLV). &lt;br /&gt;&lt;br /&gt;There are probably much better ways of adding audio cue points that I haven't discovered yet, but Flash MX 2004 or Flash 8 don't seem to have any classes / components to help you do this quickly. Flash DOES have a selection of Media Components that allow you to add cue points to mpg or flv videos. &lt;br /&gt;&lt;br /&gt;Simply convert the audio to FLV by exporting it with QuickTime Pro or another audio/video tool and the Flash Video Encoder (I use &lt;a href="http://www.sorensonmedia.com/"&gt;Sorenson Squeeze&lt;/a&gt; for this). The Flash 8 video encoder even allows you to add Event or Navigation cue points to the audio. &lt;br /&gt;&lt;br /&gt;Import the FLV into your flash movie using the MediaDisplay component to add cue points as you would with video.&lt;br /&gt;&lt;br /&gt;There's also a tutorial &lt;a href="http://www.devx.com/webdev/Article/27924"&gt;here&lt;/a&gt; that uses FlashAmp, the "Lite" version costs $45. This is probably better than my solution (but not as quick) as it can include the volume and spectral properties of the sound.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-114365187207525718?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/114365187207525718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=114365187207525718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/114365187207525718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/114365187207525718'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2006/03/audio-cue-points-in-flash-mx-2004-pro.html' title='Audio Cue Points in Flash MX 2004 Pro / Flash 8'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-114355254988211236</id><published>2006-03-28T06:11:00.000-07:00</published><updated>2006-03-28T06:49:45.160-07:00</updated><title type='text'>Setting up Apache, PHP, MySql and Eclipse for Mac OS X</title><content type='html'>A mate of mine wanted to get into web development and needed to know the best way to go about getting the right stuff on his Mac. I've chosen PHP as the scripting language because it's one of the easiest to install on the Mac. Follow the links below in order, and you should have it all up and running within an hour.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Apache Server&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.onlamp.com/pub/a/mac/2001/12/07/apache.html"&gt;http://www.onlamp.com/pub/a/mac/2001/12/07/apache.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Apache PHP plugin&lt;/b&gt;&lt;br /&gt;&lt;A href="http://www.entropy.ch/software/macosx/php/"&gt;http://www.entropy.ch/software/macosx/php/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Eclipse (code editor)&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.eclipse.org/downloads/"&gt;http://www.eclipse.org/downloads/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;PHP Plugin for Eclipse&lt;/b&gt;&lt;br /&gt;&lt;a href="http://sourceforge.net/projects/phpeclipse/"&gt;http://sourceforge.net/projects/phpeclipse/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Database&lt;/b&gt;&lt;br /&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html"&gt;http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/internet/opensource/osdb.html"&gt;http://developer.apple.com/internet/opensource/osdb.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;PHP reference &amp; tutorials&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.w3schools.com/php/"&gt;http://www.w3schools.com/php/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-114355254988211236?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/114355254988211236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=114355254988211236' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/114355254988211236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/114355254988211236'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2006/03/setting-up-apache-php-mysql-and.html' title='Setting up Apache, PHP, MySql and Eclipse for Mac OS X'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-114321973230676377</id><published>2006-03-24T09:35:00.001-07:00</published><updated>2006-03-24T10:10:49.973-07:00</updated><title type='text'>Getting responseXML to work in IE</title><content type='html'>Nightmare! This took me ages to solve, but was actually quite easy in the end.&lt;br /&gt;&lt;br /&gt;I thought it'd be a great idea to have "live" validation on a registration page, that'd check the database to see if a username had already been chosen. &lt;br /&gt;&lt;br /&gt;First I created a ColdFusion Component (CFC) as a web service which checks the user input against usernames in the database and returns a boolean true/false. The CFC returns a WDDX formatted XML packet containing the boolean value.  &lt;br /&gt;&lt;br /&gt;Assuming you have a response handler like the AJAX tutorial here: http://developer.mozilla.org/en/docs/AJAX, all you need to do is use http_request.responseXML to receive the XML content and then use the XML DOM properties and methods to extract the data.&lt;br /&gt;&lt;br /&gt;This works fine in Mozilla browsers like FireFox / Safari, but not in IE, which produces an 'Object Expected' error.&lt;br /&gt;&lt;br /&gt;This is because IE expects all XML responses to have: Content-Type: 'text/xml' in the response header. However, ColdFusion broadcasts the WDDX packet as 'text/html', and therefore using responseXML in the javascript handler will not work, as IE doesn't acknowledge this as XML data.&lt;br /&gt;&lt;br /&gt;The simple way to fix this is to create an XML DOM object in the Javascript response handler and use the responseText property, like so:&lt;br /&gt;&lt;br /&gt;if(window.ActiveXObject){ // If IE  Windows&lt;br /&gt;      var XMLdoc = new ActiveXObject("Microsoft.XMLDOM");&lt;br /&gt;      XMLdoc.loadXML(http_request.responseText);&lt;br /&gt;} else {&lt;br /&gt;     var XMLdoc = http_request.responseXML;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-114321973230676377?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/114321973230676377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=114321973230676377' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/114321973230676377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/114321973230676377'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2006/03/getting-responsexml-to-work-in-ie_24.html' title='Getting responseXML to work in IE'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24667812.post-114321723437293640</id><published>2006-03-24T08:23:00.000-07:00</published><updated>2006-03-24T09:34:53.333-07:00</updated><title type='text'>AJAX and other animals</title><content type='html'>I've recently jumped on the AJAX band wagon and had a stab at using the XMLHttpRequest() object in my applications. I followed a number of tutorials including:&lt;br /&gt;&lt;br /&gt;http://developer.mozilla.org/en/docs/AJAX&lt;br /&gt;http://dhtmlnirvana.com/ajax/ajax_tutorial/&lt;br /&gt;&lt;br /&gt;I'm still to be wholly convinced about using AJAX to deliver pages, due to accessibility issues, but I do think that using the XMLHttpRequest() to get live data as a user interacts with the page is well worth getting stuck into. It's the way ahead. &lt;br /&gt;&lt;br /&gt;There are alternatives to AJAX: Flash Remoting, the art of using Flash for the UI and web services (mainly written in ColdFusion) and Macromedia - sorry - Adobe Flex 2 offer a much more dynamic UI, but at a price! Flex 2 will set you back the best part of a grand when it's released sometime this summer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-114321723437293640?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/114321723437293640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=114321723437293640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/114321723437293640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/114321723437293640'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2006/03/ajax-and-other-animals.html' title='AJAX and other animals'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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-24667812.post-114321355634404914</id><published>2006-03-24T08:08:00.000-07:00</published><updated>2006-03-24T09:25:51.236-07:00</updated><title type='text'>Hi there!</title><content type='html'>Hi, &lt;br /&gt;&lt;br /&gt;This is the first entry on this site... not terrible exciting for anyone reading it, but I've been meaning to build a website for 5 years and never got around to it! What the hell was I going to use as a domain name for starters? Anyway... it excites me in ways I'd rather not share on here.&lt;br /&gt;&lt;br /&gt;So, let me explain what this site is about. Lapsus Mentis pretty much translates as "absent minded" and is what an Italian collegue of mine called me as she didn't know how to describe me in English. This blog, indeed this whole site, is my own personal web development reference, so I don't forget the stuff I've done, problems I've solved or all the other websites that have create tutorials and references.&lt;br /&gt;&lt;br /&gt;I mostly develop sites in ColdFusion and use flash / flex fairly frequently, so I'm fairly savvy with Actionscript. I also no a fair bit of ASP, a dash of .NET and have dabbled with Java (mainly J2ME). I'm always learning new stuff -  there's a lot to learn! In the future I'll be posting stuff about my trials with AJAX, Flex 2, and MVC's (Fusebox / model-glue). &lt;br /&gt;&lt;br /&gt;Hopefully, my reference can become your reference. After most of what I've learnt over the past 5 years has been from forums and blogs like this, so it's high time I gave something back.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24667812-114321355634404914?l=lapsusbloggus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lapsusbloggus.blogspot.com/feeds/114321355634404914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24667812&amp;postID=114321355634404914' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/114321355634404914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24667812/posts/default/114321355634404914'/><link rel='alternate' type='text/html' href='http://lapsusbloggus.blogspot.com/2006/03/hi-there.html' title='Hi there!'/><author><name>Dan Lavender</name><uri>http://www.blogger.com/profile/02834480814503736094</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>
