Archive

Archive for the ‘Flash development’ Category

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

May 28th, 2009 Randy 5 comments

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?

Categories: Flash development Tags:

Encryption and licensing with Nitro-LM

May 27th, 2009 Randy 2 comments

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.

Categories: Flash development, Flex development Tags:

FITC Edmonton 2009

May 8th, 2009 Randy No comments

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.

Categories: Flash development Tags:

Watching trace statements when running Flash content in the browser

April 2nd, 2009 Randy 2 comments

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.

Double click editable List component

January 26th, 2009 Randy 1 comment

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. }

Categories: Flash development Tags:

Scaleform GFx @ EFUG

December 16th, 2008 Randy No comments

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.

Categories: Flash development Tags:

E4X and namespaces

December 9th, 2008 Randy 1 comment

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.

Categories: Flash development, Flex development Tags:

Adobe Max 2008

November 29th, 2008 flickr No comments


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 more...

Categories: Flash development, Flex development Tags:

Mark Logic 4.0 Geospacial Range Demo

November 1st, 2008 Randy No comments

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

Categories: Flash development, Flex development Tags:

IO Errors and Flash TileList

October 24th, 2008 Randy No comments

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. }

Categories: Flash development Tags: