I woke up this morning...

and found the public beta of flash player 10 was out. How cool is that.

I knew this would be coming before too long, but didnt realize that it would be out so quickly. This new version is filled with lots of new features aimed at allowing greater "expressiveness" in flash player content, such as 3d effects, custom filters, enhanced text rendering, and revs to the drawing API. Of course, like each version before it, FP10 also has lots of performance enhancements. What are you waiting for go get it on adobe labs

I'm particularly looking forward to working with the Advanced Text Rendering features, which promise to allow lots of layout possibilities, including bi-directional text!

more later

My Speaking Engagements for the first half of 2008

1/18 - Flex Camp Chicago

1/24 - Flex Camp Omaha

2/24-2/27 - Flex 360 Atlanta

3/12-3/13 - CFUnited Europe

5/1-5/4 - CF.Objective()

5/19-5/23 - WebManiacs

6/25-6/28 - CFUnited

Reflecting an image in Flex

Increasingly, clients have been asking for a "reflection" effect, showing a vertically flipped image of a component next to the actual component.  After reinventing the wheel on this several times, I came up with this simple reusable component:

package com.tappernimer.components{
import mx.containers.Canvas;
import mx.core.UIComponent;
import flash.display.BitmapData;
import flash.geom.Matrix;
import flash.display.IBitmapDrawable;
public class VerticalReflection extends Canvas{
private var _component:UIComponent;
public var trans:Number=.5;
public var filterArray:Array=new Array();
public var skewY:Number=0;
public var skewX:Number=0;
public function get component():UIComponent{
return _component;
}
public function set component(c:UIComponent):void{
this._component = c;
// hack to work around issue with component being 
// a dynamically loaded image its possible for the 
// image to be fully loaded, but its height or width 
// not yet set this call later, keeps retrying until 
// the values are set.
if(c.width ==0 || c.height==0){
callLater(resetComponent,[c]);
return;
}
doReflection();
}
private function resetComponent(c:UIComponent):void{
this.component = c;
}
private function doReflection():void {
// create bitmap object
var bmpData:BitmapData = new BitmapData(
	component.width,component.height);
// create matrix
var invertMatrix:Matrix = new Matrix(1,skewY,skewX);
// set matrix to invert vertically, but normal horizontally
invertMatrix.scale(1, -1);
// move matrix, so top is at bottom, and vice versa
invertMatrix.translate(0, component.height);
// draw component flipped
bmpData.draw(component as IBitmapDrawable,invertMatrix);
// create a new holder for the image
var ref:UIComponent = new UIComponent();
// match new holders size to the original
ref.setActualSize(component.width,component.height);
// fill the new component with the image
ref.graphics.beginBitmapFill(bmpData);
ref.graphics.drawRect(0, 0, 
	component.width, component.height);
ref.graphics.endFill();
// set the transparency
ref.alpha = trans;
// apply any filters
ref.filters = filterArray;
// add image to stage
addChild(ref);
} 
}
}

This component can then be passed any other component to reflect, accepting filters (filterArray), alpha value (trans), and arguments to allow you to skew the reflection.  In fact, using it can be as simple as this:

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx=http://www.adobe.com/2006/mxml 
xmlns:c="com.tappernimer.components.*" 
layout="absolute">
<mx:Image id="image" source="images/tn_logo_full.jpg"/>
<c:VerticalReflection id="ref" 
component="{image}" 
x="{image.x}" y="{image.height}" 
filterArray="{new Array(new BlurFilter())}"/>
</mx:Application>
Here is the code running:
 
 

H.264 Support in FlashPlayer

I missed it yesterday, when it was announced, but Adobe has now announced support for H.264 (also know as MPEG4) in an upcoming version of the flash player.  H.264 is the same standard which is used by BluRay and HD-DVD -- the ability to have this type of video in our web applications is absolutly huge.  Remember, not that long ago, Adobe announced plans for the Adobe Media Player (AMP), as a desktop application which was built with AIR and Flash -- now, AMP will be able to use H.264 as well as FLV for its video content.

 

 

A Great big pile of public beta's from Adobe

