Monthly Archives: June 2006

Can Flash 9 preview compile the Flex Framework?

Update: I’ve learned that there’s no easy way to use the Flex Framework without MXML. It may be possible, but probably very difficult. See the comments below for more information.

Maybe I’m just doing this all wrong, but I had the urge to see if I could use the Flex Framework within the new Flash Professional 9 Actionscript 3 Preview, and I ran into some troubles. First of all, it looks like SWC components are completely disabled for Actionscript 3 projects. Luckily, the free Flex 2 SDK comes with it’s source code. I added the path to these files to my class path, and I set the new Document Class parameter to mx.core.Application. I’ve added no additional code to the timeline. When I try to compile, I get a weird error:

**Error** C:\Program Files\Adobe\Flex Framework\frameworks\source\mx\core\Container.as : Line 15, Column 1 : [Compiler] Error #1004: Namespace was not found or is not a compile-time constant.
import flash.display.InteractiveObject;

This same error at the same line in the same file is repeated several times. I find it especially odd that the compiler can’t seem to recognize flash.display.InteractiveObject since that’s one of Flash’s built-in classes. The error list ends with one last error:

ReferenceError: Error #1065: Variable Application is not defined.

No line numbers, just the single line. I assume that one appeared because Container is a dependency to Application.

Can anyone tell me if Flash should even be able to compile the framework? I know that there’s a lot of meta information in those classes. Maybe Flash doesn’t understand some of it. Now, I don’t actually need to compile it within Flash, it was just an interesting little experiment. I’m such a geek.

FlashTextFormatter with SWFObject (Release 2)

Last month, I released a patch for the FlashTextFormatter WordPress plugin to use Geoff Stern’s SWFObject script. If you’re unaware, the plugin is designed to color code with a Flash component. It’s pretty cool.

[ftf w=480 h=60]var greeting:String = “Hello, Galaxy!”;[/ftf]

Today, I enhanced it to display the code in plain-text if JavaScript is disabled. I should have done this in the first place, but I wasn’t very familar with WordPress PHP code. After some tinkering around, I got things all fixed up. Grab the plugin and try it out! You can view the source of this page to see the output. It’s pretty standard SWFObject-based code though.

getQualifiedSuperclassName is actually getBaseClassName

Note: This applies only to Flex Builder 2 Beta 3. It has been fixed for the final release of Flex Builder. The documentation included the correct final version, but the actual implementation still used the old function name.

While trying out some of the functions in the flash.utils.* package, FlexBuilder told me that getQualifiedSuperclassName doesn’t exist. Turns out that it’s actually called getBaseClassName. I’m sure the documentation will be fixed in the final release.

You might find these related functions interesting as well:

  • getQualifiedClassName
    Returns the full class and package structure of an object as a string (ie. “flash.text.TextFormat”)
  • getDefinitionByName
    You send it the class you want as a string, and you’ll get a reference to the actual Class object.

Could be useful for configuration files. I imagine that they could be combined with that asterix untyped type that Darron mentioned a while back.

Thoughts on "CSS is Worthless"

There’s a pretty heated discussion about webdesign, css, and markup at Content With Style. Obviously, by naming his article “CSS is Worthless”, the author Mike Stenhouse got the level of response he wanted. The point of the article is that semantic markup is the key to great webdesign. CSS isn’t really worthless, it’s just the icing to make your markup pretty. Unfortunately, the title resulted in two major misunderstandings:

  1. Standards folks can’t get over the title. Like I said, he doesn’t actually mean it the way these people think. He’s only trying to push semantic markup. Just by looking at his stylish site, you should instantly see that he uses CSS.
  2. Table-based designers think he’s rooting for them. Unfortunately, this is the exact opposite of Mike’s intent. A couple of these people even got mad because they use CSS as part of their table designs too.

Most interestingly, between the article and the comments, I’ve learned that businesses and many developers think that CSS alone has any effect on search engine ranking. Several folks even argued with Mike and others on this point. This belief is very, very wrong. Your pagerank will rise with semantic markup, such as header tags, lists, and other tags. You need clean, non-presentational HTML so that the search engines will better understand the content of your page. Even pages without layout tables can be bad. As someone mentioned, some designers will create something like this:

[html]

My Article Title

[/html]

Snippets like that one are one of the main reasons for Mike’s article. Your HTML needs to have meaning to be properly ranked by a search engine! You can style it with CSS to look the same whether there’s an h2 tag or that ugly div, but the h2 tag will be help you rank better with Google.

It’s a good read, especially the comments. Even if you have a good handle on standards-based design, I recommend taking a look just to get an idea about what other people know (or don’t know).

Hello, Fullasagoog!

Fullasagoog is a daily part of my blog reading. It’s a good aggregator that’s a little more focused and exclusive than Adobe’s MXNA. While looking through my logs today, I was suprised to see Fullasagoog as a referrer. Thanks for finding Zeus Labs worthy!

I’ve been working on some web design projects lately, so there isn’t anything too exciting on the Flash front right now. The release of Flex 2.0 is coming up, so I’m getting ready to update all my Flash 9 projects. I’ll be getting a couple new Flash books soon, so expect some reviews once I digest those.