Union Platform : a multiuser environment with actionscript

While there are alternatives to actionscript for doing a multi-user application, Colin Mook and Derek Clayton had teamed up (to form User1.net) to do Union Platform. The platform itself provides alternative languages to develop application with, the most notable feature is one can create multi-user applications with actionscript only. Thats a lot of good news on itself. Well, even a sample server environment is free for 1000 users at one time! Huge! Its called “tryuion.com” and provides a testing ground to test your skills for a multiuser application.
The even bigger news is Union Platform is now on cloud in collaboration with Influxis and its at unioncloud.io. Union Cloud is free till its in Beta, so the time is now to build a multi user application with Union Cloud , the feature list looks awesome.
Happy Flashing

The Silver lining

Whoa! What am I listening! Can not believe, its true! All this leads to what? Just because someone somewhere said we are dropping down support for Flash in Mobile or other devices !! Or the other one, Flex SDK is going to be maintained by another foundation(spoon project)? Or the HTML framework (Phonegap) is going to live somewhere else !?

Its a long post, but still I could not write everything.
Continue reading “The Silver lining”

Geting started with Starling, running Flash in GPU.

With Flash player 11 comes Stage3D, which enables us to run Flash content in GPU. While its all good, coding for a simple task looks as if something real big.

Fortunately Starling-framework makes the life easier. Its a framework on top of Stage3D(codenamed Molehill). The best part of it is one can just use it as if using flash’s own API. It has movieclip, sprite, events and displaylist. While I was trying my first handson this framework, found some must to do things, which may save someone’s time.

Minimum requirement,

To run
1. First of all, it needs Flash Player 11.
2. It must be run inside a browser. Yeah, SWF must be embedded inside a HTML page.
3. Inside the embed code, “mode” must be set to “direct”.

<param name="wmode" value="direct">

4. Embeding the swf with SWFObjectdoes not work for me. So used the minimum default Object-embed method. To author 1. Need Flash Player 11 SDK 2. Overlap it on Flex SDK 4.5.1 , so that you got the compiler ready. 3. Compile with extra compiler argument as ” -swf-version=13 “.

The basic HTML boilerplate code to embed look as

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
        <meta name="google" value="notranslate">         
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="600" id="movie_name" align="middle">
    <param name="movie" value="Startup.swf"/>
    <param name="wmode" value="direct">
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="Startup.swf" width="600" height="600">
        <param name="wmode" value="direct">



Happy Flashing.

Encapsulation : How ? Its a Dynamic Class.

This is in continuation to the previous post, Encapsulation:Why? , I thought it makes sense if we talk about the same principles to apply in a dynamic class.
First thing first, what is a Dynamic class?! Well, for those who are from AS1 and AS2 days, its in the blood kind of thing. We create an object then add on some properties to it in the runtime. But AS3 seems to take that freedom out. Well, not really, there are still some dynamic classes out there in AS3. Our very basic MovieClip is still a dynamic class. That means, we can still create new properties and methods in it. While the Sprite class is not.
Any new class we make in AS3 is known to be something called as a Sealed class. These classes cannot be modified to have new properties or methods in runtime. Whatever propeties and methods are declared at compile time is only available at runtime. So how to make a dynamic class, its just to declare a class with dynamic keyword as

public dynamic class MyDynamicClass
instead of
public class MyDynamicClass

Well, thats cool and fine. But why I would make one? The question may be answered by the way one designs an application, chances are you never want to make one or may be you just need some. So its all kind of depends how you want to program your application. Now if we make a dynamic class and add some properties, then how to controll its getter and setter as we have discussed earlier about controlling for a sealed class.
There is a very nice utility available at flash.utils package. Its the Proxy class. This does exactly, the same thing as we are searching for. Its a class, which is never being used by its own. Never instantiated. The only way to use it is to subclass it. Go over to the documentation to see a complete overview of the class.
Now lets jump directly to the code and see how it works. Then we will go on details about what it does. I think that way we can relate things while talking.Β  My proxy class begins like
public dynamic class MyProxyObject extends Proxy

