YouTube as HTML5. The end of Flash dominance of video?

Google has posted a proof of concept showing YouTube using HTML 5.

http://www.youtube.com/html5

I was able to view this with Safari. You will note that there is no Flash on this page. Apparently the video tag uses system video resources so if you previously installed a h.264 codec, it should just work. The controls are all HTML. Does this mean the end to dominance of Flash delivered video on the web?

 

Encryption and licensing with Nitro-LM

I recently attended a 3-day “entrepreneur bootcamp” where angel investors taught how to pitch an idea to angel investors for investment capital. One of the first things they will want to know is how you protect your intellectual property. In the case of software, protection of algorithms is key and in the case of Flex your software secrets are protected from a right click “view source” since the application is contained within a compiled swf. Tools are available, however, that allow you to easily decompile the swf and look at the goodies inside.

Simplified Logic Inc has a product that uses a private key encryption method that stops decompilation of the swf. They also have developed a backend system that can manage licenses to your application. I have been developing a Flex application for use in teaching anatomy to students at the technical institute I work at. It has proven to be a powerful tool and there is opportunity to license this application to other institutions, but there is no infrastructure to do this. I have built a proof of concept using Nitro-LM to show that we can deploy this application on the web using a Software as a Service model without creating much of a deployment infrastructure on our end beyond what we already have in place.

The NitroAdmin AIR app is used to set up and manage the encryption and licenses. Videos and examples show how to integrate the system into your Flex app but I think they need to do a bit more work around this … perhaps a “wizard” or video that shows from start to finish the basic setup. It still took a bit of handholding to get me up and running (thanks Andrew). The proof of concept is doing its job of proving this works in a way that is unobtrusive to users. Now all that is left is the easy part: to build a business model around my application and then go out and sell it. That is someone else’s job.

Simplified Logic was a major sponsor of the recent 360 Flex conference in Indianapolis. I want to say thanks to them for supporting this event. It was a good one and I enjoyed the environs.

 

360 Flex Indy was outstanding

The conference in Indianapolis was fantastic and the sponge is full. Met so many fellow developers. Was accused of stalking Adobe employees, but I only said hi to Matt Chotin once. So much to experiment with. FlexUnit 4 is important. Degrafa looks compelling. Will definitely look into Axiis data visualization library. I am intrigued by Maté as a framework. OpenFlux … Yes!!!! ESRI has a new free mapping API … BAM. Lazy loading datagrid using cacheing and synchronization (props to Zach Pinter) … I need that. According to Jeff Tapper’s 7 golden rules of how not to code in Flex, I should have been fired 7 times. RSL’s! RSLs! RSLs! But my favorite session was by Doug McCune. He talked about stuff that re-inspired him as a developer.

This slide is about how Flex application development became a job, and nothing much more than that.

Doug McCune at 360flex Indy

Doug’s live demo on head tracking in Flash. He showed an application that can be used for “Safe Sexting”. You can do whatever you want on the video and your face will be tracked and blurred. Big laughs on this one.

IMG_0042

Doug had a unique take on how to push the concept of Augmented Reality. He gave himself boobs in this live demo.

IMG_0044

 

FITC Edmonton 2009

That’s right. FITC has announced that they are bringing their conference to Edmonton, Alberta, Canada on October 17-18, 2009. This is the city where Grant Skinner and Co. hail from and Grant has pulled in a lot of favours to get some GREAT speakers to come in for the event. It is also the city that I live in, and Grant has asked me to do a presentation as well. Edmonton has a very active Flash user base which is supported by Michael Graves’ great work with EFUG.I have it marked on my calendar already … it’s going to be a good one. I think he is going to bill this as one big mofo of an EFUG meeting.

 

Watching trace statements when running Flash content in the browser

As Flash and Flex applications get more complex the ability to watch trace statements while running the application in a browser is invaluable. This is how I do it (in OSX):

1) find your mm.cfg file. Mine is located here: ~username/mm.cfg (substitute "username" with your real username)

2) open it in a text editor and add these lines:

CODE:
  1. ErrorReportingEnable=1
  2. TraceOutputFileEnable=1
  3. MaxWarnings=0

3) open a terminal window and add this to your .profile file.

CODE:
  1. alias trace=tail\ -f\ "/Users/username/Library/Preferences/Macromedia/Flash\ Player/Logs/flashLog.txt"

To watch your browser throw trace statements, just open a terminal window and type "trace" and they will now appear in the terminal window.

 

Sorting XMLListCollection and case sensitivity

Consider this xml:

Actionscript:
  1. var myImageXML:XML =
  2.     <image>
  3.         <term text="New Term 498"/>
  4.         <term text="a new term 550"/>
  5.         <term text="a new term"/>
  6.         <term text="New Term 668"/>
  7.      </image>

You can create an xmlListCollection and then sort the collection based on the term text.

Actionscript:
  1. import mx.collections.SortField;
  2. import mx.collections.Sort;
  3.            
  4. var terms:XMLListCollection = new XMLListCollection(myImageXML..term);
  5. var sort:Sort = new Sort();
  6. var sortField:SortField = new SortField("@text");
  7. sort.fields = [sortField];
  8. terms.sort = sort;
  9. terms.refresh();

What threw me for a loop was the sort result (by term text value):

New Term 498
New Term 668
a new term
a new term 550

As it turns out the default value for the sort case insensitivity is false. To solve this, set the property in the SortField object:

Actionscript:
  1. sortField.caseInsensitive = true;

and the sort will happen as expected:

a new term
a new term 550
New Term 498
New Term 668

 

Double click editable List component

This code is a simple extention of the Flex List component to make a line item editable on double click, not single click which is the default behaviour.

 

Actionscript:
  1. package{
  2.     import mx.controls.List;   
  3.     import flash.events.MouseEvent;
  4.     import mx.events.ListEvent;
  5.  
  6.     public class DoubleClickList extends List{
  7.         public function DoubleClickList(){
  8.             super();
  9.             doubleClickEnabled = true;
  10.             addEventListener(MouseEvent.DOUBLE_CLICK, handleDoubleClick);
  11.             addEventListener(ListEvent.ITEM_EDIT_END, handleItemEditEnd);
  12.         }
  13.        
  14.        
  15.         protected function handleDoubleClick(p_evt:MouseEvent):void{
  16.             var isEventPrevented:Boolean = p_evt.isDefaultPrevented();
  17.             if(!p_evt.isDefaultPrevented()){
  18.                 editable = true;
  19.                 editedItemPosition = {columnIndex:0, rowIndex:selectedIndex};         
  20.             }
  21.         }
  22.         protected function handleItemEditEnd(p_evt:ListEvent):void{
  23.             editable = false;
  24.         }      
  25.     }
  26. }

 

Scaleform GFx @ EFUG

Last night's EFUG featured the technology from Scaleform. It was one of the best EFUG meetings yet.

Troy Dunniway (L.A.) and Matthew Dolye (Washington, DC) braved the cold weather to visit Edmonton to spend some time with GSkinner and BioWare. Troy, a game developer veteran, gave a rundown of the Scaleform product and how it is used to leverage swf files (vector graphics and logic) within console video games. Consoles have become extremely powerful and at the same time more complex to develop for. Games too are getting more and more complex and this has forced developers to rely on middleware to develop games that will work across platforms. Scaleform has targeted the 2D middleware integration stack and somehow reverse engineered the Flash Player so that 2D swf files can be rendered and executed within the 3D gaming worlds. Graphic overlay and menu development in these games has typically been an arduous task and never has it been vector based. With Scaleform game developers can leverage the Flash design world to take hud graphics (think Ironman) to the next level. A significant chunk of the Flash AS2 api (up to FP7 or so) is supported. ExternalInterface is also supported to allow roundtrip communication between game and swf. AS3 support is coming.

Matthew went on to demonstrate bringing swf content into Unreal Editor and hooking up the logic for a door key panel, as an example. It was really crazy seeing a futuristic semi-transparent display panel that, among other things, showed lived camera views (real-time audio/video) which you could back away from and walk around. The Unreal3 engine maps the swf in it's 3d space seamlessly. The antialiasing techniques ... unbelievable.

The Gskinner tie-in came next as Gskinner developers demonstrated a brand new component set they have developed for use with Scaleform. They also have created some JSFL-based workflow tools that ease the developments process since this GFx platform has it's own eccentricities. Since Gskinner developed GLIC (mCOM) and then the Flash V3 components, Scaleform picked the right group do build these components. The are highly optimized and easily skinnable.

It is no accident that the Scaleform guys took the time to demonstrate to the local Flash user group. They are looking to build a network of great Flash developers/designers since the demand for such a skill set in the gaming world is set to explode.

 

E4X and namespaces

Recently I struggled with trying to figure out why I could not traverse loaded XML data using E4X. In one case it was a RSS feed and in another it was Timed Text data. What these data sets have in common is that they declare name spaces. Consider this xml data:

XML:
  1. <tt aaa:lang="en" xmlns="http://www.w3.org/2006/04/ttaf1" xmlns:tts="http://www.w3.org/2006/04/ttaf1#styling" xmlns:aaa="http://www.w3.org/XML/1998/namespace">
  2.   <head>
  3.     <styling>
  4.       <style id="1" tts:textAlign="right"/>
  5.       <style id="2" tts:color="transparent"/>
  6.       <style id="3" style="2" tts:backgroundColor="white"/>
  7.       <style id="4" style="2 3" tts:fontSize="20"/>
  8.     </styling>
  9.   </head>
  10.   <body>
  11.     <div aaa:lang="en">
  12.       <p begin="00:00:00.25" dur="00:00:03.25">Dreamweaver users now have access to Flash video. Didn't have it before.</p>
  13.       <p begin="00:00:04.20" dur="00:00:03.07">And if you were to talk to a Dreamweaver user about three or four years ago</p>
  14.     </div>
  15.   </body>
  16. </tt>

I see that it declares a couple namespaces but I thought since the "p" nodes do not. This ...

Actionscript:
  1. trace(timedTextXML..p);

yields nothing. Yet this ...

Actionscript:
  1. if (timedTextXML.namespace("") != undefined){
  2.       default xml namespace = timedTextXML.namespace("");
  3. }
  4. trace(timedTextXML..p);

works fine.

 

Adobe Max 2008



It has been a little over a week since we got back from San Francisco and the MAX conference. It has taken me this long to surface for air after getting caught up from being away. Adobe announced a dizzying amount of updates and initiatives. Serge Jespers has a list of most of them here: http://www.webkitchen.be/2008/11/22/weekly-blend-the-max-edition/. Let's just say that it will be a while before I can digest all of this.

The picture above (taken by Charles Freedman) shows the massive display that was set up for the keynotes. I have never seen anything like it before. When I walked into the hall, Icky Thump by White Stripes was playing through the incredible sound system and I could feel the thumps on my chest. I had goosebumps.

All Access to MAX

Read the rest of this entry »