Help Improve Flash 10.1 and AIR 2.0*

Okay- Adobe has a great chance to show the world how solid Flash Player and AIR engineering can be. Like any development or engineering team, they have limited resources and need help from the outside world to make these the best releases ever. Tired of “buggy” Flash and “lazy” engineers ruining your browsing experience?** Here are some things you can do to actually contribute instead of flaming Adobe:

  • Download and install Flash Player 10.1 Beta 2 and AIR 2.0 Beta 2
  • Test the new beta runtimes with your content and applications.
  • Log bugs at bugs.adobe.com. Engineering teams use your bug reports to reproduce errors and improve the runtime quality.
  • Tweet: “Improve Flash 10.1 & AIR 2.0 via Beta 2 http://bit.ly/cty7Nm READ & RT #Flash #AIR #QUALITY”

If you’re a developer, test your current applications. If you are a user, give the runtimes a spin and see if anything goes bad. We all have a great opportunity to contribute to the continued success of these two runtimes- let’s all put in some effort and make a difference!

* This is a response to Ted Patrick’s post.
** I do not believe that Flash Player is buggy or that Adobe engineers are at all lazy.

Tagged with:
 

Just To Put Things In Perspective…

Ever since Apple announced their new iPad, I’ve been reading a whole lot about how HTML5 will replace (I believe “kill” is the preferred term) Flash. Most arguments state that the emerging HTML5 spec includes such things as <canvas> and <video> which effectively renders the need for Flash a thing of the past… seriously? I wonder when the last time these commentators have read up on the vast capabilities of the platform; Flash is much more than any simple animation and video playback mechanism as these people seem to believe it to be.

I did a little research. HTML5 has the following new features (proposed, mind you) that share some similarity with what Flash can do:

Audio Playback -> Flash 4 [1999]
Video Playback -> Flash MX [2002]
Canvas (2D Drawing) -> Flash 1 [1996](Timeline) / Flash MX [2002](API)
Offline Storage -> Flash MX [2002] (Local Shared Objects)

So… far as I can tell, HTML5 will share some capabilities with Flash MX circa 2002.

Understand that I’m not trying to in any way bash HTML5 here. I remember when I was first learning HTML and the frustration I had upon the realization that there was no video or audio tag to simply playback a piece of media. I welcome such innovations and truly hope that after the video codec battle and other disputes are over that we have a truly ubiquitous solution for marking up text and media content for the Web.

In fact, I do a lot of development in HTML/CSS/JavaScript currently and would love to be able to use some of the innovations presented in the HTML5 spec along with some of the CSS3 elements I’m adding into my work. Yeah, my main deal is Flash/Flex/AIR – but that’s the thing; these technologies work well together; they complement/complete one another. It would be absurd for me to state that I want HTML to “die” — just as absurd as it is for others to say the same regarding Flash.

So I have no opposition whatsoever for HTML to evolve and mature as the Web itself grows richer in data and presentation- but Flash is not HTML and HTML is not Flash. I know this is nothing new to a lot of you but apparently a lot of others have trouble with this concept. For a simple example: Flash has some trouble rendering any HTML but for the simplest tags. Do I fault Flash for this? No! HTML for years has not been able to render native video or provide any of the rich application experiences that the Flash Platform enables. Do I fault HTML for this? Equally, no! The purpose of Flash is not to render or replace HTML in what it does best and the purpose of HTML5 should not be to replace Flash in all that it is capable of.

Let’s look some basic facts. HTML 4.01 was finalized and published in December of 1999. At this time, Flash was at version 4 which included the capability to do much of what is now proposed in draft form for HTML5. When will HTML5 be finalized? The editor of HTML5 specification, Ian Hickson of Google, outlines the timeline as such:

  • First W3C Working Draft in October 2007.
  • Last Call Working Draft in October 2009.
  • Call for contributions for the test suite in 2011.
  • Candidate Recommendation in 2012.
  • First draft of test suite in 2012.
  • Second draft of test suite in 2015.
  • Final version of test suite in 2019.
  • Reissued Last Call Working Draft in 2020.
  • Proposed Recommendation in 2022.

2022. I kid you not.

Granted, much of the spec is considered stable and certain items can be used in web browsers today. Just as with the browser wars of the late 1990’s there are many different interpretations and implementations of the specs with multiple vendors all vying for their specific interpretation to emerge as dominant. History does repeat itself, doesn’t it?

Think on this… if HTML5 is going to be a work in progress until 2022… where will Flash, Sliverlight, Unity, and others be at this time? Given the present release cycle for Flash Player, one could assume that 2022 will see the release of Flash Player 17 or so, if Flash is even still a viable platform at that time.

Food for thought.

Tagged with:
 

HTML5 and the Flash Platform – A Call for Sanity

A strange thing has been happening over the past year or so. It has become quite fashionable amoung open source advocates, social media “experts”, and HTML5 zealots to talk down Flash with every breath…

Well, that was the start of an article I’ve been writing for the past three weeks or so. It was a difficult article to write and I’ve been stuck on more than one occasion – causing some frustration for me. There’s no need for me to do so now as similar thoughts have been expressed elsewhere with more grace than I would have allowed and a more informed perspective.

I encourage anyone who is interested in the subject to read the following posts and the comments that come along with them:

My general take is this; Flash and HTML are not in any way enemies or opposed to one another. Both can serve very different purposes and both are useful in many different (and sometimes similar!) circumstances. It is ridiculous to go after Flash as it it is the worst thing to ever happen to the Internet and needs to “die” – as many have stated.

Am I biased? Hell, yes! I love working with the Flash Platform for many reasons and am heavily affiliated with Adobe. Do I hate HTML5 or any other tech due to my bias? Hell, No.

There is true evil in the world and it is not Flash, Silverlight, JavaFX, HTML5 or any other technology platform.

A call for sanity – everyone just chill out. It’ll be okay :)


UPDATE 1: In regard to Apple and iPad; Serge Jespers has a nice post, of which I’ve made comments on.

UPDATE 2: Okay, I give in – “Just To Put Things In Perspective…

Tagged with:
 

Ghetto Greenscreen

I built a greenscreen for chroma keying video/photos in my studio for about 5 dollars. Grabbed about six sheets of neon-green poster board from a local store and used some other bits I had lying around; easel, cardboard, non-reflective tape, staple gun, duct tape…

You can see the result below! Admittedly ghetto… but for my current purposes, it will work just fine. You can see the seams in the photo but this isn’t a big deal as depth of field and After Effects can both be used to get around something like that. It’s large enough that I can place it a few feet behind the subject without issue, so blurring it with depth of field in the camera is probably a good option. You can see here that it’s pretty evenly lit without any special lighting- though I do have some lights to be used in case they are needed.

As a test, I grabbed this rabbit and snapped a quick photo.

After a few seconds of keying in After Effects – Parisian Rabbit.

Tagged with:
 

Parsing Tweets with the TwitterString Class

While building a little Twitter aggregator for an upcoming conference, I found myself in need of a set of methods to create hyperlinks from three distinct elements that can be included within a tweet; links, usernames, and hashtags.

I was able to find regular expressions to do all the heavy lifting from various sources on the Web and have created a class which pretty much does all the processing with one method call. Here’s an example of the thing working, followed by example code, and the class itself.

Example SWF

This movie requires Flash Player 8


Example MXML

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/mx" 
			   creationComplete="init()" width="300" height="100" 
			   backgroundColor="#1E1E1E" preloaderBaseColor="#989898">
 
	<fx:Script>
		<![CDATA[
			import flashx.textLayout.elements.Configuration;
			import flashx.textLayout.elements.TextFlow;
			import flashx.textLayout.conversion.TextConverter;
			import flashx.textLayout.formats.TextLayoutFormat;
			import com.fracturedvisionmedia.utils.TwitterString;
 
			private var myTxt:String = "Everyone should follow @josephlabrecque (http://bit.ly/7NkqrB) - really cool stuff and super-informative insights! #Awesome #Super #LOL";
 
			private function init():void {
				// Configure styling the TextFlow links to match richTxt
				var cfg:Configuration = TextFlow.defaultConfiguration;
				var normalTLF:TextLayoutFormat = new TextLayoutFormat(cfg.defaultLinkNormalFormat);
				normalTLF.color = 0xDCD9D9;
				cfg.defaultLinkNormalFormat = normalTLF;
				TextFlow.defaultConfiguration = cfg;
 
				// Import tweet as HTML
				richTxt.textFlow = TextConverter.importToFlow(TwitterString.instance.parseTweet(myTxt), TextConverter.TEXT_FIELD_HTML_FORMAT);
			}
		]]>
	</fx:Script>
 
	<s:RichEditableText id="richTxt" selectable="false" editable="false" right="10" top="10" bottom="10" color="#DCD9D9" left="10"/>
 
</s:Application>

TwitterString Class

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.fracturedvisionmedia.utils {
 
	/**
	 * The TwitterString class assists with the parsing of a tweet to add hyperlinks 
	 * around Links, HashTags, and UserNames in a tweet.
	 * @author Joseph Labrecque
	 * v. 0.1.2
	 */ 
 
	public final class TwitterString {
		private static var _instance:TwitterString = new TwitterString();
 
		public function TwitterString(){
			if (_instance != null){
				throw new Error("TwitterString can only be accessed through TwitterString.instance");
			}
		}
 
		public static function get instance():TwitterString {
			return _instance;
		}
 
		public function parseTweet(t:String):String {
			var step1:String = parseHyperlinks(t);
			var step2:String = parseUsernames(step1)
			var step3:String = parseHashtags(step2)
			return step3;
		}
 
		private function parseUsernames(t:String):String {
			var result:String = t.replace(/(^|\s)#(\w+)/g, "$1#<a href='http://search.twitter.com/search?q=$2' target='_blank'>$2</a>");
			return result;
		}
 
		private function parseHashtags(t:String):String {
			var result:String = t.replace(/(^|\s)@(\w+)/g, "$1@<a href='http://www.twitter.com/$2' target='_blank'>$2</a>");
			return result;
		}
 
		private function parseHyperlinks(t:String):String {
			var urlPattern:RegExp = new RegExp("(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)", "g")
			var result:String = t.replace(urlPattern, "<a href='$1' target='_blank'>$1</a>");
			return result;
		}
 
	}
}

Download TwitterString

Tagged with: