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.
(more…)

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.