assertTrue is the professional blog of Luke Bayes and Ali Mills
Posted by: Luke Bayes
Thu, 20 Dec 2007 18:59:00 GMT
In the spirit of always running late to the party, I just discovered a blog today that other folks have probably been following since ‘06.
This guy articulates many of my gripes, moans and complaints in a way that is definitely helpful. If you’re building large applications with ActionScript 3 (or Flex for that matter), he can provide some insight into why things just aren’t working the way you may have expected them to.
http://blog.iconara.net
Tags actionscript | no comments | no trackbacks
Posted by: Ali Mills
Thu, 23 Aug 2007 04:59:00 GMT
Uncontrolled browser pop ups suck, and I’m very thankful for pop up blockers. There are times, however, when you want controlled pop ups. It’s these times – the times when a user initiates the call to action – when the browser’s pop up blocker should let them through. Browsers are pretty good at managing this when the user initiated action starts in HTML, and most also do a good job when the action starts in a SWF. There’s at least one big exception – Safari.
The standard path in Flash to open a browser pop up is to use ExternalInterface to call a JavaScript function in the wrapping HTML page that contains a window.open call. This path works in all the browsers I tested in except for Safari, which leads me to believe this a Safari bug.
Luckily, if you want to open browser windows from a SWF in Safari there’s a workaround other than disabling the “Block Pop-Up Windows”! Check it out:
The workaround works by:
Read more...
Tags actionscript, bugs | no comments | no trackbacks
Posted by: Luke Bayes
Sun, 15 Jul 2007 02:04:00 GMT
Over the years, Ali and I have spent quite a lot of time trying to sort out when to use static classes, when to use the Singleton pattern and when to do the work required to avoid them.
There has been a long and ongoing discussion in the OOP and patterns community on this subject by people far more intelligent and experienced than I am. It is really their knowledge and experience that will be essentially repackaged for ActionScript development here.
Following are the primary arguments that compel me to look for a better way.
Read more...
Tags actionscript, asunit, lukebayes, patterns | 3 comments | no trackbacks
Posted by: Luke Bayes
Wed, 13 Jun 2007 17:17:00 GMT
I just wanted to get out a quick announcement before too much more time went by….
I introduced AsProject in April and have since been redesigning it under a new, much more manageable project called Sprouts. Just yesterday it reached a point where it’s at least testable on both OS X and Windows (with Cygwin).
I’m looking for some help getting it production ready (check out the issues list) and feature feedback from the community before I go much further.
Please check it out and let me know what you think, what it needs, and what doesn’t work the way you expect.
Read more...
Tags actionscript, asproject, flex, ruby, sprouts | no comments | no trackbacks
Posted by: Ali Mills
Fri, 08 Jun 2007 18:18:00 GMT
We’re working on a modular application in Flex and until recently were having issues with embedded fonts in modules. The main issue was that we wanted fonts embedded in the main CSS to be available in the loaded modules, and we were having a heck of a time getting this to work.
Some research led me to Alex Harui’s post about how to use embedded fonts in modules and late-load the embedded font. Alex’s example demonstrates Flex 2.0.1’s new runtime CSS approach and uses the StyleManager class.
We’re not, however, interested in loading the CSS at runtime (although we reserve the right to change our mind, because it’s a really handy thing to be able to do), so I modified Alex’s example to more closely represent our application structure with hopes of finding my mistake. After the modification, it became clear that I wasn’t making a mistake, but that I had run into a bug. Can you spot it? Here’s the code…
Read more...
Tags actionscript, bugs, flex, flexbuilder | no comments | no trackbacks
Posted by: Luke Bayes
Wed, 04 Apr 2007 19:15:00 GMT
UPDATE: The new versions of Sprouts actually pull down and install the Flex SDK automatically!
UPDATE: AsProject has been refactored, renamed and moved, development is ongoing at the new location for “Sprouts”.
I’m elated to finally announce AsProject!
This is a cross platform, open source ActionScript development tool set that I’ve been working on for the past couple of months.
AsProject automates a variety of tasks including the creation of projects, classes, test cases, test suites, and swfmill libraries. It automates the download, installation and configuration of the debug flash player and many open source tools. AsProject also includes sophisticated build tools written in rake to automate build processes.
If this sounds interesting to you check out the video demo!
Read more...
Tags actionscript, asproject, asunit, sprouts | 37 comments | 3 trackbacks
Posted by: Luke Bayes
Tue, 13 Mar 2007 21:22:00 GMT
I’ve been working on a new open source project in my spare time that involves using Rake to compile and display ActionScript SWFs, (more on that project coming soon), and one of the surprisingly difficult parts had to do with trying to get Rake tasks running from Eclipse.
Since I finally figured it out, and couldn’t seem to find any decent resources out there, I figured other folks might find this info useful.
Read more...
Tags actionscript, rake | 1 comment
Posted by: Luke Bayes
Sat, 13 Jan 2007 01:11:00 GMT
Ali and I were just working on our super-secret project that’s written using Flex 2 and we came across a pretty surprising problem.
We have a DataGrid that slides out of the way and back again. If the application is compiled on his machine, the DataGrid header disappears after being collapsed to less than 2 pixels of width, while it works fine when compiled on my machine.
We finally figured out that he has installed Flex Builder 2.0.1 while I’m still on the good old Flex Builder 2.0… Looks like some kind of fun injection!
Essentially the rule is that if you’re using the latest Flex Builder build (2.0.1), don’t ever let your DataGrids get smaller than 2 pixels wide.
Read more...
Tags actionscript, bugs, flexbuilder, mxml | 7 comments
Posted by: Ali Mills
Wed, 22 Nov 2006 06:53:00 GMT
Sho Kuwamoto wrote two great posts on his bog earlier this year. One is about simulating enums in AS3, and the other is about using closures to deal with asynchronous events. I revisited these posts lately because I’m considering implementing HTTP and HTTPS in AS3. I’m considering it because not being able to set HTTP headers for GET requests, not having any access to HTTP response headers, and not being able to add custom HTTP methods with either the HTTPService class or the URLLoader / URLRequest combination is driving me bonkers.
To experiment with Sho’s ideas, I modified the ActionScript Language Reference’s Socket example to use simulated AS3 enums and closures in the form of call objects. The rewritten example follows:
Read more...
Tags actionscript | no comments
Posted by: Luke Bayes
Sat, 18 Nov 2006 01:02:00 GMT
Ali and I have been providing support for the past couple of months on a large application that we built and deployed earlier this year. We had an interesting bug filed today and I set about trying to address it.
The bug is this:
If I click around in the SWF application, and especially if I select a text input field at some point, I can no longer edit the Firefox Location bar (Address bar).
In addressing this issue, I immediately suspected our focus/selection management layer, then moved on to our TextInput controls, and eventually wound up scouring the web to see if anyone else reported the same problem. As it turned out, I still haven't found anyone else reporting this issue, but in my searching - I did discover the root cause.
It's the "wmode" parameter of the embed tag. As far as I can tell, this attribute can be set to "opaque", "transparent" or not set at all. Setting it with an empty value, or an unexpected one appears to default to the opaque behavior. NOT declaring it at all behaves very differently as I soon discovered...
I was surprised to find an issue with this setting because we're using the swfObject deployment package and it came highly recommended. As it turned out, there doesn't seem to be much the swfObject folks could have done, and by not declaring this property at all, they in fact chose the least of 3 evils...
After finding out about this attribute, I immediately set it to "opaque" in my embed tag and found that my bug disappeared. I was so excited I started integrating and was just about to check in to version control, when it occurred to me that this setting might actually have side-effects beyond the background opacity... As a last minute double-check, I began searching google for the meaning of this parameter and quickly learned that this seemingly innocuous little attribute was sitting on top of a giant mountain of subtle bugs...
Following are the side-effects that I discovered:
Read more...
Tags actionscript, swf | 6 comments
Older Posts