Joeflash’s Enigmacopaedia


Flex Builder 3 Startup JVM Termination Error

Posted in Flex Builder 2, Flex Builder 3, Eclipse by Joeflash on the March 26th, 2008

So I just installed a new version of my firewall software, and now neither FB 2 or FB 3 will start. I get a JVM termination error popup, that’s it. As fortune would have it, Neil Webb had blogged about the same problem just today. So I looked up the issue on the Adobe bugbase, and there I found the answer after a little investigation.

JVM termination error dialog

Turns out I had some JVM performance tuning set in my shortcut.

-refresh -clean -vmargs -Xms512m -Xmx1024m

…and apparently it was too high. The moment I ran FlexBuilder.exe directly or the shortcut with a lower max mem at -Xmx768m , it worked, no problem. I found I could push it all the way up to 958m, but no more. At 959m, it crashes, just as before.

No idea why installing new software would affect the maximum memory allocation for the JVM, or why a max of 958. But at least it’s working now.

\*replaces hair torn out of scalp\*

Update 02-04-2008: logged an official bug with the Adobe JIRA bugbase

Flash-Flex Integration: New Article Series on Community MX

Posted in Flash, Flex, Community MX, Workflow, Flex 3, Flash CS3 by Joeflash on the March 26th, 2008

I’ve just started a new article series on Community MX all about strategies and techniques for implementing an integrated Flash-Flex workflow. Which is to say, using Flash objects and classes to be compiled into a Flex SWF application, or Flex objects and classes compiled into a Flash SWF application.

Despite some very excellent articles on Adobe Devnet, the information that’s out there can be a little confusing, and there are a lot of niggly things to keep track of, and many possibilities to explore regarding integrating Flash assets into a Flex application, or Flex assets into a Flash application. So I started this new series as a way of exploring that seldom ventured “grey zone” between the Flash and Flex development workflows.

The series kicks off with a high-level discussion on workflows, to be followed in the coming months with tutorials for implementing specific techniques.

a bird's eye view of the Flash-Flex workflow
A bird’s eye view of the Flash-Flex workflow

Like all my series on Community MX, the first one is free, and the rest are available for a pittance or at a subscription rate.

The SWF Metadata Tag Documented

Posted in ActionScript 3.0, Flex by Joeflash on the March 25th, 2008

I posted a request on the Flex 3 Livedocs, and Stephen Gilson from the Flex doc team was kind enough to include full details on the SWF metadata tag in the comments section of the page. According to him, the SWF metadata tag was undocumented by mistake, and will be added in a future documentation update. In the meantime, check out the comments on the livedocs page.

Thanks Stephen!

[SWF width="#"
height="#"
widthPercent="#"
heightPercent="#"
scriptRecursionLimit="#"
scriptTimeLimit="#"
frameRate="#"
backgroundColor="#"
pageTitle="someString"]

Kickin’ It At FITC Toronto 2008

Posted in Conferences by Joeflash on the March 24th, 2008

I’ve not yet had the time to fully comment on the sheer super amazingness of the 360|Flex geekfest in Atlanta last month, but you can be sure I won’t miss bloggin it up about kickin’ it in my home town at FITC Toronto 2008. This year I’m an “official conference blogger”, which means it’s like, my job to go and tell people about how cool it was eh?

There’s plenty this year for everyone: design stuff, code stuff, video stuff, weird stuff, parties and workshops… I’ve always been a fan of FITC, and have gone every year I could since it all started back in 2000, and this year will be no exception. Toronto has lots to see and do, a whack of very awesome restaurants, and some very far out clubs. I can’t wait for the after parties! Beauty, eh? Like, be there or be a hoser! :)

Sorry, I don’t have a discount code for yous like some people, but if you’re a member of the Flash In TO user group, you should have received a 10% discount code in your newsletter email.

Adobe Announces the Flash Media Rights Management Server

Posted in Adobe, DRM by Joeflash on the March 20th, 2008

The Professional Flex 3 Book is Now In Session

Posted in Books, Flex, Publishing, Flex 3 by Joeflash on the March 20th, 2008

Well, after much planning, and searching, and a few hiccups, our team line-up for the upcoming Professional Flex 3 by Wrox is finally established.

We’ve got a phenomenal team line up, consisting of Andrew Trice, Peter Ent, Joe Berkovitz, Tom Suggden, Todd Prekaski, David Hassoun, Jun Heider and myself.

