Created by Randy

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 »

 

Mark Logic 4.0 Geospacial Range Demo

Mark Logic tells me that anyone who cares about free text analytics will be very interested in this visualization, because it previously was not available in any product. The keyword here being Real-Time. A geospatial analysis of documents returned from a free text search, plotted in arbitrary geographic bounding boxes, calculated in real-time. No other product can do this is real-time. Try out the demo..

When the initial heatmap is displayed you can hold the ctrl/cmd button down and either click on a "bucket" or click-drag to zoom in on an area and have new buckets calculated.

This widget was part of the recent MarkLogic Server 4.0 release.

My role was that of Flex developer of the map visualization. Craig Schlegelmilch directed the project and wrote the middleware integration using Xquery. Owen Brierley wrote the javascript (html controls are continually updated with search results). Tanya Camp provided graphic design consultation. Craig and Tanya form the dynamic company Bucketduck Inc. and the overall project is a production of GystWorks.

Mark Logic 4.0 Geospacial Range Demo

 

CBC Radio 2 has new life.

I have listened to CBC Radio 2 in the morning for a long time. Tom Allen is teh(sic) awesome. This fall CBC really shook things up and changed the format of Radio 2 Morning and Radio 2 Drive. LOVE IT LOVE IT LOVE IT. Were Tom Allen and Rich Terfry separated at birth? There is definitely some overlap between their shows but it seems to me that Rich sticks to more recent fare. Hey Tom. 70's era Stampeders and King of the Road ... er ... doesn't really turn my crank. But hey, those are just a few bumps. Wait! Hold the click publish button! I googled Rich Terfry to get the spelling of his name and I discovered he is Buck 65. I DIDN'T KNOW! (I didn't know). Explains a few things ... especially the comment that he was not used to a regular paycheque. His interviews are stellar especially the one he did a few weeks ago with Beck. Rich stated that a recent Radiohead concert was the best concert experience of his life and followed this bombshell up with some Weird Fishes.

Rich, you mentioned that once you turned down a chance to meet Neil Young because you didn't know what you would say. I think you should have met him just to say "Old man, look at my life. I'm a lot like you were."

 

IO Errors and Flash TileList

I am developing a custom video player for a client and I am using the Flash CS3 TileList component which loads thumbnails from a CDN. Sometimes the URL fails resulting in a runtime error and a dialogue thrown up by the Flash Player (if you have the debug version installed):

Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found.

Only a tiny number of viewers will have the debug version installed and will not see this error, but those people count because they will be my colleagues and fellow flash developers and they will judge me harshly as a result. Oh yes. I really dislike it when other websites (like my blog ;) cause the Flash Player to throw up runtime errors, sometimes crashing my browser.

All you need to do add an event handler to catch the IO Event. But in this case it is not incredibly obvious where to add the event listener. Many thanks to Lanny McNie for pointing out how I can extend the TileList Class and add the event handler to the "activeCellRenderers".  Change the linkage to the TileList component in the library to point to your new class and you should be good to go.

Actionscript:
  1. package com.channelflip.video.control{
  2.    import fl.controls.TileList;
  3.    import flash.events.IOErrorEvent;
  4.  
  5.    public class VideoTileList extends TileList{
  6.       public function VideoTileList(){
  7.          super();
  8.       }
  9.       override protected function drawList():void{
  10.          super.drawList();
  11.          var length:Number = activeCellRenderers.length;
  12.          for (var index:Number=0; index
  13.             activeCellRenderers[index].addEventListener(IOErrorEvent.IO_ERROR, handleIOError, false, 0, true);
  14.          }
  15.       }
  16.       protected function handleIOError(p_evt:IOErrorEvent):void{
  17.          trace("caught IO Error: " + p_evt);
  18.  
  19.       }
  20.  
  21.    }
  22. }

 

Pan, Zoom and Gtween

Recently I had a Flash problem to solve where the content needed to pan and zoom in one smooth motion to the point where a user clicked. The technique was a little tougher to figure out than I originally thought but I got it down to essentially three lines (using Grant Skinner's gTween).

The source FLA is available here. Below is a code snippet that assumes you are panning to center and zoom to 400%:

Actionscript:
  1. var xStop:Number = base.x  + ((stage.stageWidth/2)*4 - (mouseX*4));
  2. var yStop:Number = base.y  + ((stage.stageHeight/2)*4 - (mouseY*4));
  3. var gTween:GTween = new GTween(base,.5,{y:yStop, x:xStop, scaleX:4, scaleY:4},{ease:Circular.easeOut});

Example: click on the blue circles to zoom in and anywhere around the circles to zoom out.


 

Soccer ftw

I play on a team in a recreational men's masters soccer league. We played in the season end tournament semi-finals against a really tough opponent. We were down 4-2 in the second half and came to tie the game. Extra time. Penalty kicks. Due to a bad back I have not played much and was a sub for this game. The penalty kicks go on and on until almost all the players have taken one and it is my turn.

I am a striker. I have a hard and accurate shot. I know how to kick the ball and can do it with either foot.  This is a moment you dream about since a kid practicing penalty kicks. 100 people watching, team chanting my name. If I put this ball in, the game is over and we win. I walk up to the ref and he gives me the ball to put down. He is very particular about where and how it is placed and it takes a moment to get it right. I take a few strides back, wait for the whistle and begin my approach to hammer it home. I am stiff and cold and I get away a semi hard shot more or less right at the goalie. I walk away. Boy I screwed that up. Why didn't I use my left foot? Why didn't I do a power shot? Why didn't I try to place it? Arg. A lot of guys missed. So did the next guy. But not defenceman Al after that. We won. Below is a pic of me taking the shot. Next week is the finals.

Kodiak FC semi finals

 

ExternalInterface.call() and IE7

Recently I came across a problem with a swf that was failing to get a value from a form in the HTML wrapper using IE7 while it worked as intended in Safari and FireFox. Adobe's AC javascript embed code (no object or embed tags) is used in the HTML wrapper and ExernalInterface.call() is used in the swf (AS3). The fix was to ensure the id attribute in the embed code was set to a different value than the src and name attributes. Thanks to Adobe Live Docs for clues that saved hours of hair pulling.

 

iPhone 3G

The iPhone is a story that has a few facets.

First there was getting a phone. In Canada we had to wait a year and a few days after the July 11, 2008 launch I phone Rogers and ordered one. Two days later it arrived. I plugged it into my mac, agreed to a few things and let is sync. VERY seamless and easy to set up and use. Rogers service was very good (aside from a few glitches in the billing which they politely fixed).

Second the phone itself. It is amazing. The functionality and features. FINALLY I have a phone that will sync seamlessly with my Mac address book.

Thirdly the app store. I am taking the perspective of a software developer who is approved for the iPhone Developer Program and has plans on building and selling iPhone applications. What they have created with the app store is revolutionary and awesome. Apple has put power to the developers. Thanks Apple.

Here is a link to a designer behind the New York Times application: http://www.drawger.com/felixsockwell/?section=comments&article_id=5804