Joeflash’s Enigmacopaedia


Moving a Flex Builder/Eclipse Workspace Without Importing Anything (Update)

Posted in Flex, Workflow, Flex 3, Flex Builder 3, Eclipse by Joeflash on the November 27th, 2008

In the last post, I examined how to move a Flex Builder/Eclipse workspace to a different directory location without re-importing all your projects. Only it didn’t work as well as expected. I finally figured it out, but use at your own risk, since this involves editing Eclipse binary metadata files.

Currently there is no user-friendly technique for moving an entire Eclipse workspace folder to a different directory. This I most wanted to do because the current technique involves the painstaking task of creating a new workspace, then reimporting all projects, reconfiguring all compiler settings, and then re-imputing all the SVN location data for Subclipse. Blech!!

I wanted to move all my workspaces from my C:\ drive to a C:\_fx3\ directory to get them off the root drive. But I don’t have whole days to mess around with importing projects and making sure all the settings have been imported faithfully. I just wanted to move entire workspace folders to the new directory, make a few metadata file hacks, and be done with it.

Well, as it turns out, it’s not that easy. What makes all the difference for most workspaces are not the XML metadata, which seems to be mostly for caching, but the .location files in the metadata project directories, which is where the absolute directory location for each project folder is referenced. Problem is they’re not meant to be user-edited. So use this technique at your own risk, as other absolute directory dependencies may exist that I’m not aware of. For now consider this an experiment in progress.

1. Copy your workspace to the new directory location.

2. Edit the XML metadata files in the workspace folder as detailed in this last post.

Now here’s where it gets interesting.

3. Find the .location files in the workspace metadata. They are located in the

\{workspace dir}\.metadata\.plugins\org.eclipse.core.resources\.projects\{project folder}

directories

3. Open up each .location file in a Hex Editor application. I’m using the free Hex Workshop utility from pbsoft.

Now let’s take a look at the process for editing one of those files.

4. Edit the URI in the binary data. In the Hex for each file you will see the characters “URI” followed by the absolute directory path for the project folder in question. Edit the path, making sure to add or delete bytes as required.

In my .location file, the old path is:

URI//file:/C:/profx3book/Chapter_01_Why_Flex

editing the .location file - start

I edit the new path to be

URI//file:/C:/_fx3/profx3book/Chapter_01_Why_Flex

5. Edit the byte before the “URI” to be the new character length of the path.

If your code editor has hex-to-dec conversion, as mine does, you can see that the character length of my old path, which includes “URI”, is hex 2C or 44 characters (see image above).

Select that byte value, and replace it with the character length of the new path. I got the character length by using word count in MS Word (Tools > Word Count…).

URI word count

The length is 49 characters, which is hex 31.

editing the .location file

5. Save the file.

6. Repeat for each .location file.

Now when load up Flex Builder and point to the new workspace location, I verify that the project does indeed point to where I told it to in the .location file. And my SVN locations are conserved, as are all my preferences. YAY!! :)

verifying the successful workspace move

Unfortunately, although this hack works, it’s a lot more trouble (or at the very least the same) as making a whole new workspace and importing each project one by one. I had to Hex edit over 20 files to move the entire workspace — which could hardly be considered a time-effective solution. I can make things easier on myself my copying the entire workspace to my new directory, but I still have to delete and recreate the workspace metadata by pointing to that new workspace folder, and then re-import every project in that workspace. Still, I learned quite a few things about Eclipse in the process, which was partly the goal of the exercise for me anyways.

Although I’ve used it for a few days now and I have not seen any compile or file referencing problems, and it seems like a sound solution, this technique has not been battle-tested, and I’m not an Eclipse developer by any stretch, so I’ll say it again:
use this technique at your own risk. Don’t come crying to me if this hack corrupts or messes up your Flex Builder or Eclipse workspace in any way.

If indeed this hack proves to be stable, as it seems to be, the next step would be to create a batch file or something that could at once copy the complete workspace directory to a new location, seek out and edit all the required XML metadata files with the correct path references, and hex edit all the .location files with the changed URI and adjust the length byte accordingly. Maybe even a custom eclipse plugin written in Java? Hmmm… But that task lies beyond my time and current programming abilities at present, so I will leave you with that final tantalizing thought.

(maybe some enterprising Eclipse developer will read this and decide to surprise us with a plugin, hint hint ;) )

Flex Builder Tip: Moving an Entire Workspace in One Step Without Importing Anything

Posted in Flex, Workflow, Flex 3, Flex Builder 3 by Joeflash on the November 24th, 2008

I had a situation recently where I had way too many workspaces sitting in my root C: drive folder, so I decided I wanted to move them to a subfolder with a very short name like “_fx” just so all my Flex workspaces are all in the same place, and to make backup archiving easier.

If you’re wondering, I have dozens of workspaces, one for each client and/or writing project, each of which has an average of 20+ projects.

Problem is, the conventional way is slow. Really slow. I’d have to create a new workspaces directory location (C:\_fx in my case), and import every single project into every new workspace. And even with saving preferences, I’d lose things like Subversion site locations in the Subclipse perspective. And with over 20 workspaces,. each with an average of 20 projects… I’d be at it for weeks. So I needed a shortcut.

So I dug around in the workspace metadata files, and eventually found where the directory locations reside for each project in that workspace. Luckily, it’s all in one file, so the hack is relatively simple.

Correction: unfortunately it’s not one file you have to edit, it could be a few XML files. And unfortunately this hack doesn’t work with all workspaces unfortunately. See below.

1. Make a copy of your workspace folder to the new location. Don’t move it, in case anything goes wrong. I found this out the hard way by wiping out the metadata for a workspace with over 30 projects — ouch!

2. Find the .metadata folder for the workspace.

3. Find the following files and open them in a text editor:

{workspace}\.metadata\.plugins\org.eclipse.ui.workbench\workbench.xml

{workspace}\.metadata\.plugins\org.eclipse.ui.workbench\dialog_settings.xml

{workspace}\.metadata\.plugins\org.eclipse.ui.workbench\workingsets.xml

{workspace}\.metadata\.plugins\com.adobe.flexbuilder.editors.common\dialog_settings.xml

4. Find & Replace all instances of the old directory location with the new one.

For example, for my \profx3book workspace, I replaced all instances of “C:\profx3book\” with “C:\_fx\profx3book\“.

5. Save the file, and point Flex Builder to the new workspace. Once you’re sure everything is where it should be, delete the files in the old location.

Et voila!

PS: Yes, I know, the above lists five steps, not one — but really it’s only one step: replacing the location string in the workbench.xml file.

PPS: Important Caveat: Search for all .location files in the workspace .metadata folder. If there any files found, this technique might not work, since the directory location for that project is stored in .location files as binary data, and cannot simply be edited with a text editor. So use this technique at your own risk.

My First MAX Experience is 8.5 out of 10

Posted in Adobe, Conferences by Joeflash on the November 23rd, 2008

Here’s a review of my whole MAX SF 2008 experience, first posted at groups.adobe.com. My experience was reviewed based on Labs, Sessions, General Sessions, Sneaks, Food, Exhibitors, Location, Unconferences, Parties/Events and the Conference Website. On the whole I gave the experience a 8.5 out of 10.

Labs:
I was very impressed by how the labs were conducted. “Using Data Services to Power Flex Applications” by Christophe Coenraets was very smooth and by the numbers, all the examples worked, and the TAs made solving learning issues and keeping up with the session easy. Even though the topic was a review for me, I got a lot out of it, as Christophe was able to answer some tough questions after the session that had been bugging me. It was very rewarding learning from such a master.

I have to hand it to Duane Nickull and James Ward in “Building Service Clients with Flash and AIR”, they had their game down cold. They checked in with everyone frequently to judge the speed at which the tutorials were going, and we completed all the exercises, including a few that James had come up with the night before, which all worked without a hitch, which was great to see (although this was as a result of giving the lab w few times already, so I guess they had a few practise runs ;) I would have liked to have seen a bit more advanced examples, but it was a great overall introduction to connecting Flex and AIR apps to many different data formats: WSDL, SOAP, RSS, AMF, SQL, etc. To take a lab like that with two supreme flex-fu masters made it feel like I was taking martial arts lessons from Bruce Lee and Jet Li. :) Haiya!!!

Although it made certain examples difficult (such as the Yahoo Maps mashup), I actually think it was a good thing not having internet connectivity in the labs. I’ve given Adobe training sessions before, and the most difficult thing is keeping the attention of the attendees when they are busy checking their email. And it’s easier doing a lab with localhost anyways, rather than worrying about connectivity bandwidth.

The only thing I was not too thrilled about with the labs was the lack of final files to look at while the lab was going on. Usually if the lab gets too advanced I just follow along with the final files, which means I can still absorb the concepts. But fortunately these trainers in the two Data Services labs I attended had it down so well that I didn’t need the final files to keep up, but it would have been nice anyways.