We’re all very excited about this book, and the reason for so many authors is that this book aims to be the next Bible for Flex, something long overdue for such a wide-ranging and complex ecosystem of technologies, and as such it will be fairly massive and very comprehensive. Some of the advanced topics to be covered in this book will be Cairngorm, LCDS & Blaze DS, Flex Video, Advanced Flash Integration, VM1/VM2 Communication, Application Optimization, PHP/Java/.Net Integration, Automation Framework, FlexUnit, Logging Framework, Stress Testing Framework.

All I can say is, THIS IS GOING TO BE SO FREAKING AWESOME!!!! (okay, so i’ve been spiking my own kool-aid, so what?) :)

We’ve already got a fair number of volunteers to help us beta test the code for the book so that it comes out squeaky clean, but if you’ve got an advanced understanding of ActionScript and/or Flex development, and you’re interested in becoming a “beta tester” or tech reviewer for the book, drop me a line at jbdesign - at - joeflash - dot - ca.

PS: the Amazon listing for this book is incorrect, of course — jumping the gun with a photoshop job of the last title so they can pre-pre-presell the book ;)

Business Tips For Freelancers

Posted in Business, Workflow by Joeflash on the March 18th, 2008

Recently I was asked for some advice from a developer on how to manage her first big client. Here’s what I told her:

  1. Take care of the business side of things before the work is done. Which means:
     
  2. No spec work, no freebies. If they like your portfolio and your references enough to hire you, you should get paid for all the work you do for them.
     
  3. Get something in writing about what your rate is, what you agree to do for them, and how much you charge, per hour or per project. That can mean a contract signed by both parties, or an email which both parties have confirmed.
     
  4. State in your contract/agreement when you expect to get paid, and in what format: 50% up front, the rest upon delivery, or 15, 30 days after? Billable weekly? (for longer projects, if charging an hourly rate) Bi-weekly? By cheque, credit card, interac email transfer? (my favourite)
     
  5. Charge more if the deadline is tight, which means high pressure, possibly requiring you to pull an allnighter or two. And if this is the case, tell them your rate is slightly higher for short deadlines. More stress for you means more money from them. As a rule of thumb.
     
  6. During the work, get their feedback a little more that you think you need to, but not so much that it encourages scope creep. Clients like to be involved in the process, but you need to know when enough communication has been had. Typically a check-in once per week if the project is a few months long, once every day or every few days if it’s got a crunch deadline attached to it.
     
  7. Try to never miss a deadline you’ve committed to.
     
  8. But shit happens. If you commit to a deadline, and you think you can miss it by a margin without breaking the project (or the client), advise the client well ahead of time, communicate. And offer them a discount on the final fee if it keeps them in your good graces. And then make your renegotiated deadline, no ifs ands or buts, or your word will mean nothing from then on.
     
  9. If you placed yourself in a corner, and you absolutely cannot end-of-the-freakin-world miss the deadline, and you don’t think you’ll make it, tough. Don’t sleep. Or you’ll never see that client again, and most likely your fee either. The trick is to never place yourself in that position in the first place.
     
  10. Don’t do it alone. If you encounter a problem, a technical issue you cannot solve, seek support from newsgroups, lists and friends. Because it will save your bacon one day, I guarantee you. But don’t expect a fast reply from lists and groups. And Google is your friend (like, duh.)
     
  11. Create a support group for yourself, composed of mentors, teachers, colleagues, people whom you have enrolled to help you with a quick email or IM now and then to save your bacon spur-of-the moment in a real tough spot.
     
  12. And when they do, thank them. Show gratitude. It’s all about relationships. Send them passes to a movie, or help them out in turn. Nobody likes a taker.
     
  13. Put together a deliverables document to be submitted when you hand over the project, or add these as line-items in your invoice (which should be simple but well-designed), which shows professionalism and attention to detail.
     
  14. If you’re required to put together documentation for the work, make sure you charge for the time it took to research and/or put it together.
     
  15. As a courtesy, only charge for phone calls or meetings if it’s a consultation type meeting, not a project briefing, and it goes longer than 1 hour.
     
  16. Develop lasting long-term relationships with your good clients. Send them a Christmas or Hanukkah card, and a thank you postcard (a real snail mail one!) after a successful project. It’s the little things that get you noticed, that get them to be return customers.

Flex Powertools: Explorers article on Community MX

Posted in Flex, Tools, Community MX, Flex Builder 2, Flex 3, Flex 2, Flex Builder 3 by Joeflash on the March 17th, 2008

I’ve a new article on Community MX entitled Flex Powertools: Explorers, in which I review over 20 of my favourite Flex 2 and 3 explorer utilities and resources, which includes component explorers, styling & skinning explorers and resources, visual effects explorers and benchmark explorers.

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.

CAUTION: PURE SPECULATION AHEAD :

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.