Continue reading “Encapsulation : How ? Its a Dynamic Class.”

Version control with Flashdevelop

This is probably the most awaited release of FlashDevelop. Now that completes a perfect IDE. The new version of FlashDevelop IDE has built in support for SVN and GIT both. Provided you have to have tortoise SVN and tortoise GIT in your machine. For SVN part, the IDE installer has made it available too by bundling SilkSVN with it. So installing tortoise SVN is just seems to be optional. Thats some kickass IDE feature. I have just tested it with SVN and GIT both and they work out of the box.

These version control systems are not activated by default. You have to go inside settings and activate them. Or else they do not seem to exist in the IDE.
Another nice integration is the option to select whether to install Flex SDK with the FlashDevelop. This is being asked when you install the IDE. That means, if you do not want to take the pain of downloading the FlexSDK separately it will do it for you.

Thats all for the time being, I am so excited and happy that finally this beautiful IDE added up the things which now makes it a perfect tool for flash a developer.

Happy Flashing πŸ™‚

Back from Adobe Flash Platform Summit

The meet is over and I must say, for me, it was a nice experience. It was the virtual media, the internet which allowed me to connect with so many people in past years. All the time I was thinking of meeting them in person and this meet allowed me to do that. Met with almost everyone I thought I will meet. But then missed some too.
Its the nexus, I was looking forward to and good that I made it.
The community is really vibrant and got inspired by a lot of nice talks.
Alvin (@zhangyb) delivered a talk on BCI ( Brain-Computer Interface ) with the demonstrations, on one of the demo, he changed the colour of an application with his thought.
Mrinal (@mrinal) was excellent with his explanations on the pixels, matrix and how they work on flash world. His demo comprised of effects like “genie effect” on Mac.
Arul (@_Arul) announced and demoed his new opensource framework, which will be available around next week.

Apart from the talks in the auditoriums, the most critical and influential talks happen outside and in very informal way. Glad to meet the never met before Vipin (ohh! people know him as @flashchemist πŸ™‚ ), Mark (@markadoherty), Arul (@_Arul), Mrinal (@mrinal), Abdul (@abdulqabiz), Mariam (@mariamdh), Hu Shunjie (@shinchi), Alvin Zhang (@zhangyb) and a lot many cool ones. Felt bad as I missed some too 😦 . For me it was the connection and glad that I made it to the meet.
One thing for sure, my avtar needs an update πŸ™‚ I have to go to people and an introduce myself as Saumya :), I think for the same reason a lot might have missed me too, sorry for that to all and specifically to Saurabh Mathur(@sawrb).
Overall, it was a good meet for me to get connected. If you think about sessions only, then think again, most exciting things happens outside of it. And the best part is all the cool ones are most social ones too. One can reach out to anyone and start discussing at anypoint. Good to have a community like this.

Happy Flashing πŸ™‚

Adobe is hosting a free Media Player

Playing media will never be simpler than this. Adobe recently lunched a hosted service for playing back your media files. This is called Flash Media Playback , basically a media player hosted at Adobe. It is based on the Open Source Media Framework (OSMF). The full feature list is here. This has got a web configuration here. The point here is, one can just upload a video somewhere in the web and in the configuration, point the source to the respective URL. All that remains is copy-paste the generated code and you are ready with a media player, to play your video content.
The opensource version of the player is known as Strobe Media Playback and this is hosted at sourceforge. For those, who like to host their own media player, can download this and host it in the personal preferred location.
I took a test by implementing the Flash Media Playback. It took 2 mins to integrate a hosted f4v file in my server with the Flash Media Playback.
Peter Elst has already put in a plugin for wordpress to use Flash Media Playback.

Happy Flashing πŸ™‚