Today, Adobe has released 3 new public beta's on Adobe Labs:   The Adobe Integrated Runtime (formerly known as Apollo) beta, the Flex 3 Beta, and the Flash Player Updater were all publicly released on Labs today.  I've been recovering from a failed hard drive all day (remind me to post a blog about the wonders of SpinRite 6.0 when i get a minute), but I'll post more about all 3 of these, as well as the ColdFusion 8 (Scorpio) beta released 2 weeks ago, when i get a few minutes.

Java Swing (re-)enters RIA space

It seems Sun is interested in re-gaining some of the market share it one had in the Rich Application space.  The annual JavaOne conference is underway, and there seems to be quite a bit of buzz surrounding the upcoming annoucement of the JavaFX project.  It seems that JavaFX is looking to compete directly with Microsoft's Silverlight and Adobe's Flex/Apollo initiatives, as developers will be able to target Desktop, Web and Mobile applications from this single platform.  Ultimately, it seems that this is largely going to be done by vastly simplifying Swing development, with the use of JavaFX as a declaritive programming model, on top of the existing Swing framework.

Ultimately, its good for everyone, developers and consumers alike to have more competition in the Rich Applicaiton space.  This will surely lead to greater innovations for applications, and more choices for developers.

You can find more on this at infoworld and infoq.

Max 2007 dates and locations announced

According to Matt Chotin's blog, the Max 07 dates and locations are as follows:

North America9/30/07-10/3/07McCormick Place West, Chicago
EuropeOctober 2007 Barcelona, Spain
Asia/PacificNovember 2007Japan

As an attendee of each of the Allaire / Macromedia / Adobe conferences since 2000, I have every confidence this event will be as good, if not better than the rest.  See you in Chicago!

 

Now Available - Flex Builder 2.0.1

Flex Builder 2.0.1 has now been released.   In addition to a myraid of bug fixes, there are a suprising number of new features available in this release, including  Macintosh support, support for runtime CSS (in the previous version, CSS styles sheets had to be compiled into the app, they can now be loaded and changed at run time), and most excitingly is the new Modules support, which allows an easier alternative to breaking up large applications into smaller components, and allowing components to be loaded into the app as they are needed.  One more feature slipped in is native support for the upcoming Apollo project.

Even though this release is numbered as if it were just a collection of minor bug fixes, this truly does represent a great step forward for Flex, and yet another very encouraging sign about Adobe's commitment to the Flash Player as the platform for Web 2.0 application development

 

Converting back and forth between Hexidecimal Strings and Numbers

Its really convenient for anyone coming from an HTML background that we can now provide colors to Flex using html standard syntax for hexidecimal number (#000000 = black, #ffffff= white, etc).  I've recently been building some tools to convert drawings in the flash player to and from SVG format.  SVG, like HTML, likes to specify hexidecimal numbers with a "#" prefix, but the flash player drawing API needs hexidecimal numbers to be prefixed with "0x"  To help migrate back and forth between hexStrings and AS numbers, I wrote a few static methods, which are working well for me:

package utils {
 public class Colors {
  public static function hexStringToNumber(hexStr:String):Number{
   if(hexStr.length != 7){
    return -1;
   }
   if(hexStr.charAt(0) != "#"){
    return -1;
   }
   var newStr:String = hexStr.substr(1,6);
   var numStr:String = "0x"+newStr;
   var num:Number = Number(numStr);
   return num;
  }
  public static function numToHexString(num:Number):String{
   var hexStr:String = num.toString(16);
   while(hexStr.length < 6){
    hexStr = "0"+hexStr;
   }
   hexStr = "#"+hexStr;
   return hexStr;
  }
 }
}

As you can see, there are 2 methods hexStringToNumber and numToHexString.  These can be used simply like this:

var whiteNum:Number = Colors.hexStringToNumber ("#ffffff");
var whiteStr:String = Colors.numToHexString(16777215);

 

 

More info available on Max 06

Browsing to the MAX 06 site, i found they have released more details, including a listing of the 8 tracks:

  • Adobe Collaboration Solutions
  • Adobe LiveCycle Technologies
  • eLearning
  • Mobile and Devices
  • Rich Internet Applications
  • Vertical Market Solutions
  • Web Design
  • Web Development

They even have listings of each session to be presented.  I've been asked to present the "Getting Started with Flex Development"  session, which is one of 25 Rich Internet Application sessions of the conference.  Anyhow, up to now, information about the conference has been few and far between, but fortunately, there is now a wealth of information available.

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.9.001.