The Thermo/Catalyst lab was a bit of a disappointment to me, but maybe that was just because as a developer I wanted more than just an intimate walk through the interface. I wanted to what is under the hood, how is it built, what code does it output, how do you use the tool in a production workflow from Illustrator-to-Catalyst-to-Flex. For a tool that’s designed to take a load off the developer’s workload, it was little basic, though I think a lot of people got  lot out of it. I eventually got these questions answered at the BOF session, so it’s not all that bad.

Recommendation: if a tool is being released that is both for designers and developers, split the lab into two tracks — one for designers, like the Thermo/Catalyst lab, and one for developers, so each party can find out what the tool will do for THEM.

The only thing I would change with the labs is make them correspond more closely with the sessions, so that people don’t have to miss two session time slots just to attend one 1.5 hour lab.

Sessions:
Luckily all the sessions I attended were great, did not attend any duds, though I heard second hand how some of them were. As a rule, if you’re going to have a good conference session,

a) Have it be by a known expert in the community with experience presenting, otherwise you run the risk of having inexperienced communicators with nothing ground-breaking to say. I spend a lot of money to attend MAX, and I expect be listening to experienced people. Although I have a great respect for community initiatives, MAX is not the forum for amateurs.

b) Make sure the demos work: don’t waste our time by having the audience beta test the speaker’s app.

c) To the speakers: post your slides and your code up on the MAX website or your own blog, before the session or within hours of the session. A few months from now I’m not going to remember which sessions I went to, and any chance to absorb and really learn from your session will have all but dissipated.

Evey conference I go to seems to incur the same routine of spending an entire day a few weeks after the conference hunting down blog posts for code samples so that my conference experience wasn’t totally wasted. It would be nice for a change if MAX could be the exception to that norm.

d) Provide working wifi. I can count on one hand the number of conferences I’ve been to in the last ten years where internet connectivity actually worked consistently, for both speakers and attendees. Adobe, you’re all about connected experiences. Put your money where your mouth is by providing a stable internet connection for all 5K attendees and the speakers. I know that’s a big job, but as from an industry leader I would expect nothing less. You’re playing in the big leagues now Adobe, and so should your conference experience.

e) Don’t insult us by providing “recharging stations.” In the time it takes me to recharge my laptop I’ll have missed three sessions. You had the right idea at the ON AIR Tour, do that: provide power strips along each isle so that people can connect their laptops while the session is going on. Combine that with working wifi, and you’ve got a potential for audience participation that is off the charts. I can understand and in fact condone no internet for labs, but for a session it is different. I would have liked to use an app like Mind Manager to take notes, which would have vastly increased what I got out of it, and if the speakers had distributed code ready, I could have followed along with the code they were presenting, while it was all happing.

You’ve got to get more interactive in the sessions. Stable wifi and access to power, along with available code and slides while the presenter is doing their thing is one way toward that goal.

I was very impressed by the session picker, allowing you to register for sessions, and the scanning device which let those who preregistered get first access to the session. That part was exceptionally well done. Though I think it could have been communicated a little better that even if a session or lab is “full” you can still try for a seat. And some ill-informed volunteers were still scanning for access half way through the session. I had to completely ignore one guy who kept telling me that I could not go into a session, despite the fact that it was 1/2 over and plenty of seating was available. The MAX staff were really great on the whole, no complaints, except for that one time, where he was a little too enthusiastic about his job.

The timing was also well done. Half an hour between sessions gave everyone lots of time to have a bathroom/refuel break and get to their sessions before the next one started.

On the whole I was very impressed by the quality of the sessions and the knowledge of the speakers. Most of sessions I attended were a delight, and those that were not, I just moved.

General Sessions:
The first general session was a big yawn. Though in Adobe’s defence I do understand they need to do the marketing shtick. On the one hand from a fanboy perspective it was great to see Adobe forming important alliances with the likes of Google and Disney. On the other hand it seemed like a lot of boring dudes in suits giving marketing pitches to the VIP section in the first two rows. One redeeming factor of the first session is how they gave a general overview of the technologies by dividing the presentation into 1) Trends, 2) Social Computing, 3) Devices & Desktops. For the managers in the audience that must have been really useful.

Tuesday’s general session generally rocked. But I got the distinct impression that you’re reserving some goodies up your sleeve for the other two MAX conferences. Which is cool, I understand that. But at least tell us you’re doing that so we don’t feel gypped. I expected some announcements around Flex 4 and Flash Player 10 point releases, or even penetration numbers. And what about Pacifica?

