Posts

Save image from Flash using Node.js and Socket.io

Image
I have been working on Node.js and Actionscript 3.0 for couple of day. I have searched everywhere for help to connect socket.io and flash. But i couldn't find anything decent. Most of them where outdated. Lets' check the requiremnts Node.js Socket.io 0.6 FlashSocket FlexSdk Flash IDE Before starting i would like say something about version. Flashsocket din't work on latest socket.io and i couldn't work out any solution. And also FlashSocket need FlexSdk and also websocket .  Node js  First install socket.io in to the application directory .Note the version it's 0.9 npm install socket.io@0.9 The server code will be like this var app = require('http').createServer(handler) , io = require('socket.io').listen(app,{transports:['flashsocket', 'websocket', 'htmlfile', 'xhr-polling', 'jsonp-polling']}) , fs = require('fs'); var port = Number(81); app...

Customise Combobox/DropDown in Flash

I am always wonder how to customise the Combobox component in Flash . It's easy to change the skin. Simply double click the component , enter each movieclip and change the style. But ever wonder how to change text color and it's position. I will try to point out step by step procedure for customise it. 1. First create a class which extends ComboBox. I used  DropDownComboBox for class name. 2. Second create another class for Cell render which extends  CellRenderer. I used DropDownCellRenderer; 3. Open a new flash document  and insert a combobox component in the stage. 4. Select ComboBox clip in the library. Right click on it and select Properties.   5. In the properties panel change the default Class to the custom class you wrote . ie,  DropDownComboBox  6. Inside the DropSownComboBox constructer function type this code  dropdown.setStyle('cellRenderer', DropDownCellRenderer); 7. If you need to change the Text of ComboBox...

Squirrel and Ashoka

Image
squirrel , a set on Flickr.

How to create key hash in Windows 7 64bit

Recently i tried to get started with Facebook SDK for Android . Actually there is a good tutorials for getting started in facebook developer site. I followed this link https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/ I created a sample app in Facebook developer site and added the key hash in App setting . but When started the app i found the Facebook Authentication is working at all.I got Mobiletest is misconfigured for Facebook login. Press okay to go back to the application without connecting to facebook If you press okay it will go back to the application. And it will show an error like Login Failed: invalid_key: android key mismatch. Your key "abcdefghijklmns" Does not match tje allowed keys specified in your application Settings This is because you have entered a wrong key in Apps settings in https://developers.facebook.com/apps. After lot of googling i found that the keytool am using giving a wrong key hash. The error is...

Upload Video to Facebook Using Actionscrpt 3.0

For the last one week am searching for uploading video to Facebook using Graph Api from Flash. First challenge is to find something which will help to capture video from webcamera and convert it to ByteArray. The problem is Actionscript doesn't had any utlity to save video from webcamera. It uses Flash media server to save video. But i need something which not uses any server side acript. After searching several hours in google i found a link. http://www.zeropointnine.com/blog/updated-flv-encoder-alchem/ In this utility it uses snapshots from the webcamera which will encode it . Though it had some drawbacks and limitations, it serves my requirement for small videos. I used it for creating videos. Next i need to upload video to facebook. This is the api used to connect facebook using Actionscript. http://code.google.com/p/facebook-actionscript-api/ This API uses a different function for uploading videos to facebook . Facebook.uploadVideo(). The reason for different...

First Shots from Canon 550D

Image
First Shots from Canon 550D , a set on Flickr. Finally , i bought a SLR Camera , Canon 550D. And here is my first shots ...

Change Android AVD location in Windows7

Why am always forget to update this blog? I don't know. Anyway i would like to share a small tip i came across when i am working with Android. Android.. hmmm ... Sorry i just started to learn Android. Like all other thing am experimenting with Android. First i just added 4 AVD and tried to make Fifth one and got an error. I just looked my partioion and found that C drive is almost full.. It's because the Android AVD is created normally in  C:\Users\UserName\.android\avd  and i am just giving every AVD a 5GB SDCARD also. What else ? :P I searched google and found and solution . I just copied the .avd folder from C:\Users\UserName\.android\avd and just pasted it to another drive. And i also edited the configuration file of each AVD. Got the idea ? no? Okay i have a AVD named " gingerbreadWVGA " . I would have a " gingerbreadWVGA.avd " and " gingerbreadWVGA " configuration file on " C:\Users\UserName\.android\avd\ ". I just cut a...

Configure PostgreSQL and phpPgAdmin in WAMP

As i told earlier am trying to switch to Flex , i am trying to learn connection between PHP and Flex. When searched i got a excellent tutorial . But the problem is that it uses PostgreSQL. As i don't have any prior experience in PostgreSQL i try to install it in my Windows 7 and configure it in WAMP . I got different errors and spend almost two days in searching and using different methods . Atlast i got it right. I will try to figure out the steps i have done. Am using PostgreSQL 9.1 WAMP Server 2.0e phpPgAdmin 5.0.2 WAMP consists 1. Apache Version :2.2.17   2. PHP Version :5.3.5  3. MySQL Version :5.5.8 First install PostgreSQL , no need to install additional plugins like phpPgAdmin. Install WAMP server where ever you need. Download PhpPgAdmin  and unzip it to WWW folder in WAMP installation. At this point if you try to access the http://localhost/phpPgAdmin/ you may get this error. Your PHP installation does not support PostgreSQL. You need to ...

Connecting Flex 4 with AMFPHP

These days am missing this blog coz am busy with learning Flex. When i tried to connect with AMFPHP i can't find anything useful. Most of them were vague .Using the default data connectivity in Flash Builder am more confused and it's code looks complex . Atlast i found someone helpfull from adobe forum . When i tried to implement it , it shows nothing and missing some files. When i checked the PHP file, though am not good in PHP , i found there is also something also missing. I tried and searched and corrected the files. Here is the MXML code: import flash.events.MouseEvent; import mx.controls.Alert; import mx.events.FlexEvent; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; protected function getAllEmployees_resultHandler(event: ResultEvent): void { dataGrid.dataProvider = event.result; } protected function getAllEmployeesByID_resultHandler(event: ResultEvent): void { dataGrid.dataProvider = event.result; } protected function createEmployees_result...

Honey and Bee

Image
Honey and Bee , a photo by logicmania-lab on Flickr. It's a sunny day. Bee's were busy with there breakfast. They were stealing honey from my rose