Douglas McCarroll releases AS3 visual-comparison testing library

December 28, 2007 on 12:23 pm | In Flex, Programming | 1 Comment

Douglas McCarroll has just released the first public incarnation of Visual FlexUnit as a Google Code project. I’m very excited about this project, partly because I think it’s going to be super useful to some people (myself included!) and partly because Douglas did a ton of great work on it during his internship this year at Allurent and it really is his baby.

I don’t want to recapitulate the whole project description, which you can read for yourself, but… what the heck is Visual FlexUnit? [Continued...]

1 Comment

UrlKit 0.92 now available with IE7, Safari support

December 20, 2007 on 4:34 am | In Flex, Programming | 10 Comments

I’ve posted a new download of UrlKit version 0.92 to the UrlKit project on Google Code. (Note that 0.91 was formerly mentioned here, but a distribution script error was discovered to have omitted a few files.) It has some nice new features, some based on user feedback:

  • Uses deep linking approach from Flex 3 to support all major browsers including IE7 and Safari
  • Code for UrlKit apps in Flex 2 and Flex 3 is now identical
  • New navigate() method allows apps to internally change state by directly specifying a new URL fragment
  • New enabled property of FlexBrowserManagerAdapter optionally delays UrlKit startup until application is fully initialized

Happy Holidays!

10 Comments

Using Flex 3’s Deep Linking Features in Flex 2

December 12, 2007 on 5:26 am | In Flex, Programming | 3 Comments

If you don’t already know, Flex 3’s deep linking support is a tremendous boon to the RIA developer, insulating our lot from having to worry about the whole sorry, shoddy business of communicating little strings between our application and the fragment chunk of the browser’s location URL. Applications that have some notion of navigational state benefit greatly from using this feature: their state (as embodied in such a URL) becomes automatically hooked up to the Back/Forward buttons, becomes bookmarkable, and of course becomes exchangeable via the usual Web means with any other user of the same application.

For those of us who have real products that need to be released on a schedule independent of Adobe’s corporate whims, however, Flex 3 isn’t necessarily a good option. Where does that leave the would-be deep linker? One of the few options for Flex 2 users has been the UrlKit library written by Todd Rein and yours truly, which provides deep-linking support in Flex 2. (In Flex 3, UrlKit uses the built-in deep linking mechanism.) Unfortunately, in Flex 2 the deep linking support in UrlKit is not equally good for all browsers. UrlKit supports FireFox, IE6 and Safari pretty well, but I’ve never had the time to catch up with IE7, and the prospects of my keeping up with the dirty little world of browser compatibility have been — and remain — dim. In contrast, Adobe is a big company with lots of smart QA people and a business motive to toil in the compatibility trenches.

Now, something not generally known is that the Flex 3 deep linking support is derived directly from the UrlKit code (and, yes, they had the authors’ permission!). As such, it has virtually no dependencies on the rest of Flex 3 — not surprising, since Todd and I built it for Flex 2. So it occurred to me recently that it should be possible to port the Flex 3 BrowserManager class and accompanying Javascript back into Flex 2, where it would probably simply compile and work out of the box. And the good news is: it does! (Actually that is a slight lie: I did have to comment out a single line of code, and add a one-line magic incantation to my application startup. But that’s not too bad.)

This means that Flex 2 developers (and UrlKit itself) can now take advantage of the Flex 3 BrowserManager subsystem in its entirety. Furthermore, I am aiming to provide a new revision of UrlKit shortly that incorporates this approach for its Flex 2 deep-linking support.

I cannot legally redistribute the slightly modified Flex 3 source that works in Flex 2, but here’s how to do it yourself:

  • create a new Flex Library project based on the Flex 2.0.1 SDK
  • copy the following files into it from the Flex 3 SDK source:
      mx/core/Version.as (note: this is included by the other files, but not compiled itself)
      mx/events/BrowserChangeEvent.as
      mx/managers/IBrowserManager.as
      mx/managers/BrowserManager.as
      mx/managers/BrowserManagerImpl.as
  • comment out the line in BrowserManagerImpl.init() which sets the historyManagementEnabled flag — this does not exist in Flex 2.
  • compile the above files (excluding Version.as) into a SWC
  • in your Flex 2 application, drop in an HTML template generated by Flex Builder 3 for a Flex 3 deep-linking app. This template will include a history/ subdirectory with JavaScript and CSS files in it, and the HTML page loading the app will refer to those files.
  • Add the following line to your application startup, prior to calling BrowserManager.getInstance()
    Singleton.registerClass("mx.managers::IBrowserManager",
        Class(getDefinitionByName("mx.managers::BrowserManagerImpl")));
    

I have some more testing to do, but a development version of UrlKit that I just compiled with this approach seems to work well at first blush.

Happy linking!

3 Comments

Flex Camp Boston Slides

December 7, 2007 on 12:30 pm | In Flex | 3 Comments

Tim Walling and I just finished our presentation at Flex Camp Boston, which has turned out to be a sellout event with some pretty great talks! I’ve definitely learned some cool stuff today.

I’ve put our presentation on the Allurent Desktop Connection AIR prototype online at http://joeberkovitz.com/presentations/ADCFlexCampBoston.ppt in case anyone wants to grab it.

3 Comments

StandingWave: Live Musical Audio Synthesis in AS3

December 4, 2007 on 7:16 pm | In Flex, Music, Programming | 10 Comments

I’ve been working on a funky new homebrew software project called StandingWave: a musical audio processing engine built entirely in Flash. My goal in doing this is to explore a world of online interactive music applications in which audio is not merely played back, but generated on the fly — performed, in fact — from an underlying representation of musical events. Such applications might range from a traditional music notation editor to game-like music composition environments to… knows?

Computer music performance is hardly something new, of course. But embedding the capability in Flash, at this point in the world, can make musical applications accessible on the web and amenable to community use in a way that’s never been possible before. Think about what applications like Buzzword and Google Spreadsheets are doing for traditional “productivity apps”.

I’ve started with the audio engine because it’s an interesting technical challenge, although I’m working on some of the other pieces concurrently. I’ve put up an initial crude example that demonstrates sample-based waveform synthesis. This toy application can play back single notes, a chromatic scale and a sample MIDI file at various transpositions, tempos and volumes, and all of this is accomplished by actually synthesizing digital audio signals on the fly, starting from a set of recorded guitar samples and applying gain envelopes, frequency shifting and mixing. Musically, it’s hardly exciting, but it’s a start on the capabilities needed to concretely deliver music in the Flash Player with no external add-ons, and without leaning on the crappy, highly variable MIDI playback delivered by the browser’s native OS.

There’s no waveform audio output API in Flash, so how is this done? Read on…

[Continued...]

10 Comments

Entries and comments feeds. Valid XHTML and CSS.
All content copyright (c) 2006-2007 Joseph Berkovitz. All Rights Reserved.