Sunday, April 29, 2012

Thanx for 1500 visits

It is nice to see almost 1500 viewers have seen your posts. That encourages to post more on similar subjects. Thank you everyone who has sent me there comments via mails, calls, sms, etc.


I will be adding more posts on the similar subjects and some other subjects too. Wish me a Luck!

I would like to recieve your comments or suggestions on my future posts. Please do share your thoughts.

Thank You. :)

Monday, April 23, 2012

India Gate- Amar Jawan

I always had a dream to visit the India Gate. Its not just a place of attraction, its a place which reminds us that we are safe because of "Jawans" at border. Securing us Day and Night, in Cold and Hot, at High Points and at Low Points, on Ice-Rocks and on Sea. Wherever they are, they always do their great job.

India Gate
India Gate - took a time to capture this long shot

India Gate
India Gate - closer view

Amar Jawan
Amar Jawan

Sunday, April 22, 2012

Flash vs. HTML5

In recent few months we have heard lots of nonsense about Flash vs. HTML5 fight. Apple is opposing Flash to run on their iOS platforms like iPhone, IPad, etc. Even 'Steve Jobs' has criticized Flash in his open letter on Apple website. The facts are really different than the picture being created.

Let us see some facts which will focus on the points which describes that the war is nonsense and just to make an attention towards the HTML5.
 

Who is controlling?

Flash Platform
Adobe Systems
 

HTML5
WHATWG” Committee made up by Opera Software, Mozilla Foundation and Apple.

 Here we have to make a note that Apple is one of the controllers of HTML5. We all know that Apple has history of dominating over its own hardware and software. They do not allow anyone to play with their hardware and software. Whereas; Flash has its own development environment, which will affect iPhone development by Apple, if Flash is allowed on iPhone. It could compete with the iTunes store for different media distributed by Apple. This makes a large difference in Flash and HTML5.


Most Selling fact for HTML5

Video

Yes video. Video delivery through web is the most selling fact behind HTML5. 'Steve Jobs' has mentioned that “Flash is not necessary to watch video over the web”.
Definitely, HTML5 supports basic video players. But, if you want advanced video players which have streaming or interactive features with video effects then? Then you have to choose Flash or some other technology.

HTML

Another thing which is being described by various columnists is, “You cannot develop website in Flash completely, and it will require HTML to run on web”. That’s why HTML5 is best for web.
True, if HTML is required to run the Flash over web then why not HTML5. But the fact is both Flash and HTML5 require other language support to run the video or interactive content over the web, such as; Javascript. So, none of them are independent.



SWF is not allowed in HTML5?
As far as I know, you can still use embed tag in HTML5. If embed tag is there then why to worry? You can embed swf. Check “HTML5 fundamentals, Part 1: Getting your feet wet”.

So you don’t need to develop your videos and interactive elements in different environments for HTML5 you can still use Flash in it.



Adobe is Opposing HTML5?
I don’t think so! Adobe has developed Adobe Edge for creating animated web content using HTML5, CSS3 and JavaScript. This will add Motion and Interaction Design with ease for HTML5.

Adobe has already declared that they will aggressively contribute to HTML5. Read: Flash to Focus on PC Browsing and Mobile Apps; Adobe to More Aggressively Contribute to HTML5


Flash requires Latest Browser and Flash Players
Flash develop its Flash Player and upgrades its technology for better user experience. It usually requires latest player for the same. Developers always need a better result from Flash because of high demand from clients regarding vector graphics and video. And hence, it requires always a latest browser and Flash Player.

Yes this is ridicules to always keep on updating the player and browser.

So, do you think HTML5 will not require any browser upgrade? Will it run on IE7 / IE8?

No. it will also require upgrades in its browser technology as HTML5 is emerging technology. Most of the browsers are still not compatible with it. Even Safari by Apple, on Windows platform fails to run HTML5 videos.


So there does not seem any fight. Both can be used for better user experience and no one will lose the race.



Sources:





6.       Adobe Labs: http://labs.adobe.com/technologies/edge/





Saturday, April 14, 2012

AS3.0 Adding Double Click Event

“Double clicking” I felt is quiet difficult in AS2. We had to add timer event and then, in that time interval had to click on the object. As a developer this was really brain teasing game as we had to decide what time should be given.

Now in AS3 it has got something easy and we don’t have to care about what time. It’s already defined somewhere for us and we just have add event of double clicking.


Lets create a button first. We can use movie clip for events so with text “Play” we will create it on the stage at required place for instance we will assume it as Frame One on timeline. Name it as “Play_btn”. Add a layer above it and add
stop(); action.


Add another frame to timeline by pressing “F7”. On this frame we will add our animation. Create an animation whatever you like; motion tween, shape tween etc.


Now our scripting part starts;

Select the button movie clip “Play_btn”.

Add an instance name “DCButton(Double Click Button) to it.

Now we have to enable double click event for our button. So let’s add following script;


DCButton.doubleClickEnabled = true;

This enables the double click action for that button instance.

 Next step is adding an event listener which will enable flash to call the function on double click event.


DCButton.addEventListener( MouseEvent.DOUBLE_CLICK, playAnim );

Here “playAnim” is the name of function which will be called to play the animation from next frame.


Let’s add a function;


function playAnim(e:MouseEvent):void
{
            play();
}


When you will add Mouse Event, flash will add a line above the script to import mouse events;

import flash.events.MouseEvent;

If it does not add it, please add it.

Test your movie.

This is your code until now;


import flash.events.MouseEvent;
stop();
DCButton.doubleClickEnabled = true;
DCButton.addEventListener( MouseEvent.DOUBLE_CLICK, gotoNextFrame );
function gotoNextFrame(e:MouseEvent):void
{
            play();
}


Sometimes, your buttons may have objects inside it which may be helping your GUI to look alive. But these objects may register the click event and their parent movie clip may not. This will lead you to unwanted results. We can just disable these objects from receiving the mouse event by adding following line to your code;

DCButton.mouseChildren = false;

Your complete script will look like;


import flash.events.MouseEvent;
stop();
DCButton.mouseChildren = false;
DCButton.doubleClickEnabled = true;
DCButton.addEventListener( MouseEvent.DOUBLE_CLICK, gotoNextFrame );
function gotoNextFrame(e:MouseEvent):void
{
            play();
}

Test your movie.



Thanks..