Here’s a tip if you want to use runtime styles in your Flex apps
December 17th, 2007
We recently launched a skinned version of our Flex chat widget for the movie Juno. Since we obviously don’t want to recompile the SWF every time we change the skin, we loaded our styles at runtime using StyleManager.loadStyleDeclarations( "http://path-to-my-styles/styles.swf", true ); However, since the widget depends on runtime styles, I had a problem where the Flex default styles would appear briefly before the runtime styles were loaded. I came up with a solution on my own using a custom preloader but then I received a much better answer from Deepa Subramaniam, an Adobe Engineer.
She suggested that I view the source on the FlexStore sample application. If you do that, you’ll notice the following:
override public function set initialized(value:Boolean):void{ // Hold off until the Runtime CSS SWF is done loading.}This prevents the preloader from disappearing until you manually set super.initialized = true.This is a great way to preload any content you need, not just styles. For example, you could download a big XML document and populate a DataGrid before you dismiss the preloader.
Free custom chat rooms (made with Flex) now available at Chatopica
November 7th, 2007
We’re happy to announce that you can now create your very own chat room at www.chatopica.com. It’s easy and free.Also, we still have shared topics that allow sites that don’t get much traffic to connect with a larger audience. Our Flex topic usually has around 80 people in it these days.Our chat widget is made with Flex and the chat server is an open-source jabber server called openfire.
Flex chat widget update: new features, streamlined UI
October 23rd, 2007
We upgraded the chat yesterday. The major enhancement is a streamlined UI which will be obvious to those who have been using older versions. I added an options menu where I stashed the ability to change your nickname, toggle sounds, copy the embed code, and more. When you roll over the name of a user in the chat pane, you’ll get the option to reply (it just pastes their name in the input field) or change your nickname (if you’re rolling over your own name). Admins will have additional options when they roll over a name. Also, in the next day or two, you’ll be able to roll over a name and see where they are in world and what page they’re chatting from (remember, we have shared chat rooms that can be installed on many sites that all connect to the same place). Be sure to check it out.
Flex.org now has chat
October 22nd, 2007
If you’re not familiar with our Flex-based chat widget, it has a code input feature specifically designed to make it easier for programmers to chat about what they’re working on. Dozens of blogs have installed the Flex programming topic so that we can pool together our traffic and keep the room occupied. We’re proud to announce that Flex.org, the central resource for all-things-Flex, has just installed our widget on the community page. Thanks, Flex.org!
Great review of Chatopica — our Flex-based chat widget
October 22nd, 2007
Jon over at Clockwork Objects wrote a nice review of Chatopica. He even installed two of the chat widgets on the site — one for Flex, one for Ruby on Rails. Thanks, Jon!
The write-up from my EasyMVC eSeminar yesterday is now available
October 17th, 2007
And I didn’t have to do the work! A million thanks to Jon from www.clockobj.co.uk for posting this perfect write-up. I’ll re-record the session soon, probably over the weekend. In the meantime, please let me know if you have questions.
Questions and Answers from my EasyMVC eSeminar yesterday
October 17th, 2007
If you attended my eSeminar yesterday and I didn’t get a chance to answer your question, see below. Click the “read the rest of this entry” link below for more.Q: Why did you make the ChatModel constructor public instead of private?A: ActionScript 3 doesn’t support private constructors, so if you’re trying to create a Singleton, you need to throw an error in your constructor if an instance has already been created.Q: have you looked into using a singleton to dispatch events? I use one I found on the net that allows dispathc at any level to any level…. Similar to CairngormA: Earlier versions of Cairngorm used to bubble events all the way up to the controller. There are a few rare cases where that isn’t ideal. In order to participate in event bubbling, an object must be part of the DisplayObject hierarchy, so if you have some object that isn’t on the displayList, it can’t bubble up an event. However, that’s typically not an issue for most apps. Also, if you have a very deeply nested component that needs to dispatch an event and for performance reasons you need to handle it immediately, a Singleton EventDispatcher may be in order. Again, these two cases are rare in my opinion, so I use bubbling for simplicity’s sake.Also, even if you’re using CairngormEventDispatcher, you will likely want your events to bubble up at least a level or two and then be dispatched using the CairngormEventDispatcher by a more senior view.Q: Where would you handle Remote Services like AMFPHP in this framework? Read the rest of this entry »
My EasyMVC seminar wasn’t recorded :(
October 16th, 2007
Update: I gave another EasyMVC presentation on 3/28/08 and it was recorded.
Apologies to everyone who listened in to my Adobe eSeminar this morning. Because of the audio issues, my voice wasn’t recorded so there’s no way to watch the presentation again. HOWEVER…I’m going to talk to the folks at Adobe about going in and re-recording the session on my own once their audio issues are worked out. If that doesn’t work out, I’ll record my own screencast.In the meantime, here’s the source code for the EasyMVC demo.Check back soon for info about the presentation.
My Adobe eSeminar: Basic Application Architecture for Flex Newcomers
October 11th, 2007
Are you relatively new to Flex? I was a Flex newcomer once and I remember what it was like. I worked through some examples in the Flex documentation, read a few articles, set out to write my own app and quickly found myself with a mess and wondering, “Where should I put all this stuff?”. If you’re at that stage now, you should register for my eSeminar next Tuesday where I’ll show you a simple way to design your Flex apps so that they’re easy to maintain and extend.I’ll introduce my approach, which I call EasyMVC. It doesn’t require any special libraries, it keeps the “nerd-speak” to a minimum, and it’s flexible enough that if you later decide you want to use something more advanced like Cairngorm, it will be easy to switch.
Our Flex chat is like IRC with integrated pastebins
October 4th, 2007
Chatting about code can be a cumbersome process. That’s why our Flex-based chat widget has a code input feature that lets you send lots of code without filling up the chat. Just click the code button, type or paste your code, send it, and it will appear on one line with a button to expand/collapse the code area. We even do syntax highlighting as it passes through the server.
We have a bunch of programming topics available here. The most popular one right now is the “Adobe Flex” topic which usually has between 70 and 120 people in it these days. Robert and I are usually in there during Pacific Standard Time and we’re always happy to answer any questions about Flex, AIR, or LCDS.
If you wish one of the other programming topics, like ColdFusion, had more people chatting, just install that topic on your blog and get your friends to do the same. By installing it on more blogs, we can pool our traffic together and keep the room occupied.