The only thing I would say was really missing is, even though I’m a developer now, the designers in the crowd must have been sooooo bored. You guys are coming out with huge advances in your creative tools, but the emphasis was overwhelmingly on the tech/developer side of things. Maybe that’s just a fact of general trend in the industry itself, maybe there’s no designer-ly stuff left to invent or talk about, but I doubt it. It’s all about balance.

And in a more specific note on content, I get that you want to push the whole mobile thing, but as a Flex and AIR developer, I am not convinced. SHOW ME THE MONEY AODBE!! Get Flash working, on a stable mobile platform that is ubiquitous, and then you’ve got me, heart and soul. What I heard regarding mobile is not any different than what we were told in 2000, in 2002, in 2004, and 2006. Every two or three years there’s this big push for mobile, and yet developing for it still feels like pulling my toenails out by the roots. Your Flash Player penetration may be great, and the browser/desktop development experience is solid, but for mobile it just blows. I personally will continue to refuse to develop any mobile solutions until you guys (and the mobile industry) have your shit together. Stop giving us platitudes, and give us a platform that works, on a huge range of devices, with the full power of at least Flash 9 and ActionScript 3 behind it. And what the hell was that with the iPhone? Here is is — no it isn’t, SYKE!!!. C’mon… I think that baker metaphor was apt — mobile shows great promise, but unfortunately at this stage IT IS STILL HALF-BAKED. N’uf said.

Sneaks:
The sneaks were on the whole well done. Get a geek in front of a mike with a huge audience, and chances are they are going to bore the hell out of 50% (or more) of the crowd with geek-speak. But that didn’t happen, which is feat unto itself. So I think your scripted “00B” play worked well, and forced the speakers to remain focused on the theme and the topic at hand and not tangentialize too much.

BUT WHERE’S THE ROADMAP? Are we supposed to guess? Are you saving that for the other MAX’s? A Sneak Peek without a roadmap is like road signs without a map: you know where the stops are, but no idea how you’ll get there.

Food:
The food on the whole was great. I think few people realized that the food in the Marriott salon was slightly better than the food in Moscone West. If someone is taking even one lab, they should know about the food for lab attendees. I didn’t sample the food in Moscone, but the continental breakfast and the lunches at the Marriott, including the welcome reception diner on Monday was great. And the free supply of munchies, coffee, bottled water and even pizza and beer at the BOF was the icing on the cake (and wow that was kick ass pizza!).

That I didn’t have to go out and spend money on breakfast or lunch for four days for good food plus snacks and coffee definitely made the price of the conference worth it for me. If you were charging those rates with minimal food and drink then I’d really question coming back. As it is it helped me stay satisfied, energized and focused on the sessions instead of where to eat and how to stay hydrated.

Huge kudos to Effective UI for supplying everyone with refillable bottles so we could all stay hydrated in an environmentally sustainable fashion.

The only think I would change is to keep the coffee flowing all day long, which would have made it easier after a night of parties. :)

Well done on the food Abobe.

Exhibitors:
A good number, but the booths were a little small, leading to crowding/swarming, blocking passageways, etc. And here too there way way too much emphasis on the development side. For me it was great, cause it felt like being at a Flex conference. :) But the designers must have felt major gypped. There was almost no designer presence in the exhibitors. I was kinda hoping to see new advances in drawing tablet/creative suite applications and cool After Effects/Photoshop plugins, but maybe all that is passe now that we’re all so focused on mobile RIAs? As great as all this dev stuff is, don’t forget where you came from, Adobe.

Location:
The location was fantastic, the layout of Moscone West ideal for getting to and from sessions. The general session hall was a bit of a bottleneck though.

Having the labs in another building was understandable, and you got used to it when you were there, but an underground tunnel connecting the two locations would have been better so I didn’t feel like a Hobbit plumbing the Mines of Moria.

At least it was better than the last MAX where I heard you had to do cross country training just to get between sessions. This location layout was great, but could be better.

Speaking of location, I was very impressed by the hotel reservation system. It allowed my to book my conference ticket, register for my sessions and book my hotel, all from one (more or less) site. And when I got there the hotel had all the info I placed in the form, including my special requests, and had a room all ready and waiting for me, no mixups or missing reservation. Very professionally done.

Unconferences:
The unconferences really could have used better signage (maybe up high, at right-angles to the flow of traffic?), better promotion, and better informed info booth personnel. As it was I didn’t attend a single unconference session despite wanting to, because they competed for MAX slots. If you want community participation, make them part of the MAX experience. Suggestion: on the very first day, give the unconferences an entire time slot, so that nothing but unconferences are going on, in the regular session rooms. This will give them all a chance to direct attention to their “booth” or “alcove” areas for the rest of the conference, and give people a chance to attend them at least once without worrying about missing anything in the regular conference.

