assertTrue is the professional blog of Luke Bayes and Ali Mills

Twosday, May 9, 2006 :: Keynotes

Posted by: Ali Mills Wed, 10 May 2006 05:00:00 GMT

A fair amount of things have been happening in twos lately that seem interesting enough to share. On this first of several Twosdays (Twosdays happen on Tuesday; isn’t that clever?) posts to come, I’m posting two photos taken from the keynotes of two conferences over the past year – MAX and Flashforward – where Luke and I ended up on the big screen.

Here we are on big screen at the MAX keynote:

This shot of us was taken at Macromedia’s Ultimate Party at the Fillmore in San Francisco. The party was Macromedia’s last official company party.

And, here’s the picture of us that the Yahoo! gang used while demonstrating the fickr web service during the Flashforward keynote:

With Yahoo!’s recent investments in their developer network, Flash (check their maps), and all things Web 2.0 it’ll be exciting to see how they grow. Justin’s blog is a good one to watch if you’re interested in keeping tabs.

It seems that we’re not the only ones hip to the days of the week. So are the Pragmatic Programmers, but they seem to prefer Fridays. Check out their Pragmatic Fridays. The PDF idea is interesting, and Rapid GUI Development with QtRuby could be a good title.

Tags ,  | no comments

Library Type Assets in ActionScript 3.0 :: using the [Embed] metatdata tag

Posted by: Ali Mills Wed, 19 Apr 2006 05:49:00 GMT

In a comment to the previous post ActionScript Projects in Flex Builder 2.0, Ben asked how to get library type assets into Flex Builder 2.0 projects. There are two ways. The first is by using the [Embed] (not the Embed from Object/Embed) metadata tag to include assets at compile time. The second is using the Loader class to load them at run time. What’s interesting is that assets loaded at run time can be created in current releases of Flash Authoring and contain legacy ActionScript. What’s challenging is that loaded SWFs containing legacy ActionScript are extremely limited in how they can communicate with their loading AS3 container. They can only communicate with one another over LocalConnection. LocalConnection is neccessary for communication because AS3 runs in a new and different ActionScript Virtual Machine (AVM) than the legacy AS. The ActionScript 3.0 Overview a talks a little more about how the 8.5 player runs legacy ActionScript with the AVM1 and ActionScript 3.0 with the AVM2.

In this post, I’m only going to discuss the first of these two ways: compile time inclusion with the [Embed] meta tag.

The [Embed] meta tag provides a way to include external resources like images, sounds, and fonts into a finished project by compiling them into the SWF. It can be used to import JPEG, GIF, PNG, SVG, SWF, TTF, and MP3 files. It can also be used to add fonts. The Developing Flex Applications chapter Embedding Resources does a good job of explaining the details of [Embed]. If you’re interested in this topic, you should read it. To demonstrate how [Embed] works, we’ll add a “Remember” button to the AutoComplete project we created in the ActionScript Projects in Flex Builder 2.0 post.

The first step to adding a “Remember” button is to create three PNGs for the button states up, over, and down with the graphics program of your choice. Create them (or download them from here) and place them in a folder called “img” inside you AutoComplete project folder at the same level as AutoComplete.as. Name the PNGs “Remember_up.png”, “Remember_over.png”, and “Remember_down.png”.

The second step is to write the code to embed and use the button art. This code will be added to AutoCompleteRunner.as. At the end of ActionScript Projects in Flex Builder 2.0 AutoCompleteRunner.as looked like:

Read more...

Tags  | 2 comments

ActionScript Projects in Flex Builder 2.0

Posted by: Ali Mills Mon, 10 Apr 2006 05:25:00 GMT

I learned a lot about writing ActionScript 3.0 and using Flex Builder 2.0 while working on code examples for the ActionScript 3.0 Language Reference. Finally, I feel like we’re at a place where I can talk openly about most of what I learned. I mean, search the web, Mike, Sho, Darron, and Jesse are all actively blogging about things AS3/Flex related. I like AS3. I’m excited to see the language succeed. Hopefully, sharing what I know will help. This first AS3 post is about creating and working with ActionScript projects in Flex Builder 2.0.

A few days ago Sho posted source for the Flex auto complete text input control v0.6 on his blog. Today, in a comment on that blog, bokonn asked if the component could be reused in ActionScript, and Sho replied that it wouldn’t work in an ActionScript only project.

Well, since we’re going to need a context to create and work with our Flex Builder 2.0 ActionScript project, I’ve written an AS3 AutoComplete class that works in ActionScript only projects. We’ll use this class as our context. Before proceeding, I feel the need to point out that Sho’s component and my class are two very different creations with one of the main differences being that his is very feature rich and mine is not.

OK, here we go. Say you’re one of those developers who’s not interested in using either the Flex Framework or MXML, is Flex Builder 2.0 still for you? It sure is. For you, dear developer, Flex Builder 2.0 offers the ActionScript project. To create one, follow these steps:

Read more...

Tags  | 5 comments

Getting Started With The AsUnit 2.5 Framework

Posted by: Luke Bayes Fri, 10 Mar 2006 08:04:00 GMT

It’s 1:48am.

I suppose it’s as good a time as any to break in the new blog…

Ali and I have been working furiously over the past few weeks cleaning up AsUnit for our Flashforward presentation. While doing all this work, we have been spending quite a bit of time thinking about all the things that bother us about AsUnit, and trying to fix them one at a time. One of the biggest things is (and has always been) the separate results panel (or AsUnitUi.swf). We recently resolved this particular issue for ActionScript 3.0, but I have been concerned about leaving the ActionScript 2.0 build as a poor, neglected child. Some recent decisions that we made about our own product releases have revived our interest in ongoing support for ActionScript 2.0 projects.

Basically, the separate results panel is the result of some pretty big architectural tradeoffs that we made back in 2004 with our first release. We originally wanted a test framework that would support applications that run in the browser, on the desktop and on mobile devices.

At the time, the newest player that ran on devices was Flash Player 6. So we got stuck in supporting the least common denominator. This meant no Try..Catch statements. We were also concerned about placing the result UI directly onto the stage because the results panel could be inadvertently clobbered by some random attachMovie call when trying to test visual entities. We had another problem in that we were using V2 Components in the results panel, and they do some pretty gross mixins to the core prototype chain. Injecting V2 Component code into the test environment for an application that doesn’t ship with the same code meant that we would be testing in an environment that was significantly different from what we were planning on shipping. The best (simplest?) thing we could come up with was a completely separate SWF file for presenting test results, and sending those results over LocalConnection.

These decisions led us down a long and slippery slope that ultimately meant we couldn’t directly port the JUnit implementation to ActionScript, and basically AsUnit has been running with some pretty big development, performance and reliability issues that have remained unresolved – until now…

Read more...

Tags  | 6 comments

Test-Driven Development with ActionScript 3.0

Posted by: Ali Mills Thu, 09 Mar 2006 15:50:00 GMT

On March 2nd, Luke and I presented at Flashfoward on the topic “Test-Driven Development with ActionScript 3.0”. The talk covered ActionScript 3.0, Flex Builder 2.0, and AsUnit. We had a blast giving it and were stunned at the level of attendence. For all who attended, we thank you for being there! For those who couldn’t make it, we’ve posted our presentation notes. They follow:

Read more...

Tags  | no comments

Older Posts

Older posts: 1 ... 7 8 9