Ask a Jedi: Flash, ColdFusion and FIle Uploads

Asa asks an interesting question. I wasn't going to answer as Flash isn't my area really, but I had an idea and I figured I'd suggest it. Please feel free to correct me if this is dumb. Anyway, here is the question:

I'm trying to make a file unloader using Flash & ColdFusion. I have a flash file embedded on a page that let's the user select a file, which is then posted to a ColdFusion page for upload. The problem is that the Flash player doesn't post cookies on file uploads, so the ColdFusion page that's getting posted to is under a new session. Is there a way to append the cfid to the url and have ColdFusion use that session instead of making a new one?

So I was a bit surprised by this. I can't imagine why Flash would not do a 'normal' request and pass along the cookies. That being said - I think I know a way to do this. When you generate your HTML code to embed the Flash SWF, you can pass along the session.urltoken value via flash vars. The Flash app could read this and use it when it does its POST.

Right?

Any Flash users out there want to chime in? (I'm sure I must have at least one Flash guy reading the blog. He probably sits next to the one Photoshop guy reading my blog. ;)

Adobe Developer Week

Wow, I just found this out myself, but it may be old news. Next week Adobe is hosting a week full of developer sessions you can attend via Connect.

Adobe Developer Week 2008

Topics cover ColdFusion, AIR, Flex, Flash, and other items. If you can't sign up for a session (or be there when it happens), Adobe will be providing recordings 5 days later.

Again - wow!

Another charting option: XML/SWF Charts

A few weeks ago I blogged about an alternative to ColdFusion's built in charts, Google's Chart API. This week I discovered another alternative, XML/SWF Charts. This isn't a free option, but they have a free license with limitations and the price for a "full" copy is only 45 bucks for a single domain. It works pretty easy too.

Boeing 787 Launches

Ok, so I don't normally blog about Flash, but I noticed quite a few posts on MXNA today about the new Boeing 787 web site and how it uses Flash. The Flash part is nice and all, but I'm a real nut for airplanes so I encourage folks to check it out:

Boeing's New Airplane

The coolest feature? Well, the coolest looking feature? Check out the video of the dimming windows. Nice.

If I can make one comment on the Flash, the site was well done and all, very slick, I just wish there was a mute on the front page video. I hate it when sites do audio and don't give you a mute option. The other portions of the site do have audio controls at least. I'm still waiting for Adobe to add a mute control to Flash for cases where the developers forget.

RIAForge hits 200!

The title says it all - RIAForge just released its 200th project. Other stats for those of us who are stat junkies:

Total Active Projects: 200
Total Views: 791967
Total Downloads: 63040
Total Verified Users: 1647
Updates in past 24 hours: 5
Unique Logins in past 24 hours: 45
New users in past 24 hours: 22

(And yes, I'm still looking for a way to slap AdSense up there without Adobe noticing!)

Flash 9 for Linux

I don't blog often about Flash or Linux, but for those who care, you can now get Flash 9 for Linux.

Announcing RIAForge

So - I've been dropping hints left and right over the past few weeks about a "secret project" that I've been working on, and today I finally get to announce it. Please say hello to RIAForge.org. What is RIAForge?

RIAForge is a place to host open source projects built with Adobe technologies - from ColdFusion applications to Photoshop plugins to Flash ActionScript libraries.

What I really like about the site is that you can use it as much or as little as you want. As an open source author, you can simply list your project and point to the resources you already have. But what if you don't already have a web site?

RIAForge offers:

You can pick and choose which, if any, services you need. The site is still going under a bit of development, so you will definitely see a rough edge or two. (Firefox users, see PS at bottom.) But check it out - and if you have code to share, PLEASE post your project.

This site is Adobe supported and was the brainchild of Ben Forta. I did the primary development work with a lot of help and support from others, including Brian Rinaldi and Rob Gonda (SVN support is all from Rob, and will be a hosted project shortly.)

p.s. Firefox users: You may see a "white screen" when saving edits to your project. This is a known issue and is being worked on.

Flash Player 9 for Intel Macs

Woohoo! Flash Player 9 for Intel Macs is now released. Something for me to do while I watch the Rams beat the Colts.

Flex 2, ColdFusion 7.02 Released, Flash 9

So I'm probably the last to blog it, but today was the big release day for the Flex 2 platform. (Links will be at the end.) I've already blogged about Flex 2 before and how great it is, but now is an excellent time to download it and start learning the technology. I cannot recommend it enough.

You can download Flex 2 (all the parts, including the IDE, SDK, etc) here. ColdFusion 7.0.2 may be downloaded here. And lastly, Flash 9 can be grabbed here.

Adobe's Active Content Fix

So, I don't know about you, but since I don't use the devils' browser, I really haven't been too concerned about the upcoming (now here) EOLAS update which impacts Flash. When the update was rolled out and my project manager noticed the change on a client site, it was time to correct it.

So I took a look at Adobe's Active Content Developer Center and was surprised at how simple their fix was. Luckily my company's CMS system has a custom tag to spit out the code for Flash SWFs. All I had to do was modify that. The code change in question could not be simpler, I mean, look at this:

<script>
AC_FL_RunContent(
   'movie', 'filenameWithOutSWF',
   'width','48',
   'height','1516',
   'id','myidiscoolerthanyourid');
</script>

Shoot, even if this IE change had not happened, this would have been a useful little script to get Flash onto a page.

I just wanted to make sure people knew about this fix. I was actually surprised by how fast I was able to fix the client's code with this.

One little note. I wasn't sure how to handle FlashVars. I thought they were special and the JavaScript code that Adobe provided didn't have a way to handle them. Duh. FlashVars are just one more property. Here is a modified version of the code above.

<script>
AC_FL_RunContent(
   'movie', 'filenameWithOutSWF',
   'width','48',
   'height','1516',
   'id','myidiscoolerthanyourid',
   'FlashVars','msg=DharmaWasHere&station=Swan'
);
</script>

Truly simple and elegant solution. Thanks Adobe!

More Entries