October 16th, 2008
I always had a problem catching file not found errors with Flash. Mainly the FLVPlayback player trying to load a file that do not exists.
Here’s how you can handle it for FLVPlayback for AS2:
import mx.video.FLVPlayback;
myFLVPlayer.addEventListener("stateChange",this);
myFLVPlayer.load("youvideofile.flv");
function stateChange() :Void {
if(myFLVPlayer.state == FLVPlayback.CONNECTION_ERROR)
//show error message
}
Posted in Flash | No Comments »
October 16th, 2007
Here’s a way to Preload flv files before you play them in FLVPlayback component.
import mx.video.*;
var listenerObject:Object = new Object();
my_FLVPlybk.progressInterval = 001;
my_FLVPlybk.autoPlay = false;
listenerObject.progress = function(eventObject:Object) :Void {
var perc = Math.floor(eventObject.bytesLoaded * 100 / eventObject.bytesTotal);
//implement you loading visual representation here
if(perc == 100)
my_FLVPlybk.play();
}
my_FLVPlybk.addEventListener("progress", listenerObject);
my_FLVPlybk.load("yourflv.flv");
You can hide the player while its getting downloaded and show it when its fully downloaded. Make sure to set the autoplay option to false.
Happy coding 
Posted in Flash | 8 Comments »
January 6th, 2006
Ever heard of a certification where you can contribute questions? Well here is one of that kind. PHP OpenCerti, an idea floated by Nirav Mehta, a good friend of mine. Its a community project, where you can contribute in any way you like - mentor people, provide code / questions / ideas, promote the project, invite more leaders, anything! PHP developers would be easily able certify their PHP skills.
More details about the project here. Consider it as your project and make a difference 
Posted in Misc | 2 Comments »
January 4th, 2006
Tired of listening to the same songs while working??? Well here’s a break. Listen to radio online. Of course we have the biggies like yahoo music and all. But what about a hindi radio?
mms://69.26.220.46/RadioSuno allows you to listen to Radio City FM. Not sure if its sprung out by the FM station itself or a venture of a radio fan. One would require the latest version of Windows Media Player and good bandwidth to listen it.
Worth a hit and kill those hours at work or play. What say?
PS: Courtesy a forward from a colleague at work - Aslam
Posted in Misc | 1 Comment »
December 15th, 2005
To set focus on a particular cell in Datagrid in Flex use the setFocusedCell(object,boolean) function. The object requires two properties itemIndex and columnIndex. Column index as the name signifies is the index or the column number of the column you want to select. Item index is the index or the row number of the row you want to select.
So your code would look something like this (dg is the instance name of the DataGrid):
The following method is for Flex 2 Beta 1:
var __focusedCell:Object = new Object();
__focusedCell.itemIndex = 1;
__focusedCell.columnIndex = 2;
dg.setFocusedCell(__focusedCell,true);
The following method is for Flex 2 Beta 2:
var __focusedCell:Object = new Object();
__focusedCell.rowIndex = 1;
__focusedCell.columnIndex = 2;
dg.setEditedItemPosition(__focusedCell);
So the above code would select the cell of 2nd row and the 3rd column. Remember indexes start from 0 and not 1 
Posted in Flex | 2 Comments »
December 15th, 2005
Ever cracked your brains out wondering why your dynamic text field does not show the text when its masked??? I have been struggling with this problem from some time now.
All you need to do is embed characters. Select character sets that you want to embed from the embed option in the text field properties. Characters that you have embeded will be shown … none others!!
Posted in Flash | No Comments »
November 24th, 2005
Got to know about Pandora from Nirav’s Blog. Its kind of a music discovery tool. In layman’s terms it searches and suggests music depending on a few options/keywords you enter. Further you can create station out of your search. Pandora will keep adding music to that station and you can listen to it while your are working (like me:) or just doing anything. Its pretty nice. Out of the 10 songs they suggested till now I’ve liked 6. Good way to discover excellent music out there and believe me there’s plently which we even do not know about.
Thinking about it I was just wondering what futher could Pandora do. While at it, I spotted my iPod nano(yeah I am one of those iPod junkies). What if Pandora was ported on to iPod? You could connect to internet and listen to Pandora, download songs you like. Or just download the songs in a compressed format and listen to them later on. Would be a boon for music buff’s like me!!! What say Apple and Pandora??? 
Posted in Misc | No Comments »
September 20th, 2005
Yes, I am also one of those troubled souls when it comes to getting your project work cross-browser. It drives me crazy getting things to work in the exact same way on IE and Firefox.
Problem 1:
One of the flash intro’s I made ran very slowly on Firefox. It worked just perfect on IE. The intro was jerky and gave a feeling that something heavy was getting downloaded in the background.
Fix:
Remove “Transparent Windowless” option (if you have selected it) when exporting your flash movie and it will work like a charm on Firefox. Worked for me, should work for you too
Problem 2:
I exported a flash movie as 100% to fit perfectly to the browser and resize as and when the browser was resized. It worked just perfect on IE. In firefox the movie got loaded as a small box. It was not even the actual movie size.
Fix:
Remove the < !DOCTYPE> tag from the page where you are showing the flash movie. The movie will now fill the browser and resize as you resize your browser.
Posted in Flash | 7 Comments »
September 1st, 2005
Google never stops amazing me with its new offerings.
Here’s the latest gig to create your own google logo.
Happy Googling.
Posted in Misc | 3 Comments »
August 31st, 2005
Had an elocution competition in office on Tuesday. Spoke on the topic of how films are made. Here’s the bit from it.
————————————————-
The first Indian feature film was released in 1913, made by Dadasaheb Phalke and was called Raja Harishchandra. Filming back then was very unstandardized since depended directly on the cameraman and how he moved the camera. Films were shot on a single reel making them only 15-20 minutes. Since then the art of filming has come a long way. Today I will share with you the steps involved in modern day film making.
Step 1: Writing the Script
A writer or a production house like Yash Raj films have a storyline in mind. Thoughts get the shape of Dialogues and Scenes. If the script is written by an independent writer he has to sell his script to a production house. A story editor and a producer go through the script and decide whether to buy it or not. The main character roles are sketched out and highlighted. After many edits and re-edits and the script is made final.
Step 2: Pre-Production
Careful execution is the first step to ensuring that the film will turn out well. In a word it is film planning. The producers will seek out directors whose talents match the subject matter of the story. Once the script is agreed on by all members, the director begins to choose his cast and crew. He also appoints his production manager, his cinematographer, the person responsible for actually filming the movie, and his location manager. The director then starts a process called storyboarding where he creates a visual image for every scene in the movie.
Step 3: Production
Production is the most grueling part of filmmaking and is indeed where “the magic happens”. At this stage the actual shooting of scenes happen. It consists of various important areas like lighting, locations, weather, dialogue recording, retakes etc. The cast and crew can frequently spend 12 or more hours on the set, filming only three or four pages of script.
Step 4: Post-Production
Post-Production involves editing and correction, reshoots, color-correction, voice recording and marketing, Editing eliminates unwanted footage and scenes are placed in a coherent order. Titles and credits are added. The additional background noise are recorded. The final step of making the movie is to show it and this is where marketing comes in. The key factor here is to show to it to an audience that match the film. The film is then sent for distribution where they are released in theatres for public viewing.
So there you have it, the basic outline of the filmmaking process. Hope it gave you some new insights or maybe just passed the time.
————————————————-
Posted in Misc | No Comments »