Joeflash’s Enigmacopaedia

The Future of Crash Reporting For The Flash Player

Posted in Adobe, Flash Player, FP10, Flash Platform Community, Flash Platform by Joeflash on the February 12th, 2010

Lately Adobe and Flash have taken a lot of heat over the real and perceived instabilities of the Flash Player. Depending on who you talk to, these are due to the Flash Player itself, or the fault of poorly developed applications. But how would Adobe know the difference, other than through us developers painstakingly filing Flash Player bugs (and bugging Adobe to fix ‘em)?

Kevin Lynch recently discussed Adobe’s views and improvements in bug reporting and Flash Player performance. Mike Chambers chimed in to confirm these changes to the Adobe Bug system. And just today, Tinic Uro, Flash Player engineer from whom we have not heard from in over a year and whose articles are amongst my most prized links, treated us with an article on Apple Core Animation vis Flash Player performance.

And with the inclusion of the much anticipated (and debated) Global Error Exception Handling (FP-444) in Flash Player 10.1, Adobe has shown that the community is being heard (eventually).

This is a good first (and necessary !!!) step, but what the Flash Player needs is better automatic crash and exception error reporting.

My colleague Matt Fabb and I have put together three feature requests that I believe hold the key to making the Flash Player a much more robust development platform.

  1. In the right-click context menu include a link to the player’s bug system
  2. Automatic crash reporting built into all versions of the Flash Player
  3. Flash Player API hook to allow for custom automatic exception error reporting

(PS: Vote for these FRs!!)

The first allows people to submit a bug to Adobe’s (now open) Bug Reporting system, which Matt has eloquently described on his blog.

The second feature request would have a second process “monitor” the health of the Flash Player and send an automatic crash report to Adobe if and when the player process crashes through a fatal exception (which most of the time also takes down the browser). This will give Adobe invaluable insight as to why so many users bitch about claim that the Flash Player is unstable on certain OS/browser configurations, without Adobe relying solely on an army of QA engineers.

The last feature request would allow for an addition to the global exception API (as requested in FP-444 and detailed in the livedocs), to allow developers to specify a server to automatically send uncaught exception data, in the eventuality that the application itself crashes, which would prevent it from otherwise being able to send such a report.

Vote for these three feature requests, and get a glimpse of what the future may hold.

Why Flash is Not on The iPad

Posted in News, Adobe, Flash Player, Mobile Flash, FP10, Flash Platform Community, Apple, iWhatever by Joeflash on the January 30th, 2010

There is a polarizing debate going on between “iPad - Flash = Epic Fail”, and “Flash is dumb/crashes/obsolete/ads/porn/who cares,” bordering on the religious. Problem is, many of the cons against Flash are the same tired HTML fanboy arguments one hears, as if by trolling force alone millions of sites will go dark overnight. There’s only one reason why Flash is not on the iPad, or the iPhone for that matter.

It’s not 3G bandwidth. If Rogers or AT&T has oversold its network capacity and cannot deliver 1/10th of its advertised 7.2Mbps with a clear signal in a major urban environment, they deserve to be taken to court for false advertising. Even then, I am on a wireless connection at home, and during peak hours the connection can slow to dial-up speeds. When that happens, I click on FlashBlock, and only click to enable the Flash content I know I want to watch. So tell me one good reason why Apple could not disable all VM plugin content by default, and enable them by a click on the little blue lego. No, I can’t think of a reason either.

It’s not performance. As Lee Brimlow, Flash evangelist for Adobe comments, Adobe is willing to work with Apple on improving the performance of the Flash Player for this mobile device, as they have with every other major manufacturer. The fact of the matter is, Apple will not let Adobe play in their sandbox. And yes, I will concede, Flash could be better engineered to run on a Mac, as John Gruber claims — but that is besides the point, because we’re talking about a completely different product and OS here. As Peter Elst mentions, “With the iPad we’re talking about a different device, a processor that clearly is capable of high performance rendering”.

It might be about the fact that Flash will allow content that cannot be sold on the App Store, but that does not hold water either. App store revenues of millions a year do not threaten a billion dollar revenue base.

There is only one reason I can think of that makes any sense why Apple would do this.

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;
  5. import flash.display.Stage;
  6. import flash.display.ColorCorrectionSupport;
  7. stat.text = "Color Correction Support = "+stage.colorCorrectionSupport;
  9. import flash.display.MovieClip;
  10. box3D_mc.rotationZ = 20;
  11. box3D_mc.rotationY = 50;
  12. box3D_mc.rotationX = 10;
  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 SDK at C:\Program Files\Adobe\Flex Builder 3\sdks\\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.

DRM in Flash — What’s the Big Deal?

Posted in FlashComm/FMS, Adobe, Flash Player, DRM by Joeflash on the March 12th, 2008

I’m a little late to the discussion it would seem, but, in stumbling upon last month’s heated discussion on the topic of DRM in Flash, let me lend a little clarity, and sanity I hope, to the debate.

No doubt you’ve already heard of the Electronic Frontier Foundation’s denouncement of “DRM in Flash”, with posts and comments such as these serving only to confuse matters.

Understand, I’m the first to say “down with DRM” — I want my MP3 and my FLV (cue Dire Straights song). I love the open source revolution, and I could not do business without it. But on the other hand, previous to this capability, some clients would not publish their material to the web at all rather than use Flash. Or they’d put their content on Windows Media Player (egads! Have you ever tried to play web video in that thing?) Given that Silverlight supports DRM, Adobe must follow suit and leverage a DRM solution in order to compete. And, given the number of clients that will now regard Flash as a serious broadcast-capable video publishing medium, the increased usage can only be a good thing, because once again Flash video will be made to accommodate a more demanding client market, which eventually translates into better Flash Player performance, more codecs, more choice for video on the web.

It has always been possible to protect FLV video by way of Flash Comm/Media Server, because streaming video using the RTMP protocol would not show up in the browser cache. Some sites like YouTube still use progressive (non-streaming) download, but break up the video in segments and show the sequence in the video player, thus obfuscating attempts to download the whole thing. But these did not constitute a proper DRM solution for Flash.

Now in Flash Media Server 3 [PDF], a secure protocol called RTMPE adds 128bit AES encryption for both streaming and non-streaming downloads. And that’s the magic mushroom here. Security enhancements already present in the Flash Player also prevent cross-application and cross-domain leakages, which amongst other things by default disallows you from loading a video player SWF into a foreign SWF and use ActionScript to take a bitmap snapshot of the video content (though you can give permission to override it). This is not in and of itself a DRM capability, but constitutes part of the DRM solution for the Flash player. Access tokens for authentication with FMS3 are also be a part of the DRM solution.

I find it most interesting that some of the discussion has been around the Adobe Media Player (AMP), and not Flash Media Server 3 (FMS 3), since AMP is actually an AIR application using FMS 3. Goes to show there’s still some confusion out there as to what DRM in Flash really is.

So just so we’re crystal clear, THERE IS CURRENTLY NO DRM CAPABILITY NATIVE TO THE FLASH PLAYER ITSELF. Adobe Flash Player version 9 release 3 currently does not have DRM. It’s mostly in Flash Media Server, which is a SERVER SIDE PRODUCT.

(Granted, the Flash Lite player aimed at cell phones does have DRM capability, but this is not exactly news, nor is it restricted to just mobile video, it’s for all mobile content. So just for the record, DRM for Flash Player vs Flash Lite is talking apples and oranges here.)

So companies unwilling to deploy Adobe’s streaming server solution will not be able to use DRM capabilities for the Flash Player without FLMS3. And even with FMS3, DRM IS OPTIONAL. DRM capability for Flash is here, and now. But interestingly enough, I get a fair amount of requests for video players, and I have yet to encounter a client wanting Flash video that requires the DRM capability — but maybe that’s just me. However, many companies are seriously looking at this new feature as breaking down that last barrier preventing them from considering Flash for video delivery. If a client asks me to build a DRM-enabled video player for Flash, I’ll built it, because figuring out stuff like that is fun for me, it’s what I do.

But this does not mean that every FLV served up on the web will all of a sudden be protected. And DRM is an illusion anyways: bottom line, if you can see it on your monitor, you can copy it; this will never change. DRM is just a deterrent in the great digital cold war currently being played out. So don’t sweat it.

So before anyone spazes out running around like Chicken Little proclaiming the end of free video in flash, get your facts straight.

No, Steve Jobs Is not Lying About Flash Not Working on The iPhone (nor is he doing an f-you to Adobe)

Posted in Business, Flex, Adobe, Flash Player, Mobile Flash by Joeflash on the March 8th, 2008

Everyone is all a huff as why the iPhone does not have Flash, in posts and comments all over the bloggosphere lately about Steve Job’s comments about Flash, spawning two main interpretations:

a) Steve Jobs is Lying about Flash on the iPhone, and is keeping the info to himself as a negotiating tool.

b) Steve hates Adobe, and is doing an f-you to Adobe.

…and a kinder, more rational explanation,

c) that Flash is not ready for the iPhone.

Okay, let’s get a grip, and a reality check here people. I am not normally one to fall prey to idle speculation, but some of the conspiracy theories floating about lately border on the ridiculous.

Personally, I don’t see any of these explanations as holding water, including the third.

First, Steve Jobs does not need to lie to anyone. He simply keeps his mouth shut on stuff he doesn’t want anyone to know about (yet).

Second, this is business, it’s not personal. That Apple would pull this as a stunt to piss off Adobe or use it solely as a leveraging tool does a disrespect to both parties. (more on this below)

And let’s not turn speculation on whether the iPhone will run flash into yet another *\*yawn\** flash-bashing session. I am sooo bored of pathetically uninformed Flash bashing that does not stand up to a grain of truth. Fullscreen, hardware-accelerated H264 Video in Flex and AIR — ‘nuf said people.

As for Flash running slow on Macs versus PCs, it’s a problem that occurs mostly in Flash Player 8 and below (or AS2/VM1 apps in FP9+), as a difference in the frame rendering engine between the two OSes. Any Flash developer worth their salt will know that if you set the frame rate of the FLA to 21, 31, or 41, that “bug” will disappear, and mac SWFs will run just as fast as their PC counterparts. Don’t blame the technology, blame the developer for being too clueless to know how to code a decent Flash app. And apps designed for the VM2 (AS3) runtime in the Flash player run at the same speed on the PC as it does the Mac without the hack. So let’s put that one to rest already.

As for Jobs not willing to put Flash on the iPhone, as a Flash/Flex developer I can see that as a perfectly reasonable assertion. I think this guy has the right idea: it’s not that Flash is not ready for the iPhone, or that the iPhone is not ready for Flash (the full version), it’s both, depending on which Flash player we’re talking about. One reason I won’t currently touch Flash mobile development with a ten foot pole is that the Flash Lite player is a pathetically chopped down version of the Flash player which requires a mix of AS1 and AS2 coding techniques with a “hackiness” that almost makes Lingo programming look robust. And the full Flash Player is just too powerful for the iPhone processor, so one could also say that the iPhone “is not ready” for Flash. Truth is, Adobe needs to create a new version of the Flash player for this “mid-range” computational device.


Given the Flex 4 roadmap lecture at a recent Flex conference I attended regarding the up and coming modular nature of the next version of the Flex framework, my money is on the probability that Adobe is already in the process of making a Flash 10 Player for the iPhone.

I am sure there are a fair bit of politics involved, but none of the current discussions I’ve seen take into account the pink elephant in the room: Quicktime. The FLV standard is currently kicking Quicktime’s butt all over the net as the current de-facto standard for online video, so it’s unlikely Apple wants to invite that wolf into their home without some serious adjustments. Adobe and Apple may even be in talks to establish Quicktime player capability in the next version of the Flash Player, who knows (again pure speculation). If we take into account the iTunes licensing model, it’s quite possible Apple will also want some form of DRM for video and audio in Flash as well.

As for the other assertion that Microsoft’s Silverlight will be “first to market” on the iPhone, well I personally don’t think Apple cares if Silverlight or Flash, both or either get on the iPhone. Steve is holding all the keys to all the doors of the iPhone. If it enhances the Apple brand without losing too much control, he’ll do it. But I doubt Apple is weak enough to be bought, bullied or cajoled into doing anything it doesn’t want to do, from Microsoft, Adobe or the user base crying out for either. Apple has long since become a monopoly in its own right, and despite its PR, is far from being the “company for the people” that it once was. You worship at the iChurch of Apple or you go home, and you don’t tell the priesthood how to operate.

Having said that, everyone assumes there’s this incredibly aggressive war going on between Apple and Adobe. What if there is no such thing going on, and Apple and Adobe are merely taking their time to sort out the mutual licensing rights, as it is definitely in both parties’ interests to come to a satisfying solution? Quicktime, PDF, iTunes, DRM, FLV, SWF, Flash Player, iPhone OS — all these are proprietary technologies, on both sides, and getting them to legally play well together will take time for the suits and the engineers to work out.

Personally, I don’t give a toss if the iPhone has Flash or not right now. I’m having too much fun developing Flex and AIR apps. Flash on the iPhone will come. And when it does, it’ll be cool. But I’d rather have faith that these two goliaths will work out a decent solution rather than give in to all the fear and loathing going on. So please, let’s give the limp “Apple is doing an f-you to Adobe” rumours a rest, eh?

Update March 20: Here’s the real state of Flash on the iPhone, right from the horse’s mouth.

Next Page »