Parties/Events:
The Sunday reception seemed like a private party, since all the literature said “by invitation only,” until I figured out that that meant for Sunday lab attendees only. There was considerable confusion about whether it was a private corporate function or a general reception for Sunday attendees, and the fact that there was considerable lineup, well, I just went elsewhere with a bunch of people that didn’t feel like standing in line.

The Monday party was good, and the Tuesday one was better. Being my first MAX I have nothing to compare it to other than to say that the Science Academy was a really neat location, the entertainment was fun and the food was amazing. Well done Adobe.

Most of the action at conferences like MAX as far as networking is at the after session parties. Part of the after session time except for Tuesday felt like a guessing game to discover where the real parties were, through word of mouth, even though the other after parties were not really private, just that they were hosted by some of the sponsors I would guess. So knowing about them though an “after events” board would have really helped. A section on the MAX conference site dedicated to after-events, whether official parties or just simply personal meetups, would have saved a lot of walking around.

Conference Website:
Despite the hotel reservation system and session planner being very well done, here’s where you guys need some serious improvement. The user experience was not consistent across the three applications: 1) reservation system, 2) session planner, 3) experience website.

I’ve already commented on the experience website, so I won’t repeat myself here. Suffice it to say that if I were Big Spaceship, Blitz and 2Advanced, I would not be so quick to slap my logo on this endeavour. The games are fun and the graphics superb, but I’m there to get information, purchase and reserve, with playing games a distant fourth, so the user experience needs to be in that order of priority.

Conclusion:
As my first MAX conference, on the whole a fantastic job. Overall an 8.5 out of 10.

PS: I will definitely be registering for next year’s MAX 2009 in LA on October 4-7.

Server Side ActionScript 3.0: Coming to a ColdFusion Server Near You

Posted in ActionScript 3.0, Flex, ColdFusion by Joeflash on the November 18th, 2008

Okay I was going to wait until after MAX to blog about stuff, but this cannot wait: as of about 7:30pm PST, at Adobe MAX 2008 SF, the sneak peeks announced that ColdFusion 9 will have server side ActionScript 3.0 capability. I’ve been waiting for this since Macromedia Comm Server, never mind FMS…

Correction: they didn’t say ColdFusion 9, they said they were working on this for a future version of ColdFusion Server.

You know, Flash Catalyst (aka Thermo) is cool, I mean way cool. And CoCoMo, and the next version of FMS with RTMFP is cool, and Alchemy just rocks the house, and Configurator is nice in a nostalgic kinda way (for me). And Gumbo, well it is definitely cool, but it’s not really news.

I mean, I was blown away enough by the sneak peeks Flash Player Multicast (via RTMFP), Nitro (SWF widgetization), Durango (realtime drag drop HTML/Flash/AIR component mashups), the Content Intelligent Toolkit, MeerMeer (multi-browser realtime virtualization)…

But what did it for me, the whole payoff for travelling across the continent from Toronto to San Francisco to go to MAX, was very last on the list. Server-side ActionScript 3.0, with the next a future version of ColdFusion Server.

If that were it, well, I would think, hey, that’s cool. But it’s how you can do it that totally rocks the house, that’s got me dancing in the streets.

There are three ways, from what I could tell:

1.     ColdFusion tags on the server with ActionScript 3.0 in a <mx :Script> block which generates HTML (and whatever other server-side code I would guess).

This brings the power of AS3 to ColdFusion developers. Combined with the new eclipse-based ColdFusion IDE which can sit alongside any other Eclipse Plugin (like Flex Builder), and CF will be a whole new ballgame.

2.     MXML & AS3 in Flex Builder.

Now you can author your MXML and AS3 in Flex Builder for the client-side code calling a Service operation on the server… written completely in ActionScript 3.0 inside a
<mx :Script> tag, no ColdFusion, using a .sas file on the server.

3.     AS & SAS in the same MXML file in Flex Builder, compiled using the next v. a future version of ColdFusion Server.

This is the one that did it for me, the one that brought home the bacon, oh yeah!!! :)
So now, as a Flex developer, I don’t have to know server-side code to create a service or a remote object on the server. I can just write:

<mx :Application ... >

    <mx :Script runat="client">
    ...

    <mx :Script runat="server">
    ...

</mx:Application>

Update Nov.19,3:30am PST: Sorry if you saw the wrong MXML in the last five hours, wordpress kept trying to correct the invalid XHTML of the MXML tags, but it’s fixed now.

…and I’ve got code running on the client and the server, all in ActionScript 3.0,
in the same file.

WOOHOO!!!

Now I don’t have to be freakin’ Java or PHP or CF expert just to code a backend-enabled Flex app.

Adobe, you frakin’ rock.

Developing for Flash Player 10 in Flex Builder 3

Posted in Flash, Tutorials, Flex, Community MX, Adobe, Flash Player, Flash CS3, Creative Suite, Flash CS4, FP10 by Joeflash on the November 12th, 2008

In the past few weeks I’ve written two free tutorials on Community MX that guide you through the process of compiling for Flash Player 10 in Flex Builder 3. One shows a Flex project compiled for FP10, and the second shows a Flex-free AS project compiled for FP10.

Developing for Flash Player 10 in Flex Builder 3

     This article shows you how to install the latest stable Flex 3.2 SDK, and from there configure Flex Builder to compile for Flash 10 using the latest playerglobal.swc file.

Developing a Flex-free AS3 Project for Flash Player 10 in Flex Builder 3

     This article shows you how to create an ActionScript project in Flex Builder compiled for Flash 10. It also shows you how to remove references to the Flex framework, so you can use Flex Builder for compiling pure ActionScript 3.0 projects without worrying whether you’ll “accidentally” use a part of the Flex framework. For those resisting the Flash CS4 upgrade, you may not be able to compile for Flash Player 10 in Flash CS3, but you can in Flex Builder 3.

Creating FP10 SWFs in Flash CS3: A Failed Experiment

Posted in Flash, Adobe, Flash Player, Flash CS3, Flash CS4, FP10 by Joeflash on the November 8th, 2008

Since I wrote the tutorial on compiling for FP 10 in Flex Builder 3, I wondered if there might be a way to compile Flash 10 SWFs in Flash CS3, and thought this would make a great sequel. Problem is, the experiment didn’t work. You can create FP10 SWFs in FLCS3 if you’re desperate, but for the hacks and handicaps you’ll have to put up with, you might as well use Flex Builder or MXMLC from the Flex SDK. Here’s why:

First, the steps to reproduce my experiment:

1.    Create a new Flash version profile file.

This step is actually taken from a tutorial I found here, which is the only reference I have found of anybody being successful at this. In the C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\Players directory, you copy either the AdobeAIR1_0.xml or the FlashLite3_0.xml file and create a new file named FlashPlayer10.xml.

2.    Replace all instances of “Flash Lite 3.0″ or “Adobe AIR 1.0″ with “Flash Player 10″, and each instance of “Adobe Flash Lite” or “Adobe AIR” with “Flash Player”.

3.    Comment out all the “feature” tags. I don’t know what they do in this particular instance, but didn’t seem to make any difference to the compilation process.

I’m not too sure what the “path” tags do either for that matter, but my experiments worked fine even though my XML was pointing to a Flash Lite or AIR dll file. I tried to point them to what I thought was the equivalent Flash .dll file, or omit them altogether, but I got startup errors.

4.    Launch Flash CS3, and set the Publish Settings > Flash > Version to the new “Flash Player 10″ profile.

5.    In the ActionScript 3.0 Settings, disable ‘Strict Mode’ and ‘Warnings Mode’, so you don’t get compiler errors, because the Flash compiler does not recognize the new classes. But the Flash 10 Player will, so I guess that’s what matters.

6.    Author your application with FP10 classes. The code for my test was simple:

  1. import flash.system.Capabilities;
  2. trace("Flash Player version: " + Capabilities.version);
  3. version.text = "Flash Player version: " + Capabilities.version;
  4.  
  5. import flash.display.Stage;
  6. import flash.display.ColorCorrectionSupport;
  7. stat.text = "Color Correction Support = "+stage.colorCorrectionSupport;
  8.  
  9. import flash.display.MovieClip;
  10. box3D_mc.rotationZ = 20;
  11. box3D_mc.rotationY = 50;
  12. box3D_mc.rotationX = 10;
  13.  
  14. import flash.display.Shader;
  15. var myShader:* = new Shader(); //works
  16. //var myShader:Shader = new Shader(); // does not work

7.    Do not use Publish Preview (F12) or Test Movie (Ctrl-Enter) to compile the SWF. Use Publish (F12), and preview the SWF in a browser with FP 10 installed, so you don’t get runtime errors.

And you will be able to compile Flash 10 SWFs. Below is a pic of the test that I came up with.

Flash Player 10 test

But this technique carries with it some significant disadvantages:

1.    No FP10 class code hinting. The Flash IDE code editor sucks anyways, so I don’t see this as too much of a negative. :P

