I am pretty thrill to announce that I will be speaking in Adobe Flash Platform Summit 2010 in the coming August at Bangalore, India! The topic I will be covering will be “Real Time Web in Flash Player 10.1″ . I hope to cover a range of items in the talk including RTMFP, as well as to cover some other useful techniques that using PubSubHubbub + Socket to deliver real time information to clients built on the Flash Platform. Looking at the things I ‘hope’ to cover, 45 minutes is definitely not enough, so I will be doing some filtering and make sure that I can stuff as much goodies into the talk as possible. Friends like Alvin Zhan and Peter Elst will be there as well, so it will be an exciting conference!
About Adobe Flash Platform Summit
Adobe DevSummit was launched in 2008 as the flagship Adobe Flash Platform conference in India. With the objective of spreading the goodness of Adobe Flash Platform to the community in India, showcasing innovations, and sharing the future directions for the platform, Adobe DevSummit has established itself as the numero uno conference for product users and enthusiasts alike. Now, in its third year, Adobe is reaching out to the sub-continent’s developers and designers with a much larger Adobe Flash Platform Summit (AFPS) brand that will feature a convergence of over 2000 designers and developers.
Last year when I was in Seoul in got the chance to chat with Jason Calacanis, whom I told him about The Actionscript Conference. When I told him that it is still small, he told me “give it a few years”. His words bring me far and I am determined to turn TAC into one of the biggest Flash and Flex conference in South East Asia.
This year, TAC will be held on the 14th and 15th September, in the 550 seater of NTUC auditorium at One Marina Boulevard. For many attendees, it simply means crossing the road of Shenton way from their office to the venue. 2 Full days means we are invite more speakers, more topics and give you the updates and knowledge of Flex, Flash and Flash Player, and AIR that you are craving for.
I am proud to announced that ticketing is now opened. So register now!
LABSchool, a Adobe Authorized Training Center, revealed their Adobe Flex 3 training course during RIAction. LABSchool, backed by Stefano Virgillli, the brainchild behind Creativecrew and UltimateFX, has put up possibility the first Flex training course in Singapore. The course will span over 3 days and will bring the trainees from beginners to intemediate level in Flex.
Thanks LABSchool for finally giving us a Flex course in Singapore!
It has been a great week at MAX ‘08, providing great experience for me and looking at all the new technology Adobe has to offer. Love the Keynote, Sneak Peaks, Great People and the excellent MAX Party!
Developer Point of View Particularly interesting to me, in order of interest is Alchemy - C and C++ codes for Flash, Cocomo, ability to have P2P video in Flash, Flex 4 Gumbo and Server Side Actionscript, and Flash Catalyst (formly Thermo)
With Alchemy, it simply means the ceiling is now higher for us the developers. Anything is now possible now on the client side and developers will have to at least have an overview of how it works in order to be able to utilize the wide array of libraries existed nowadays and incorporate them in their client. Website owners should seriously look into this piece of technology to see how they can use Alchemy to create new experiences for their users. Using Alchemy, you can achieve things that are never possible in Flash (like the Quake demo in MAX ) and thus it also give rise to new business opportunities. I will be spending the next few weeks to dive deep into Alchemy and will post up some experiments I have here.
Cocomo is SaaS from a Social Networking point of view. Tied closely to Acrobat.com, it allows developers to tap into existing components in Acrobat.com, like video chat capability and real time file sharing, and use them in their own application. It is definitely a welcoming for us developers as it gives us another option to create RIA without installing our own infrastructure.
Flex 4 , as most people might already know, will have better skinning workflow, better performance, separation between component business logic and UI elements, support of shapes and graphics in MXML (like degrafa). It also introduce a own new set of components extended from the FxComponent (like UIComponent in Flex 3), 2 way binding, and the feature that makes everyone claps - a “layer” property in the component that defines the depth rather than the childIndex! All these in a new MXML 2009 namespace
And of course, Flash Catalyst (Fc), formerly Thermo, is also heavily showcased during the event. Fc allow designers to create their graphics in Photoshop or Illustrator, export them in a format FXG, and continue to work in Fc, and effectively saving the files as MXML into a Flex project! While I personally do not think Fc take off quickly as a tool of dictating the entire site UI (remember the Dreamweaver symdrome? ), but I do believe it will become real popular for developers in terms of component skinning. As Ryan Stewart demoed in MAX, with just a few click, it will skin a component like scrollbar automatically, which is a huge step from Flex 3.
Community Manager Point of View
MAX provides a lot of opportunities for User group managers (UGM) to network with other User group managers and Adobe’s community managers . This time, Adobe launches Adobe Group, which FUG is part of it!. Flex Camp is also now officially Flash Camp. It is very encouraging that Adobe is pushing for the community than ever before, providing us the UGM with valuable resources and directly support.
I also meet up with the UGM from Hong Kong, Taiwan and Seoul. Try to spot us in the photo below.
It is great when we start to see people from SEA and who knows, we might start seeing some asia speakers for MAX in the future!
Overall
Its been a great 3 days at MAX and an even better week in San Francisco. Now there is lots of new technologies to play, with the bar rise much higher than before! Work hard developers!
Lastly, not related to MAX, but hey I am on Seesmix!!!
The Problem
For many developers, this can be a no-brainer problem to start with. Most (if not all ) mashups uses videos from YouTube. There are tons of resources online that teach us how to “scrap” the FLV of youtube videos so we can play it in our own applications.
Going a few months back, YouTube had already released the chromeless player , a plain player without controls for playing youtube videos. However, there is no immediately “need” for developers to change their player to suit the chromeless player. Afterall, “if it ain’t broken, don’t fix it”. Last week however, YouYube removed some parameters in their APIs calls, effectively making some “scrapping” process not working. There are still some workarounds to get the FLV of their videos, but even if developers can “hack” to make it work, it is still against YouTube TOS. For many developers, the most straight forward solution is, well, use the chromeless player.
Chromeless Player is made in AS2 but I code in AS3
Now that the solution is pointing to Chromless Player, with the coherent and straightforward YouTube documentations, developers can easily fit the Chromeless Player into their application. For AS2 developers, it is a task of merely loading the SWF and passing commands to it. For AS3 developers, the problem arise as AS3 swfs cannot communicate with AS2 swfs directly. Thus, AS3 developers can load the Chromeless Player, but they cannot effectively communicate with it to get the play time, stop the video, pause the video etc.
AS2 Wrapper , LocalConnection to AS3
After searching around on google, many are facing this problem and the solution points down to using localconnection. Matthew Encinas posted this solution here, which works great. It involves creating an AS2 wrapper, which connects to a localconnection instance. The AS3 wrapper then load the AS2 wrapper, which in turns loads the Chromeless Player. To make things easier to understand, I have created a diagram below:
Help! LocalConnection naming problem!
The problem with this approach is that you are using a fixed localconnection name for your swf. If your player is a video player, which can have multiple instances at the same time, you will receive an error that the localconnection is already in used. To solve this problem, append something like ?key= when loading the AS2 Wrapper, and using that to name your localconnection name
Sample Classes
Modifying Matthew’s code, with the localconnection fix gives us the following 2 piece of codes:
AS2 Codes (the youtubewrapper.swf)
System.security.allowDomain('www.youtube.com');
System.security.allowDomain('gdata.youtube.com');
System.security.allowInsecureDomain('gdata.youtube.com');
System.security.allowInsecureDomain('www.youtube.com');
var loadInterval:Number;
var ytplayer:MovieClip = this.createEmptyMovieClip("ytplayer",
this.getNextHighestDepth());
varkey = _root.key;
var swf:String = "http://www.youtube.com/apiplayer";
//This created a connection for AS3 to talk to itvar _as3_to_as2:LocalConnection = newLocalConnection();
_as3_to_as2.connect("AS3_to_AS2_" + key);
//This is to connect to a connection started by the AS3 filevar _as2_to_as3:LocalConnection = newLocalConnection();
ytPlayerLoaderListener = {};
ytPlayerLoaderListener.onLoadInit = function(){
loadInterval = setInterval(checkPlayerLoaded, 250);
}function checkPlayerLoaded():Void{if(ytplayer.isPlayerLoaded()){//Let the AS3 file know that the player is loaded// the function onSwfLoadComplete exists within the AS3 file
_as2_to_as3.send("AS2_to_AS3_" + key, "onSwfLoadComplete");
clearInterval(loadInterval); // IMPORTANT - kill the interval
ytplayer.addEventListener("onStateChange", onPlayerStateChange);
ytplayer.addEventListener("onError", onPlayerError);
}}function onPlayerStateChange(newState:Number){// Possible values are unstarted (-1), ended (0), playing (1), paused (2), buffering (3), video cued (5)
_as2_to_as3.send("AS2_to_AS3_" + key, "onPlayerStateChange", newState);
switch(newState){case-1:
case"unstarted":
break;
case0:
case"ended":
clearInterval(playInt)break;
case1:
case"playing":
playInt = setInterval(onPlay, 1000)break;
case2:
case"paused":
breakcase3:
case"buffering":
clearInterval(playInt)breakcase5:
case"video cued":
break;
}}function sendCurrentTime():Void{var current = ytplayer.getCurrentTime()varduration = ytplayer.getDuration()
_as2_to_as3.send("AS2_to_AS3_" + key, "onDuration", current, duration);
}function onPlay(){
sendCurrentTime();
}function onPlayerError(errorCode:Number){//do something on player error}var ytPlayerLoader:MovieClipLoader = newMovieClipLoader();
ytPlayerLoader.addListener(ytPlayerLoaderListener);
ytPlayerLoader.loadClip(swf, ytplayer);
//////// CREATE EVENT HANDLERS// These functions can be called from within the AS3 file// This is the window where AS3 will access the API// You can add any of the Javascript Api here
_as3_to_as2.pauseVideo = function(){
ytplayer.pauseVideo();
};
_as3_to_as2.playVideo = function(){
ytplayer.playVideo();
};
_as3_to_as2.stopVideo = function(){
ytplayer.stopVideo();
};
_as3_to_as2.loadVideoById = function(id){
ytplayer.loadVideoById(id, 0);
};
//setSize(width:Number, height:Number):Void
_as3_to_as2.setSize = function(swidth:Number, sheight:Number):Void{
ytplayer.setSize(swidth, sheight)}
_as3_to_as2.cueVideoById = function(video_id:String, second:Number):Void{
ytplayer.cueVideoById(video_id, second)}function doDispatchEvent (){}
I am so thrill when I see this video! Lee Brimelow blow us away with this video he made himself with a Canon HV20, Premiere CS4 and of course his wonderful editing skills.