Facebook Graph API & OAuth 2.0 & Flash (update)

As previously mentioned, facebook released a new Graph API. It is based on OAuth 2.0 protocol (old authorization token also works). While it is fresh thing, there is no much ActionScript stuff around, so I came with FacebookOAuthGraph class. This class is meant to be used as an abstract class, while it contains just the basic authentication algorithm and call method to request data. It stores access token in SharedObject, so next time you came into app, you get connected on background without noticing (no popup etc.). Your token should expire in 24 hours.

Here is the code for the following flex app, to make it work, get latest FacebookOAuthGraph and FacebookOAuthGraphEvent classes.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
    import sk.yoz.events.FacebookOAuthGraphEvent;
    import sk.yoz.net.FacebookOAuthGraph;
    // facebook Application ID
    private var clientId:String = "268718683475";
    // path to our callback 
    private var redirectURI:String = 
    // required extended permissions
    private var scope:String = "publish_stream,user_photos,user_photo_video_tags";
    private var facebook:FacebookOAuthGraph = new FacebookOAuthGraph();
    [Bindable] private var connected:Boolean;
    private function init():void
        facebook.clientId = clientId;
        facebook.redirectURI = redirectURI;
        facebook.scope = scope;
        facebook.useSecuredPath = true;
        facebook.addEventListener(FacebookOAuthGraphEvent.AUTHORIZED, authorized);

        // stage.root.loaderInfo.parameters
        log.text += "checkSavedToken()\n";
    private function connect():void
        log.text += "connect()\n";
    private function authorized(event:FacebookOAuthGraphEvent):void
        connected = true;
        log.text += "authorized\n";
    private function call(path:String, binary:Boolean):void
        var loader:URLLoader = facebook.call(path);
        loader.dataFormat = binary 
            ? URLLoaderDataFormat.BINARY
            : URLLoaderDataFormat.TEXT;
        loader.addEventListener(FacebookOAuthGraphEvent.DATA, callComplete);
        log.text += "call(" + path + ")\n";
    private function changeStatus(message:String):void
        var data:URLVariables = new URLVariables();
        data.message = message;
        var method:String = URLRequestMethod.POST;
        var loader:URLLoader = facebook.call("me/feed", data, method);
        loader.addEventListener(FacebookOAuthGraphEvent.DATA, callComplete);
        log.text += "changeStatus(" + message + ")\n";
    private function callComplete(event:FacebookOAuthGraphEvent):void
        log.text += "call completed -> see result\n";
        if(event.rawData is ByteArray)
            var loader:Loader = new Loader();
            loader.loadBytes(event.rawData as ByteArray);
                    image.source = loader;
            result.text = event.rawData.toString();
    <mx:Button click="connect()" label="connect" />
    <mx:Text text="{connected ? 'connected' : 'not connected'}" />
<mx:HBox visible="{!connected}" includeInLayout="{!connected}">
    <mx:Text text="#access_token=121161974560905%7C2..." />
    <mx:TextInput id="hash" />
    <mx:Button label="add hash" click="facebook.confirmConnection(hash.text)"/>
    <mx:TextInput id="path" text="me" />
    <mx:Button label="call" click="call(path.text, false)" enabled="{connected}"/>
    <mx:Spacer width="20" />
    <mx:TextInput id="path2" text="me/picture" />
    <mx:Button label="call binary" click="call(path2.text, true)" enabled="{connected}"/>
    <mx:TextInput id="status" text="testing FacebookOAuthGraph" />
    <mx:Button label="change status" click="changeStatus(status.text)" enabled="{connected}"/>
<mx:HDividedBox width="100%" height="100%">
    <mx:TextArea width="30%" height="100%" id="log"/>
    <mx:TextArea width="70%" height="100%" id="result"/>
    <mx:Image id="image" />

Make sure your html wrapper defines correct allowScriptAccess and both id and name for <object> tag. This enables ExternalInterface.objectID. With swfobject use:

var params = {
    allowScriptAccess: "sameDomain"

var attributes = {
    id: "FacebookOAuthGraphTest",
    name: "FacebookOAuthGraphTest"
swfobject.embedSWF("FacebookOAuthGraphTest.swf", "alternative", "100%", "100%", "10.0.0",
    "expressInstall.swf", flashvars, params, attributes);

callback.html pushes url hash into flash app. When running this application from desktop (creating/debugging), your callback.html located on public domain has no access to its opener (different domain – XSS), so you need to pass access_token manualy into <TextInput id=”hash”>, but once your flash application is on the same domain with callback, it works automaticaly.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sk" lang="sk" dir="ltr">
	<script type="text/javascript">
		if(window.opener && window.opener.confirmFacebookConnection)
<p>You may now close this window.</p>

Click connect and allow facebook application. Facebook redirects to callback.html that pastes hash into flash and closes popup. Now you are authenticated. Next time you visit this flash application (refresh this page) you will get authenticated in background (if your access token is still valid). Notice, some graph api calls returns JSON objects (me), other may return binary data (me/picture). For now it may take some time to finish calls (5 second or more), but I hope facebook will soon make it fast.

You get your JSON decoded data via event.data. Just make sure you do not try to decode ByteArray (eg. me/picture)

// call("me")
private function callComplete(event:FacebookOAuthGraphEvent):void

Some calls to test:

Friends:             me/friends
News feed:           me/home
Profile feed (Wall): me/feed
Likes:               me/likes
Movies:              me/movies
Books:               me/books
Notes:               me/notes
Photos:              me/photos
Videos:              me/videos
Events:              me/events
Groups:              me/groups

Additional information about my facebook app (see all settings):

Application ID:         268718683475
App Domain:              yoz.sk
Website / Site URL:      http://blog.yoz.sk/examples/FacebookOAuthGraph/
App on FB / Canvas URL:  http://blog.yoz.sk/examples/FacebookOAuthGraph/facebook.php?a=b
Page Tab / Page Tab URL: http://blog.yoz.sk/examples/FacebookOAuthGraph/facebook.html?
Canvas type:             iframe
Developer Mode:          Off
App Type:                Native/Desktop
Sandbox Mode:            Disabled
Remove Deprecated APIs:  Enabled
signed_request for Canvas: Enabled
Timezone-less events:    Enabled
Encrypted Access Token:  Enabled
...other Migrations:     Disabled

Based on facebook access token, it should be valid approximately for 24 hours. Notice the bold part, works as expiration time (unix time format). Use FacebookOAuthGraph.tokenToExpiration() to parse Date:


Important update: May 19, 2010: Application is working again. Due to massive support in bug tracker (thanks all for your votes), facebook devs changed secured crossdomain.xml, so it allows unsecured requests. changeStatus() method added into example and some minor changes in FacebookOAuthGraph class (please update).

Here is what happend and why this app was not working for a while:

  • May 11, 2010: facebook changed rules, so requests on unsecured graph service (via http://graph.facebook.com…) were limited to just those without access_token parameter. Requets to secured service (https://graph.facebook.com) resulted in security violation due to missing secure=”false” parameter in crossdomain.xml
  • May 12, 2010: bug submitted
  • May 12, 2010 – May 14, 2010: massive bug voting
  • May 14, 2010: Bug confirmed by facebook dev team
  • May 19, 2010: Bug fixed, crossdomain file changed

I am glad that facebook devs listens and care. 🙂


Is there a .fla version available?

Yes, there is a simple working Flash CS4 archive available for download (.fla + all sources). The demo connects the facebook application and once connected, it uploads generated picture into photo album.

How can I use this class in my iframe canvas page?

Please read article Authorizing Iframe Facebook Applications For Graph API

How can I make this class do more advanced things and what are the best practices?

Please read article Extending FacebookOAuthGraph Class, where all the most comon extendings are described.

When I connect with this app in one browser (firefox), and I run another browser (chrome) I get automatically connected. Why?

Your authorization token is stored in SharedObject, that is OS-user persistent (eg. windows user). No matter what browser you run, all of those reads data from one SharedObject. If you need cookie or session persistent authorization, please extend my class and override methods that use SharedObject.

How to add request parameters into my call?

Pass URLVariables object as a second parameter to call() method:

// eg. in order to make this call "me/picture?type=large", do the following:
var data:URLVariables = new URLVariables();
data.type = "large"
call("me/picture", data);

Why I can not access me/photos?

Facebook has changed rules again. You also need “user_photo_video_tags” permission within your app. I have already added it into my app, so please remove your browser cache, refresh and click connect button again (even if you are connected already). Now it should work.

How to upload photo with graph api?

This is a piece of working code from Sean, thnx Sean:

// MultipartURLLoader by Eugene Zatepyakin can be found here: http://bit.ly/9wx4q7
public function uploadImageCall(path:String, ba:ByteArray, message:String, token:String=null):MultipartURLLoader
    var mpLoader:MultipartURLLoader = new MultipartURLLoader();
    mpLoader.addVariable("message", message);
    mpLoader.addFile(ba, "image.jpg", "image");
    mpLoader.load(apiSecuredPath + "/me/photos?access_token="+ token);
    return mpLoader;

Can I make fql calls with this class?

However graph api does not implement fql calls, you can make fql calls using this class. The resulted data are not JSON but XML:

var data:URLVariables = new URLVariables();
data.query = "SELECT uid, name FROM user WHERE uid = XXX"; // insert your uid
var loader:URLLoader = facebook.call("method/fql.query", data, 
    URLRequestMethod.POST, null, "https://api.facebook.com");
loader.addEventListener(FacebookOAuthGraphEvent.DATA, fqlComplete);

private function fqlComplete(event:FacebookOAuthGraphEvent):void{
        var xml:XML = new XML(event.rawData);

For fqlComplete method, please read Parsing FQL result article.

Can I post feeds with attachments?

Graph API has not documented attachment functionality for feeds, anyway, you can publish streams with attachments with this class as simple as:

var media:Object = {};
media.type = "flash";
media.swfsrc = "http://zombo.com/inrozxa.swf";
media.imgsrc = "http://blog.yoz.sk/wp-content/uploads/3d-150x150.jpg";
media.width = "80";
media.height = "80";
media.expanded_width = "120";
media.expanded_height = "120";

var attachment:Object = {};
attachment.name = "test name";
attachment.href = "http://blog.yoz.sk"
attachment.description = "test description";
attachment.caption = "test caption";
attachment.media = [media];

var data:URLVariables = new URLVariables();
data.message = "test message";
data.attachment = JSON.encode(attachment);

facebook.call("method/stream.publish", data, URLRequestMethod.POST, null, "https://api.facebook.com");

How can I develop my app locally when callback only works on the domain?

While callback is not able to push access_token into your app on runtime, I just copy access_token value into my code and publish again:

parameters.session = JSON.encode({
        .replace(/\%7C/g, "|")

Hi Is there a way to implement a “i Like” button with your class?

Sorry, you can not use graph API to like stuff, there is no method for that. Even by testing like request:

href: http://www.facebook.com/pages/***
node_type: page
edge_type: like
page_id: 12345
now_connected: true
nctr[_mod]: connect
post_form_id: 123ABF***********
fb_dtsg: TAfAJ
post_form_id_source: AsyncRequest

… post_form_id is some static required parameter that you can not guess.

This example app works with Internet Explorer, but my one results in Error #2032

Please complie your app to Flash Player 10 (or later). It should fix this issue. Credits goes to Garcimore :-), thnx. The issue has been identified as header Content-Type: application/json, that is returned from facebook. Suggested workaround (by facebook dev team) is to use POST variables with your requests, however it is reported as not working solution.

I can not make it run in my Mac-Safari sonfiguration

It seems there is a bug in Safari on Mac that does not let you open popup via ExternalInterface. You should use navigateToURL() in that case. Credits goes to Beans, thank you. More instructions here.

var js:String = "return window.navigator.userAgent.indexOf('Safari') > -1);"
if(ExternalInterface.call("function(){" + js + "}")){
   // safari specific code

448 comments so far

  1. Jozef Chúťka February 22, 2011 12:59

    Nim, there are changes everyday… but, if you are trying to access data with a token, make sure its secured request – https://… !

  2. kaniskar Goodwin February 23, 2011 08:39

    Hi Jozef,

    I have face one problem, bellow mentioned function is not call,if you have any solution can u share with me

    .removeEventListener(event.type, arguments.callee);
    verifyTokenSuccess(event, token);

    Thanks a lot.

  3. Jozef Chúťka February 23, 2011 22:09

    Hi kaniskar, may this be your issue?
    follow a few comments below to see… if not than try searching verifyToken in this page

  4. Marco March 15, 2011 18:11

    Hi jozef. I m having a problem with authentification, is making an infinitive loop. When the app is trying to open. Its must be something that facebook api change because it was working until last week.

    The url is http://apps.facebook.com/meditubrillolux/

    ill wait your answer.


    p.s. sorry for my english, im from Argentina

  5. Jozef Chúťka March 16, 2011 11:11
  6. Ayubi April 9, 2011 05:39

    Hi, I have a problem with Facebook flex.
    My apps is working fine but when I put a chart (any chart, either native from flex or from outside flex) on my apps, it doesn’t show up.

    Anyone can help?


  7. jiannis April 18, 2011 10:28

    for those of you still having problems with the https/ssl of facebook, there is a solution:
    the fql api of facebook has the following parameter: return_ssl_resources

    So when you do an fql query for photos, etc try this:

    //get thumbnails from ‘uid’ album
    var data:URLVariables = new URLVariables();
    data.query = “SELECT src_small” + “FROM photo ” + “WHERE aid IN ( SELECT aid FROM album WHERE owner='”+uid+”‘ AND type=’profile’ )”;
    data.return_ssl_resources = 0;
    albumLoader = facebook.call(“method/fql.query”, data, URLRequestMethod.POST, null, “https://api.facebook.com”);

    albumLoader.addEventListener(FacebookOAuthGraphEvent.DATA, onGetAllphotos);


  8. muudles May 11, 2011 04:30


    Thank you so much for your hard work.

    I’m testing out your flash example. But I seems to be getting erratic results after logging in and out. Sometimes it only say ‘connecting’, sometimes ‘connecting, authorizing’, sometimes ‘connecting, authorizing and uploading’. The image only successfully uploaded onto my fb ones.

    I tried looking through the comments just in case you’ve already answered it, but I didn’t seem to see anyone else with the same problem?

    Please help.

  9. Jozef Chúťka May 11, 2011 09:32

    hi muudles,
    I am not able to reproduce any issues, it seems like example is working correctly for me. maybe you could debug request being called to see if there are any issues with connection – response by facebook

  10. Eulochi July 19, 2011 18:10


    Will this work on a mobile device, especially if I’m making a Flash app for ios?

    Many thanks.

  11. Jozef Chúťka July 19, 2011 18:19

    Hi Eulochi,
    if ios supports StageWebView you should be able to use this source

  12. […] It does not provide login authentication as there are many other libraries available for this purpose and really…why re-invent the wheel? Some great examples are from Big Spaceship and Jozef Chúťka. […]

  13. Rana August 12, 2011 08:59

    Nice one good for flash people

  14. Rana August 12, 2011 09:19

    Hi man,

    Thanks for this source !here the issue is
    i implemented expectantly in flex but i will get the same will get the same window which is visible on the top . when am clicking that button it gos to the Facebook login page other button are enabled how to share videos and images in Facebook

  15. Rana August 12, 2011 09:20

    and how to create the like button and share button in my Flex ui

  16. Jozef Chúťka August 12, 2011 09:54

    hi Rana,
    for like button read this article again there is a section “Hi Is there a way to implement a “i Like” button with your class?”

    for uploading images to facebook:

  17. Create Your Own August 19, 2011 02:46

    Great post! I will try to add this inside to my flash game.

  18. […] […]

  19. aravindakumar September 12, 2011 14:58

    Great post!how to get the current user session?

  20. Jozef Chúťka September 13, 2011 09:07

    hi aravindakumar,
    you mean FacebookOAuthGraph.token?

  21. Mike Delucchi October 3, 2011 01:00

    or you could just use this method… with the new 1.7 api (http://code.google.com/p/facebook-actionscript-api)

    here’s a snippet from a game i’m building on facebook that requires permissions at a certain point in the game.. it works well

    private function facebookInit():void // START THE SESSION…
    Cc.add (‘facebookInit — v 8.0’);

    Facebook.init(APP_ID, facebookInitHandler,{
    appId: APP_ID,
    status: true,
    cookie: true,
    xfmbl: true,
    channelUrl: ‘http://yoursiteurl/channel.html’,
    oauth: true,
    perms: “publish_stream,email”});

    private function facebookInitHandler(response:Object, fail:Object):void
    if (response.accessToken)
    userAccessToken = JSON.encode(response.accessToken);
    facebookLoggedInWithToken = true;
    } else {
    facebookLoggedInWithToken = false;

    private function loadProfileData():void
    var request:String = ‘/me’;
    var requestType:String = ‘GET’;
    var params:Object = null;
    Facebook.api(request, loadProfileDataHandler, params, requestType);

    private function loadProfileDataHandler(response:Object, fail:Object):void
    if (response) {
    userID = response.id;
    fullName = response.name;
    firstName = response.first_name;
    lastName = response.last_name;
    userEmail = response.email;
    userPicURL = ‘http://graph.facebook.com/’ + userID + ‘/picture’;


  22. PVieira October 7, 2011 18:34

    Hi Jeff! I was seeing some new stuff from facebook and I saw this article:

    I’ve tried to do a feed with that code: attachment.description = “Friend: @[{uid}:1:{name}]”

    Didn’t work. I wonder if you already tried this successfully?

  23. Jozef Chúťka October 10, 2011 09:47

    hi PVieira,
    I have not tryed it yet myself… however
    “I’ve tried to do a feed with that code: attachment.description = “Friend: @[{uid}:1:{name}]”” … I believe it works only on message feeds, not attachments

  24. PVieira October 10, 2011 11:11

    Thanks for the answer Josef. I tried also in data.message so it seems it really doesn’t work.

    Is there a way to send a message to a user friend? Some notification that my app is using his data?

  25. Jozef Chúťka October 10, 2011 12:05
  26. PVieira October 10, 2011 13:46

    Yes, I saw that information in other forum. So there is no alternative? That sucks but I understand facebook position.

  27. RT_Magstar November 8, 2011 07:18

    can anybody guide me how to invite friends for events using graph api ( post method ) in c# example.

  28. Sam December 21, 2011 17:45

    All seems to work great! I can post photo’s from my flash App to facebook 🙂

    Although my Facebook permission window is opened in a new tab, not a nice small popup. What can this problem be? Thanks in advance people.

  29. Jozef Chúťka December 21, 2011 18:02

    hi Sam, if this also happens for you with the flash example in this blog post than it is related to your webbrowser. else make sure the window in your code is opened via javascript:window.open

  30. Gil December 21, 2011 22:59

    I using the the code above and so far all is great (Many thanks) How would I go about having the post to an image where by the pop up to add additiona text to your wall is present.


  31. Jozef Chúťka December 22, 2011 10:41

    hi Gil, please read http://blog.yoz.sk/2010/06/extending-facebookoauthgraph-class/ and comments under, there is a lot of useful stuff and tips

  32. Henry January 31, 2012 06:09

    is there an updated facebook app settings configuration now that facebook has changed it?

  33. Jozef Chúťka January 31, 2012 14:41

    Henry, I have updated those in article, I hope it helps you

  34. Ilya February 9, 2012 17:05


    Once again I am using it, and once again great job!

    I translated your sample to flash builder 4.6 style, tell me if you need the code.

  35. Ilya February 9, 2012 17:06

    *mail me

  36. norberto tso February 20, 2012 19:55

    i got the flash c4 source code and when i run in flash ide i got the follow message:

    Error #1065: A variável com.adobe.serialization.json::JSON não foi definida.
    at sk.yoz.events::FacebookOAuthGraphEvent/get data()[C:\facebook_11\cs4\src\sk\yoz\events\FacebookOAuthGraphEvent.as:36]
    at sk.yoz.net::FacebookOAuthGraph/verifyTokenSuccess()[C:\facebook_11\cs4\src\sk\yoz\net\FacebookOAuthGraph.as:108]
    at Function/()[C:\facebook_11\cs4\src\sk\yoz\net\FacebookOAuthGraph.as:100]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at sk.yoz.net::FacebookOAuthGraph/loaderComplete()[C:\facebook_11\cs4\src\sk\yoz\net\FacebookOAuthGraph.as:186]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

    help me please

  37. Jozef Chúťka February 21, 2012 10:09

    norberto, I think you are missing JSON library. try downloading it from http://code.google.com/p/as3corelib/

  38. aarti gusain April 11, 2012 09:02

    hi jozef

    I am using your code for facebook authantication and it perfactly run but i am faceing problem regarding facebook access token url,when we run our app on facebook we get a authantication popup .my question is you without opening the popup can we get access token.

    i am using this code in flash and in flash side we call “advancedcallback.html” .can we use php side code for access token handling?if yes,please guide me how we write that

  39. Jozef Chúťka April 11, 2012 10:19

    hi aarti, you should be able to access token on php, there is an php api documentation on https://developers.facebook.com/docs/reference/php/facebook-api/ , sending access token from php to flash can be done via flashvars … see “add hash” button functionality in my example

  40. aarti gusain April 17, 2012 07:51

    hi jozef

    Once again i am here with my problem.actually jozef i had tried to solve the access token according to your suggestion but our team want to solve this problem in flash side completely,can you please suggest me how we get access token without open the popup.

    when we run our app on crome and if my popup setting is blocked ,in this case authantication popup does’nt open and my app is autherized completely and i get my all friends information,but when i run my app on mozzila and ie browser and we blocked our popup setting, in this case our app does not autherized and we do not get any friends information,so in this case my functionality do not work and its a big issue ,that’s why i want to try to get access token without opening any popup.
    if you have any solution please suggest me .

  41. Jozef Chúťka April 18, 2012 09:28

    aarti, in order to get access token you must visit facebook page with authorization for your app. you can do it in popup or redirecting whole page (I would expect frames to not to work to avoid clickjacking). offline access seems to be depricated https://developers.facebook.com/roadmap/#may-2012 so user will have to reauthenticate with every new session – popup or redirect

  42. Ttcat May 10, 2012 23:27


    Thanks for your project ! I got same problem about open a small popup window. It just open up a new tab or window. I looked into the Class, it looks ok !

    Wonder if there’s other MUST HAVE js code in html ?

    public function connect():void
    tokenCallbackDefined = true;
    ExternalInterface.addCallback(jsConfirm, confirmConnection);

    var id:String = ExternalInterface.objectID;
    var url:String = authorizationURL;
    var name:String = jsWindowName;
    var props:String = “width=670,height=370″;
    var js:String = ”
    + ‘if(!window.’ + jsConfirm + ‘){‘
    + ‘ window.’ + jsConfirm + ‘ = function(hash){‘
    + ‘ var flash = document.getElementById(“‘ + id + ‘”);’
    + ‘ flash.’ + jsConfirm + ‘(hash);’
    + ‘ }’
    + ‘};’
    + ‘window.open(“‘ + url + ‘”, “‘ + name + ‘”, “‘ + props + ‘”);’

    ExternalInterface.call(“function(){” + js + “}”);

  43. Jozef Chúťka May 11, 2012 11:32

    Hi Ttcat,
    you do not need to have any additional code in javascript, you can define all needed via ExternalInterface, just make “Make sure your html wrapper defines correct allowScriptAccess and both id and name for tag.”

  44. Vaishali Saxena June 7, 2012 11:59

    will you please resolve my query i have implemented your code it is connected with the application but not authrized…this function not call and add hash is also not called..
    so please resolve my query..

  45. Vaishali Saxena June 7, 2012 13:47

    My flash code is not connected with my Facebook application. I can not resolve the error and not getting the error that what and where is the problem..
    on click the connect button the window show my application on logging into the account it appears the message
    “You may now close this window.”
    not connected with the application..
    I can’t debug ma flash application..
    please give me some solution how to resolve it..

  46. Jozef Chúťka June 7, 2012 14:05

    Hi Vaishali,
    I have no idea what might went wrong based on your description. I suggest you debug flash callback method as well as javascript part.

  47. Vaishali Saxena June 12, 2012 08:38

    I used your above code my application perfectly run and update the status, now i want to add the additional feature for uploading the photo using the above code…
    Can u send me the code to upload the photo on Facebook just like to update the status on the above code..
    Thanx in advance….

  48. Jozef Chúťka June 12, 2012 09:14