import facebook swc?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

import facebook swc?

slenkar
How would I import the facebook swc file into my project to use?

I tried -swf-lib facebook.swc but it said the file was corrupted
Reply | Threaded
Open this post in threaded view
|

Re: import facebook swc?

postite
unzip your swc (changing swc extension for .zip ) and take the library.swf 
then -swf-li library.swf


 


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: import facebook swc?

slenkar
do you mean -swf-lib ?
I think it worked but now its saying

library.swf@com.facebook.errors.FacebookError:1: character 0 : Class not found : Error
Build halted with errors (haxe.exe).

I tried this code:
com.facebook.commands.users.GetLoggedInUser()

Reply | Threaded
Open this post in threaded view
|

Re: import facebook swc?

Robin Palotai
  Hi,

When dealing with .swc and it doesn't seem willing to work no matter
what, then you may have an easy workaround using some AS3 + mxmlc.
Create a simple AS3 file, embed your haxe swf inside it, link the swf to
it and make the desired APi object accessible from it. Then load the
haxe swf with Loader.loadBinary(), add it to the display list and call
its giveObjToHaxe(the_api_obj) function. From your haxe static main, do:

flash.Lib.current.giveObjToHaxe = myReceiverFunction;

(flash.Lib.current is the flash Boot object here). This is a bit rough
description, but you could get the idea.

BR,
Robin

2010.09.12. 16:16 keltezéssel, slenkar írta:

> do you mean -swf-lib ?
> I think it worked but now its saying
>
> [hidden email]:1: character 0 : Class not
> found : Error
> Build halted with errors (haxe.exe).
>
> I tried this code:
> com.facebook.commands.users.GetLoggedInUser()
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: import facebook swc?

Jan_Flanders

2010.09.12. 16:16 keltezéssel, slenkar írta:
[hidden email]:1: character 0 : Class not found : Error
Build halted with errors (haxe.exe).

Check the change log of 2.06:

http://haxe.org/file/CHANGES.txt

flash9 : renamed flash.Error to flash.errors.Error


Jan

--
haXe - an open source web programming language
http://haxe.org