FMS registerClass Example Added To github

Hi folks, apologies about the extended radio silence; I've been busy working on a new project which has taken up a lot of my time. The good news is that I am learning a ton of new stuff in the process which in turn should provide me lots to blog about. Expect posts about Rails, heroku, JavaScript, AWS and maybe even Flash ;-)

I've also just discovered a treasure trove of old projects and sample files and I've decided to offload many of them onto github. It would be a real shame to lose all this stuff, some of which is of course pretty useless whereas others may be useful to some folks. It'll be tricky to pick the right stuff as no doubt I will not be able to post everything I've got floating around...
So to make a start (and with the hope to keep this up) here's my first little Flash sample project. This one shows how to use registerClass to send custom typed ActionScript objects over RTMP between client and FMS server (sorry, AMS it is now...). I don't take full credit for it as I cannot remember if this was based on someone else's work or not... if it was you get in touch and I'll provide credit and link juice!

My github account can be found at https://github.com/stoem (not much there yet), and this particular repo is at https://github.com/stoem/FMS-registerClass.

Happy forking you forkers :-)


Flash Player 11.2 Breaks Video Support For Some Webcams

An annoying bug has surfaced in Flash Player 11.2 that breaks support for some webcams. It appears that cameras of the Microsoft Lifecam VX series are most affected.

A few days ago a customer contacted me about an issue he was experiencing on Scribblar whereby his webcam image would freeze immediately after starting the camera. He also noticed that this problem only occurred in the latest Flash Player versions 11.2.202.228 and 11.2.202.229.

The only known workaround currently is to use an older version of the Flash Player - the following forum post has some details: http://forums.adobe.com/message/4320673#4320673

The initial bug that was filed is now Adobe internal and no longer visible (for reason only known to Adobe...), but please add your vote to this duplicate bug anyway if you are affected.

I've heard reports that there may already be a fix in Player 11.3 beta - we will know more when the final release drops.


Adobe To Shut Down LCCS, Customers Badly Affected

After several recent announcement around Adobe's LiveCycle platform, it may not come as a surprise to some that the LiveCycle Collaboration Service (formerly Cocomo, formerly Flash Collaboration Service) will be shut down at the end of 2012. What may be a surprise however is the relatively short notice that Adobe is giving existing customers and a total lack of a migration path, leaving many people in a real tight spot.

Remember that LCCS is a hosted collaboration service, effectively cloud based, that allows developers to build real-time communications right into their Flex applications. The work that has gone into LCCS is impressive, and the platform offers a range of great features such as room provisioning APIs, live and audio and video communications (both over RTMFP and RTMP) and even screensharing capabilites (but let's not warm that topic up again...).

› Read Full Article


Troubleshooting SWF Loading Issues in Chrome - MIME Type Issue With S3

As some of you may already know, I run and maintain a few of my own products, the most popular of which being Scribblar which pushes hundreds of sessions every day.

Recently I started getting reports from users that the main page which hosts the applications' main SWF file was not loading properly, or it would work in one browser but not another. Within the handful of reports I had, Google Chrome appeared to be the browser that posed most of the issues - this seemed odd as Chrome effectively has Flash Player built-in and always auto-updates to the latest release version which is why I recommend it as the preferred browser to anyone who asks.

My first look was towards SWFObject - I figured that maybe something in Chrome had changed and broken the Flash Player detection. A common trap that some developers fall into is to check for specific Flash Player versions, for example only allowing access to Player 11 or below, which then locks users out once Player 11.5 (or similar) is released. But this wasn't the issue here.

After much more digging and more back-and-forth emails with some users I noticed a very odd behaviour when trying to access my SWF directly (without an HTML wrapper) in Chrome. This image shows the request in the Chrome Debugger.
Chrome Debug Output
Notice how the shows as 'canceled', and that the content type is coming up as the generic binary/octet-stream? Clearly this pointed towards Chrome not being able to deal with a wrongly set MIME type correctly, whereas other browser may have handled this is a more flexible way.

› Read Full Article


Accessing the mx_internal Namespace in Flex

This is a topic that comes up from time to time, and it did so for me on a current project so I thought to quickly sum it up again here.
I was working on a Flex project using an old SDK (4.1) and the OSMF-based Spark VideoPlayer component contained within. I had to use this particular player since the customer needed to target Flash Player 10.0 or above.

I'm unsure which version of OSMF this Flex SDK contained, but what I could see was there seemed to be no obvious way to set the bufferTime on the MediaPlayer instance that's contained within the VideoDisplay instance that's contained within the VideoPlayer due to the fact that the MediaPlayer instance was namespaced to mx_internal

view plain
1mx_internal var videoPlayer:MediaPlayer;

What does this namespace mean? It basically is Adobe's way of saying: "Watch out, this stuff right here is likely to change in a future version (of OSMF in this case) and if you mess with it then it may break in the future."

Well in my case it was worth the risk :-) and here's how you'd access the bufferTime property and use the mx_internal namespace.
At the end of all your import statement add this:

view plain
1import mx.core.mx_internal;
2use namespace mx_internal;

Then somewhere else in your code you can do this (where player is my instance of s:VideoPlayer):

view plain
1player.videoDisplay.mx_internal::videoPlayer.bufferTime = 0.1;

Suck this up and enjoy :-)


Check if Frame Label Exists (in Flash/ActionScript)

A project I've inherited includes a piece of code that sends a MovieClip to a frame with a specific label (in my case the label was 'disabledframe'). Unfortunately some of the MovieClips that extend this base class do not contain said frame label which resulted in a runtime error.
To make matters worse I do not have access to the original assets and adding the rame was therefore not an option. I knew that I could work around this problem by checking if the frame label exists, but couldn't remember how it was done...

Thanks to the power of Twitter and its awesome inhabitants I had the answer delivered within seconds - special thanks to @stray_and_ruby, @stevecarpenter (although his response time to my tweet was at least 24 seconds slower than the first correct answer, he needs to work on that ;-) and an anonymous commenter by the name of DaveW who pointed out a major error in the initial code I posted - oops.

view plain
1// assuming you have a movie clip named 'mc' with a label named 'blah'
2trace(movieClipHasLabel(mc, "blah")); // traces true
3
4function movieClipHasLabel(movieClip:MovieClip, labelName:String):Boolean {
5 var i:int;
6 var k:int = movieClip.currentLabels.length;
7 for (i; i < k; ++i) {
8 var label:FrameLabel = movieClip.currentLabels[i];
9 if (label.name == labelName)
10 return true;
11 }
12 return false;
13}
Easy when you know that mc.currentLabels returns an Array of framelabel objects within that MovieClip.

By the way - since we are talking about Twitter - if you enjoy my blog posts then why not follow me?


One Day On: Reflections On Adobe's Flash Announcements

Yesterday, November 9th 2011, was a day that Flash developers will remember for some time to come. It was also the day when Tim Siglin (why did I ever doubt him) was proven right when he posed the question: 'The TouchPad Is Dead; Is Adobe's Mobile Strategy Next?'.

Well as it turns out, yes it is, as Adobe yesterday announced that it will halt any further development on the Flash Player for mobile (the desktop Player is unaffected) and will focus on HTML5 to target those devices. The company also confirmed that the AIR runtime in combination with the Flash toolchain was its preferred choice for building native applications for mobile.
The announcement came shortly after the company announced healthy profits, and a 'restructuring' exercise which will see 750 employees lose their jobs. A sad day indeed.

› Read Full Article


Setting up Chrome for Debugging on OSX in Flash Builder/Eclipse

Here's a quick tip if you'd like to add Chrome as your default browser (or secondary for that matter) in Flash Builder.

You may have noticed that Eclipse seems to struggle with this if you browse for the location and end up with '/Applications/Google Chrome.app' as the path: it gets rejected as soon as you click 'ok' stating that 'The location value is not a valid path name'.

After a bit of trial and error I managed to find a valid path name after checking out the existing browsers' paths in more detail. Here's what seems to work for me:

view plain
1/Applications/Google Chrome.app/Contents/MacOS/Google Chrome

Note that under Windows you may not encounter this issue. Hope this helps someone.


The End for Adobe's Multi-Screen Strategy?

The End for Adobe's Multi-Screen Strategy? - This is a question that Tim Siglin asks in his recent article on the sudden death of the HP TouchPad and WebOS.

My initial reaction to reading that header was one of suspected link-baiting; but since I know Tim well enough I knew that his style of writing goes substantially deeper than that of an attention-grabbing headline (but hey, this didn't stop me from re-using it. You see my standards are far far lower and since you are now reading my post it clearly has paid off ;-).

So does Tim have a point? Does the demise of WebOS and the sluggish uptake of other (non-iOS) mobile operating systems outside of Android really spell bad news for Adobe and its multi-screen dream?

› Read Full Article


Flash Player 11 Beta 2 Is Out

A few days ago Adobe has released the beta 2 version of the upcoming Flash Player 11 on labs. Apart from adding 64 bit support which was already part of the beta 1 drop this latest release adds a few new features such as support for the JPEG-XR image format which provides better compression and alpha channel support.
The most exciting new feature for developers of real-time audio and voice applications is of course the addition of H.264/AVC software encoding which results in better quality support for webcam based video.
Game developers will likely salivate over the Stage3D APIs code-named Molehill. This is a set of low-level GPU-accelerated APIs which enable advanced 2D and 3D capabilities across multiple screens and devices.

It'll be interesting to see what developers make of this and we will undoubtedly see some previews at the upcoming Adobe MAX Developer conference.

Have you built any applications using H.264 support or Stage3D yet? Post some links in the comments if you like.

To download Flash Player 11 Beta 2 just visit labs.adobe.com.


More Entries