2.    The reason you get runtime errors if you preview or test in Flash is that there is currently no updater available for replacing the Flash authoring player, which is actually the authplay.dll file located in
C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration.

I thought at first that you could substitute the Flash CS3 FP 9.0.124 updater for the Flash CS4 FP 10.0.12 updater, since they’re basically the same files. But it turns out that the Flash CS3 9.0.6 Updater for Flash Player 9.0.124 doesn’t update the authoring player — it’s just a zip with a “\Player” folder to replace the default “\Player” folder in the installation directory. Which has installers for browser players and standalone players for creating projectors. But no authplay.dll. So it’s completely useless, so as an updater I consider it to be broken. Cause I don’t know about you, but I would not create a projector when we now have AIR to create Flash on the desktop. And I don’t have Flash CS4, but I gotta wonder if the FLCS4 FP10.0.12 updater replaces the authoring player either. If I still used Flash authoring all the time I’d be pretty pissed.

Update: running the standalone FlashPlayer.exe does reconfigure the SWF file association in Windows for playing SWFs in standalone mode, so I guess it does have some usefulness, but it still doesn’t affect SWF previewing in Flash authoring.

3.    The default version detection in the HTML publish settings shows detecting version “0.0.0″, because evidently it can only accept one decimal place for the major version. So you can’t use version detection for the default HTML template.

You may be able to get around this by creating your own HTML template, I dunno, I didn’t bother to find out. Even if it does work with a custom template, that’s still yet another hack to put in place to get this to work.

4.    And here’s the deal breaker: you cannot use any of the new FP10 classes as the type declaration in a statement, even if you turn off compiler warnings, so it would seem. See the last two lines of code in my example: the first line works when declaring an untyped variable, but the moment I type it to the Shader class, the compiler throws up on me. This, more than anything else, is why the experiment was a failure. I could live with no compiler checking, since I’d probably be using Flex Builder to author the files anyways. But if I wanted to use the Flash compiler, no strong typing. That seals it for me.

Here are some other things I tried as workarounds which did not work:

•    Substituting the FP10 playerglobal.swc for the default playerglobal.swc located in C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\ActionScript 3.0\Classes did not work. Flash CS3 will load with an error if you try to do this, it really does not like that other SWC.

•    Pointing to the FP10 playerglobal.swc in the ActionScript 3.0 Class Path setting, which I have installed with the Flex 3.2.0.3794 SDK at C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0.3794\frameworks\libs\player\10\playerglobal.swc. See my previously mentioned tutorial for details on compiling for FP10 with FB3.

This gets rid of the FP10 compiler errors all right, but it interferes with the working of basic classes such as System.Capability.version, and will not compile the FP10 classes, probably due to namespace or class conflicts.

•    I can use FP10 features with strong typing and compiler warnings, in some limited cases, if I stick to new methods on existing classes and don’t use any of the new classes. Which is a such big limitation as to make it useless. So you can’t use compiler warnings or strict mode under any circumstances.

In conclusion, I think there’s way too much voodoo happening in Flash Authoring for compiling to a new version of Flash to be a simple thing. I mean, I’ve been using Flash for some time, and there’s undocumented stuff going on behind the scenes I still don’t get. Which is actually one of the reasons I switched to Flex a few years ago: at least you know what you’re getting when you compile something, and there’s a chance to understand the process because it’s based on an open source editor (Eclipse). Of course, if I were still a designer or even an interactive developer, I would not need to know all the geeky stuff. So it’s all relative, I guess.

In any case, for those interested here are the files that I used, you can download the zip from here.

I think there’s some truth to the rumour that Adobe has a profit motive to force people to upgrade to Flash CS4 as reason for not to providing a FP10 update for Flash CS3. But given how much I had to change in settings just to get partial FP10 compilation functionality working, it’s not surprising that they’d rather put their efforts into supporting the most recent version of a product rather than providing legacy support. I’m not saying I agree with it, but I understand why they’re doing it this way.

So I think I’ll stick to Flex Builder for authoring Flash 10 applications. It’s a shame that Flash folks who don’t have access to Flex Builder and don’t want to be forced to upgrade to Flash CS4 cannot compile for Flash Player 10 without some major handicaps. My recommendation for you Flash folks is to use FlashDevelop, which can compile to Flash 10 now.

Some Sites Should Never be Done In Flash

Posted in Flash, Usability, Flex, Adobe, Flashturbation, Conferences by Joeflash on the November 7th, 2008

…Unless they do a decent job at duplicating HTML-like functionality. You see, I have a bone to pick with companies and developers that try to shoehorn a solution into an inappropriate technology. The Adobe MAX 2008 Experience website is a most succinct case in point.

