URGENT - Facebook connect you in Flash game

I have a problem of application of the Flash API in my game... I tried to open one of the examples of the API, I put the last source API files in the folder and it gives me errors in the source files...

https://code.Google.com/p/Facebook-ActionScript-API/ It's API, I tried.

If anyone knows how to implement Facebook connect in a game, please help...

This is an excerpt from a recently published book, I wrote (http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=gladstien):

The Facebook API of ActionScript Adobe also uses the class ExternalInterface and JavaScript to communicate with Facebook, so you should always use the swf including code that is compatible with the ExternalInterface class. Adobe uses SWFObject (http://code.google.com/p/swfobject) to embed the swf file and injects the JavaScript code using xml and ActionScript. You can check the FacebookJSBridge class to see how it's done.

At the time of this writing, the ActionScript from Facebook Adobe (version 1.8.1) code uses class JSON of Mike Chamber.  But if you are publishing for Flash Player 11 or higher, you must use the native JSON Flash class.

The two JSON classes are similar because they are named the same and use static functions to convert to and from JSON format. When the class room JSON uses JSON.decode () and JSON.encode (), the native JSON Flash class uses JSON.parse () and JSON.stringify ().

So, if you use Adobe Facebook ActionScript API and see

1061: call to a method may not set encode through a reference with static type class.

Errors, you need to replace JSON.decode () by JSON.encode () with () JSON.stringify and JSON.parse.

To use the Adobe Facebook ActionScript API, go to http://code.google.com/p/facebook-actionscript-api and download the latest version of the GraphAPI documentation, examples, SWC files and source code.

If you are publishing for Flash Player 11 or better, you will need to change all JSON methods in non - CFC files.  If you use swc files place source files, you will have less code to change.

In support of the files/Chapter 11/facebook/fb2 are files that use the Facebook Adobe ActionScript API for the web. Code that uses the API is located in FlashWebMain.as.

With only a few changes FlashWebMain.as (FlashWebExample.fla document class) is identical to the example file from Adobe with the same name. I've added details (in cbF, dialogsF and graphF) showing how to use the Facebook.ui and Facebook.api methods.

Tags: Adobe Animate

Similar Questions

  • What is my Skype Id when you use facebook connect

    What is my Skype id when you use facebook connect I can not find not to give people to connect to me thank you very much

    Traore can use your generic name of Skype:

    Facebook:yourname

    where yourname is the name you use to log into Facebook.

  • When I open Internet explorer in windows and I am trying to use facebook or no matter what games, I get a script error has occurred on this page do you still want to run

    Original title: not admissible error in windows

    When I open Internet explorer in windows and I am trying to use facebook or no matter what games, I get a script error has occurred on this page want to still run and also first message is unacceptable, then the error message how can I fix a script if everything they told me to do, tried of thise disable ad ons, enable ad - ons (what I have now) reinstall it IE upgrade to ie and nothing helped think I need to repair my windows xp professional, but do not have the original disc to do, and nowhere on windows can I find a repair tool.

    Hello

    1. don't you make changes on the computer before this problem?
    2. what version of internet explore do you use?
    3. What is the exact error message?

    Step 1: Check if the problem persists in safe mode with networking and send back the same.

    Step 2: Also, look for error messages in the event viewer. If you find error messages after return the exact error message so that we can help you better.

    Reference:
    Using the event viewer
    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/snap_event_viewer.mspx?mfr=true

    Understanding of event viewer
    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/event_overview_01.mspx?mfr=true

    Procedure to view and manage event logs in Event Viewer in Windows XP
    http://support.Microsoft.com/kb/308427

  • I forgot my password to connect you with my email address on my Facebook account

    original title: forgotten password

    I forgot my password to connect you with my email address on my Facebook account. When I tried to change my password, I received a link to go to my other email with my blackberry. When I went online to Facebook login and tried to put in my password, it made a new account with a different password. I'm so confused as how to cancel this second account that I didn't want in the first place and how do to just change my password with my old registration email address so I can be on Facebook as before.

    To help with this problem, please go to Facebook Help Center .  They can help you better than we can in the Windows Vista forum. Boulder computer Maven
    Most Microsoft Valuable Professional

  • How TCP multiplayer Flash game?

    I have a game in progress, and even if I'm the UDP protocol to work perfectly, I unfortunately later discovered that it is simply a protocol with loss. Apparently nothing (as far as my knowledge goes) you can do to make it return data if the data was not successfully received by the beneficiary.

    So, I was wondering how to use TCP? I heard it is possible, but I can't find a single tutorial or any information anywhere on how to do it. I found on the socket for the Adobe site connections, and although I got the server to which to connect (I think), I have no idea how to send data, how to get other clients to connect to him, etc. Any help?

    This is the script I am using, and although it connects... it's basically all this, I don't know where to go from here...

    package

    {

    import flash.display.Sprite;

    import flash.events.EventDispatcher;

    import flash.events.Event;

    import flash.events. *;

    import flash.events.IOErrorEvent;

    to import flash.events.ProgressEvent;

    import flash.events.ServerSocketConnectEvent;

    import flash.net.ServerSocket;

    import flash.net.Socket;

    TCP/public class extends Sprite

    {

    private var serverSocket:ServerSocket;

    private var clientSockets:Array = new Array();

    public void TCP()

    {

    Try

    {

    Create the server socket

    serverSocket = new ServerSocket();

    Add the event listener

    serverSocket.addEventListener (Event.CONNECT, connectHandler);

    serverSocket.addEventListener (Event.CLOSE, onClose);

    Bind to local port 8087

    serverSocket.bind (8087, '127.0.0.1');

    Listening to connections

    serverSocket.listen ();

    trace ("listen on" + serverSocket.localPort);

    }

    catch(e:SecurityError)

    {

    trace (e);

    }

    }

    public void connectHandler(event:ServerSocketConnectEvent):void

    {

    Thesocket is provided by the event object

    var: Socket = event.socket socket;

    clientSockets.push (taking);

    socket.addEventListener (ProgressEvent.SOCKET_DATA, socketDataHandler);

    socket.addEventListener (Event.CLOSE, onClientClose);

    socket.addEventListener (IOErrorEvent.IO_ERROR, onIOError);

    Send a connect message

    socket.writeUTFBytes ("Connected");

    Socket.Flush ();

    trace ('connect send message');

    }

    public void socketDataHandler(event:ProgressEvent):void

    {

    var socket: Socket = event.target as Socket

    Read the message of taking

    var message: String = socket.readUTFBytes (socket.bytesAvailable);

    trace ("Received:"+ message ");

    The echo of the message to the sender

    message = "Echo-" + message;

    socket.writeUTFBytes (message);

    Socket.Flush ();

    trace ("sent:"+ message ");

    }

    private function onClientClose (event: Event): void

    {

    trace ("Connection to client closed.");

    Should also delete table clientSockets...

    }

    private void onIOError (errorEvent:IOErrorEvent): void

    {

    trace ("IOError:"+ errorEvent.text ");

    }

    private void onClose (event: Event): void

    {

    trace ("socket closed by operating system server.");

    }

    }}

    unless you are using a server that all players connect, you must use adobe-to-peer networking (rtmfp).

  • No flash games load at all or are displayed.

    I had this problem with Firefox for the last couple months where no flash games load and appear as a blank screen. I tried update Javascript, Shockwave Flash and other things that I thought may be associated with the problem, but not good. I even tried turning off hardware exceleration and protected mode, AND using IE, but nothing helped. I think install Chrome, but I don't want to waste my time trying several solutions. Any help?
    I thought that it might help:

    • Adobe PDF plugin for Firefox and Netscape 10.1.14
    • Deploy Script NPRuntime plugin Library for Java (TM)
    • Next-generation Java plug-in 11.45.2 for Mozilla browsers
    • The plug-in allows you to open and edit files using Microsoft Office applications
    • Authorization plug-ins office for NPAPI browsers
    • Shockwave Flash 18.0 r0
    • Adobe Shockwave for Director Netscape plug-in, version 12.1.8.158
    • 5.1.31211.0
    • NPWLPG
    • Windows Presentation Foundation (WPF) plugin for Mozilla browsers

    Firefox Version 39
    Operating system: Windows Vista

    TheRedWall said

    He started the day, I've updated my security suite

    You should always check the updates in time.
    Many programs can be automatically configured to "Phone Home".

    This threat is useless now! Yay!

    I think you want to say "the problem is solved," Yes?
    Good day and safe surfing.

  • Re: Cannot use arrow keys when playing flash games

    Someone had this problem? The arrow keys on my keyboard do not work when I play flash games. Have downloaded the latest version of adobe, but not luck. Is it sounds like a hardware problem? What is the best way to thing to work around this problem?

    Thanks for any response.

    Post edited by: terrypal

    For me it has nothing to do with a malfunction of the equipment. If you can use the arrow keys in Windows or any application there absolutely no problem with the keyboard or something similar.

    Maybe is this result of the issue of the restriction of game control.

  • Pavilion P6120nl freeze when playing Flash game while

    Hi all

    I just bought my house 3 days ago p6210nl. But every time I play the game HP Games flash or http://www.games.co.id my computer got the gel after saveral minutes of play any flash game.

    Please help me and share your experience if you ever had the same problem and knows how to solve the problem. Thank you

    Kind regards

    Hi all

    Now I can manage the problem that causes my computer to FREEZE.

    I found that one of the software my computer HP thatmake some time when I played the game of freezing or watch a movie.

    So I just disabled the HP application in 'Startup' and 'Services '. It is already 2 weeks I can plaing a gmae and watch movie without GEL.

    For any other type of HP I have the same problem, try this:

    1 type "msconfig" in run or start search

    2. go in Services, check hide all Microsoft services

    3. just uncheck everything that isn't Microsoft services.

    4. go to start and tap on disable all the

    5 restart the computer

    6 and try activity that make you computer freezes or lock.

    7 activated one by one the services and startup and again repeat number 6.

    8 and turn it on continuously services or start making your computer freezes

    Hope that help.

  • Flash game display images

    I noticed that lately I have experience of shifts in game flash animations. Would it be because of a faulty graphics card?

    In addition, after noticing the game frozen images, I opened the CPU Panel and checked the video card. I soon perceived that the fan on the video card is not working.

    I hope that anyone with this experience can give advice. Thank you.

    Hi Joshua001,

    a. you are trying to play games online, by chance?

    b. the issue of delay occur with all games?

    The following article contains solutions to some common problems when playing games. For more information about problems with a specific game, see the documentation supplied with the game or go to the website of the Publisher of the game:

    Solve game problems

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-game-problems

    If, indeed, the graphics of the (video) card is defective, that could be the reason for the shift with animations flash games.

    In this case, the best option would be to contact the manufacturer of the graphics card for further assistance.

    I hope this helps.

    Gokul - Microsoft Support

    [If this post was helpful, please click the button "Vote as helpful" (green triangle). If it can help solve your problem, click on the button 'Propose as answer' or 'mark as answer '. [By proposing / marking a post as answer or useful you help others find the answer more quickly.]

  • Flash games will not resize in function display properly when expanded

    Hey everyone, hope you're all well today

    This really isn't a problem, it's just an annoyance for me when my daughter and I play flash games online-based.  I just got a HP Pavilion while a touchscreen.  So far, everything is ok with it, but this question:

    When I try to open the game after the login screen screen is just a little more big and not centered, but it opens in the upper left corner with the majority of the real game screen is the same small size he had before it was enlarged and ads being expanded outside on the right side to the place.  There is also a large area of the screen on the right side that has nothing more than a solid white color in it.

    I looked all over the internet trying to figure out how to solve this problem and I can't find a solution that works.  Any ideas?

    Well, who wasted no time. Got the answer, but it's not a big.

    It is a flash based game well but there was not a lot of expenses in the controls. There is in fact no parameters.

    It's like you see in your browser. She is supposed to have a fixed size.

    The only work around it to lower the resolution of the screen itself settings in Windows.

    In windows 8 or 8.1 if you use the Office of tiles, just start typing the Word set and a set of options will appear.

    Click on change display settings.

    If you have the desktop display, right-click on the screen and choose the resolution of the screen.

    Lower the resolution slider until it more low setting (or experience with sizes) and click OK.

    The game appears now larger or full screen according to the setting.

    Do not put the browser full screen. Use restore to the bottom and Center it.

    You will need to go back and again to restore the monitor to normal, such as it was.

    Your old monitor on the old XP machine was probably much more low resolution that your new one is now.

    This isn't a problem of windows 8 or a HP all in one problem, its a game scheduled at a great price.

    It will be useful.

    BTW, I joined this stupid game just to verify this.

    The Sacrifices I make... Sheesh!

  • BlackBerry facebook connect and chat

    I would like to connect using facebook connect and chat friends in facebook

    How it's done?

    give me the code

    Get the code at the bottom of the link,

    http://www.Baskoro.Web.ID/Facebook-connect-BlackBerry-HOWTO.html

    This code is written by another developer, please go through this link to forum for copyright etc information,

    http://Forum.developers.Facebook.NET/viewtopic.php?PID=214188

    Thank you

    Google before post message

  • have I not a ghost? PC turned off by itself and restarts when playing flash games...

    Hi, have a hp dc 7700 with a DC 7700 SFF USDT Board in it, 4 gig of ram, 750 GB HD, xp pro, 32-bit, windows just recently began to shut down the pc and restart on its own only when playing farmville, (flash game)... really weird... what I did > I did a full virus scan with advest & malware a few threats found and deleted, has done a chkdsk on it, performed a restore to an earlier date, have always the same problem... ran JRT and no threat not found, has anyone seen this before?  other that farmville, there is no other problems with it, my other dc7700 cmt have no problem when you farmville... duty to solve this problem, the pc of the wife...

    old_geekster wrote:

    Boatmoter, welcome to the forum.

    Have you checked to see if the computer is overheating all in game.  Games is intense and can cause a heat.  This can certainly cause the computer to reboot unexpectedly.  There are many FREE programs that you can use to check the time.

    Thanks for the tip I will load CPUZ and check the temperature which would be the specs of temp on this one

    old_geekster wrote:

    Boatmoter, welcome to the forum.

    Have you checked to see if the computer is overheating all in game.  Games is intense and can cause a heat.  This can certainly cause the computer to reboot unexpectedly.  There are many FREE programs that you can use to check the time.

  • How to make the Windows 7 network icon to show availability of internet connection? With flashing.

    How to make the Windows 7 network icon to show availability of internet connection?

    Flashing

    Hi RaDiCal007,

    Microsoft has removed the option host connection icon network; apparently drain you resources. Like you, I prefer much the icon 'flashing '.

    This forum post is my own opinion and does not necessarily reflect the opinion or the opinion of Microsoft, its employees or other MVPS.

    John Barnett MVP: Windows XP Expert associated with: Windows Desktop Experience: www.winuser.co.uk | vistasupport.mvps.org | xphelpandsupport.mvps.org | www.silversurfer-Guide.com

  • Windows 7 64 bit computer crashes when loading flash games or during video playback, forcing a manual reboot.

    My computer freezes completely at random times while playing the flash games or watching videos. In this case the mouse and keyboard stop working. If this happens during the video with sound, it makes a noise very loud signal blocked by speakers that continues until I restart the computer. The only way to recover is to manually restart the computer with the reset button.

    I tested different browsers to see if that was the problem, but it will happen in 3 I - IE, FF and Chrome.

    I allows Windows to update itself at will and he has recently updated the video drivers and the wireless mouse and keyboard drivers, but this problem has occurred before and after these updates. There is an update that is still not well, and is an update of Java. I don't know how to fix it or if it even is related.

    I checked the Windows error logs and Windows saves any errors before the Frost, so not obvious (to me) clues it. I tried searching for answers to my question, but forgive me, in this forum the language a bit above my head (Tip: simple answers, please).

    Hello

    Do you have an error message after the failure of the update of Java?

    Try the following steps:

    Step 1: Update the drivers for your chipset.

    Also uninstall and reinstall the display adapter drivers.

    Follow these steps:
    a. open the Manager of devices by clicking the Start button, click Control Panel, click System and security, and then, under system, clicking Device Manager. If you are
    you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
    b. in the list of hardware categories, click on graphics cards and then double-click the device name.
    c. click on the driver tab and click on uninstall, and then follow the instructions. If you are prompted for an administrator password or a confirmation, type the password or provide
    confirmation.
    d. restart the computer.

    Refer to this link for help:
    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    Step 2: Put the computer in a clean boot state.

    Perform a clean boot on your computer to verify if a third-party program or service is the cause of the problem. With the help of the boot, we can isolate the program and disable it.

    Refer to this article for more information:
    How to troubleshoot a problem by performing a clean boot in Windows Vista or Windows 7:
    http://support.Microsoft.com/kb/929135

    Steps to perform a clean boot:
    a. click the ORB start on your desktop
    b. type msconfig in the search box and press ENTER.
    If you are prompted for an administrator password or a confirmation, type the password, or click on continue.
    c. in the general tab, click Selective startup.
    d. under Selective startup, clear the check box load startup items.
    e. click on the Services tab, select the hide all Microsoft Services check box and then click Disable all.
    f. click OK.
    g. When prompted, click on restart.

    NOTE: Please check that you start your computer in normal mode when you are finished troubleshooting. Followstep 7 of the article mentioned above.

    Kind regards
    Afzal Taher-Microsoft Support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Cannot connect two computers for games.

    I am trying to connect two computers for games (Age of Empires 3) purposes, but when is connected the two with a cable ethernet (using a filter at one end adapter) nothing happens, I can't see not his computer on my laptop and it can't see my computer on his. In the game, I see his match but he can't see mine, and when I try to connect to the sound he says impossible to reach. Tried to make it work for days now and I'm at the end of my rope PLEASE HELP!

    As a quick test to go Control Panel - firewall Windows and disabling the firewall to see if it works. If you have a 3rd party software AV Firewall control may be in this control panel software.

    As the two PC is connected back to back without access to a DHCP server, they should award an APIPA IP address that should work. To eliminate the problems addressing assign a static IP on both.

    Properties of the Control Panel - Network and sharing Center - change adapter settings - Rt click on Local Area connection-

    In TCP/IP V4 each assign a static IP 192.168.0.X where x is between 1 and 254 and the 2 PC's are different so for example10 and 20, 100 or 1. The value of 255.255.255.0 subnet mask, save the changes and test the connection.

    If disabling the firewall resolves you can add an exception to the firewall program to allow the age3.exe through the firewall. More information here, as you ar accommodation only play locally just look at the top.

Maybe you are looking for