When I go to a conference, I like to assemble all the information available to me in an Excel spreadsheet I can just print out and carry around with me, so I don’t have to look up where everything is when I get there. A bit anal, perhaps, but there it is. This year when I go to Adobe MAX (which is my very first MAX, BTW) I thought I would not have to do that at all because the Session Locater will spit out a customized PDF with all my choices and reserved workshops. Fantastic!!

Only thing is, it won’t list my second and third choices in case I feel like wandering, so I create my spreadsheet anyways. Problem is, the PDF the session locater outputs has the text locked down. Whaa? I try and copy-paste, and all I get is gibberish. Now I understand PDF security preventing copy-pasting on legal documents and such, but on a personalized conference schedule? You know, cause I’m such a Man of Mystery jetsetting from one top secret conference to another, I need that kind of security. Whether by accident or design, this is strike one. So I type the sessions into my spreadsheet by hand, wondering why I’m even bothering. (Update: figured out I can copy-paste the text from the session locator, so I’m happy on that score. : )

But my beef is not with the Session Locater app as a whole, despite this dreadful oversight. That is clearly an excellent use of Flash, a great example of a Rich Internet Application. I go in, do what I need to do, download my PDF and I’m good.

So I’m trying to find out more information on the ‘after events’ for Adobe MAX N.Am. 2008 — you know, the parties and shmoozefests where the action really is ;) Specifically, more information on what’s featured in the “birds-of-a-feather/meet the team” sessions on Tuesday night, so I can include it in my spreadsheet.

I don’t find anything in the Session Locater. Nothing on the customized registration page. Nothing in the MAX Conference Brochure PDF.

Where do I find it? It’s under Highlights on the main “Experience” website. Okay, so far so good: the site has deeplinking so I can bookmark where this info is so I can find it later on.

Okay, so I think, it’s text, right? I can just select and copy. Uh, no. The text here is locked down as well, no can do copy. Here is a Flash site full of text, and right-click > copy is disabled! WTF?! Is this another state secret? So I try to output the site to Flashpaper, to PDF, anything that will gimme da text, fool! No luck, all I get is truncated sentence fragments and goobledygood.

Okay, so the whole point of my spreadsheet is to have the information in a customized, portable format I can carry around with me so I don’t have to dig through the conference literature or open my laptop and surf to the conference website (and pray, pray really hard for a good internet connection). But I’m sure as hell not going to print out screenshots of the damn thing or I’ll burn through a whole printer cartridge.

So I gotta ask the question: who in their right mind builds a Flash website with mostly text, with no print functionality, no textfield copying allowed, all in Black so no one would even dare print out a screenshot? Someone who was in a rush to get it out the door and didn’t think of the user experience, that’s who. That’s madness!

So you know what I did? Not to be daunted, I did take screenshots. Four of ‘em, which told me what I needed to know. I screencap’ed them, cropped them, and inverted the colours so they’d be in white instead of black so I can print them out. Here they are:

Adobe MAX NA 2008 Highlighhts ScreenhackAdobe MAX NA 2008 Highlighhts Screenhack
Adobe MAX NA 2008 Highlighhts ScreenhackAdobe MAX NA 2008 Highlighhts Screenhack

But really, should I have had to go to all that trouble just to make the data portable? The user experience of that website is so old skool it makes my teeth hurt, and is every argument that people use against using Flash. The animations and the game is cool, but I could care less about the eye candy when I’m looking for information. Flashturbation or what guys…

Some sites should never be in Flash. Such as text heavy, hyperlinked websites. Like brochure sites. Like blogs. Like research papers. Sites that the user will want to print out a lot of information. Not unless you’re willing to add the user experience features to make up for this handicap, and even then. To this day I refuse to bookmark or refer to any links from Flash-built blogs, on principle, because they’re such a pain in the ass to use.

Flash just got a whack of new text features; it has deeplinking; it has SEO; it has print functionality; it has enhanced clipboard copy; it has dynamic PDF conversion; it can iron your shirts and predict the weather. So use these features. Or make the site in HTML. But don’t botch the job and make us all look bad. Sorry, from the industry leader of this technology, I gotta call it like I sees it.

Adobe, you did a fantastic job of the MAX conference, I am deeply impressed by the organization of that event on so many levels. But after spending a months’ salary just to go to a conference, well… I expected a better experience. (web experience that is — I’m sure the conference itself will be blast!!)

For all I know this information will all be in the conference booklet I get when I get there. That’d show me and my big mouth, huh? :)