終於還到張圖俾魚 |||

A useful reference

http://developer.apple.com/Mac/library/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265-SW1

I am programing an iphone game with facebook networking , a Chinese app, as the default locale of Facebook iphone API is EN, I have to change it.

1. find the line in the FBLoginDialog.m

static NSString* kLoginURL = @”http://www.facebook.com/login.php”;

change it to login page of hongkong

static NSString* kLoginURL = @”http://zh-hk.facebook.com/login.php”;

or whatever locale you want

2. login your application settings, change “language”

又在朋友的同人誌參一腳, 今次是列支及烏克蘭天地配(畫面屬開發中版本)

這為八模(惡搞o靚模, Hetalia的八位女角)系列的其中一張

其他的先賣個關子啦XD

原本是出本子, 可惜成為上班族的各位同伴沒人能趕及deadline

結果變成postcard啦(逃)

(本子該會在下次RG出現)

同場應該還有之前的列支發售

唔買都泥睇下

檔位: J7 523 World ,CW 29

詳情: http://www.cwhk.org/php2/CwCircleBook.php?apply_id=4346

Interesting game tutorials here

http://www.gotoandplay.it/_articles/

Interesting example here

http://flashscript.ca/set-registration-as3.php

A quite good open source flash video player

http://flowplayer.org/index.html

Doing this, you need as3 core library and specify the library path in  flash preference.
as3 code:
var jpgEncoder:JPGEncoder = new JPGEncoder(85);
var jpgStream:ByteArray = jpgEncoder.encode(bitmapData);
var header:URLRequestHeader = new URLRequestHeader(“Content-type”, “application/octet-stream”); //use binary mode
var jpgURLRequest:URLRequest = new URLRequest(“url.php?parameters…”);
jpgURLRequest.requestHeaders.push(header);
jpgURLRequest.method = URLRequestMethod.POST;
jpgURLRequest.data = jpgStream;
navigateToURL(jpgURLRequest, “_blank”);

var header:URLRequestHeader = new URLRequestHeader(“Content-type”, “application/octet-stream”); var jpgURLRequest:URLRequest = new URLRequest(“http://kurisi3.no-ip.org/test/storejpg/save_jpg.php?name=sketch.jpg”); jpgURLRequest.requestHeaders.push(header); jpgURLRequest.method = URLRequestMethod.POST; jpgURLRequest.data = jpgStream; navigateToURL(jpgURLRequest, “_blank”);

PHP code here

if (isset($GLOBALS["HTTP_RAW_POST_DATA"]))

{

$fname = $_GET["name"];

// get bytearray

$jpgData = $GLOBALS["HTTP_RAW_POST_DATA"];

//save jpg file

$fp = fopen($fname,”w+”);

fwrite($fp, $jpgData);

fclose($fp);

// add headers for download dialog-box

header(‘Content-Type: image/jpeg’);

header(“Content-Disposition: attachment; filename=$fname”);

print $fname;

}

else print “no raw data received”;

Calling FBJS from AS3, we need to use LocalConnection.  Here is the codes

var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;  //get parameters from fb
var connection:LocalConnection = new LocalConnection();
var connectionName:String = String(paramObj["fb_local_connection"]);

callFBJS(‘methodName’,["name","caption","description"]);

function callFBJS(methodName:String, parameters:Array=null):void {
if (connectionName) {
connection.send(connectionName, “callFBJS”, methodName, parameters);
}
}

As I’m using fb:swf, I need to pass fb parameters to swf by attaching they after src:  xxxxx.swf?<?= para ?>, so that flash can get the parameter fb_local_connection, below is the php codes
$para = “?”;
$para .= “fb_sig_locale=”.$_GET["fb_sig_locale"].”&”;
$para .= “fb_sig_in_new_facebook=”.$_GET["fb_sig_in_new_facebook"].”&”;
$para .= “fb_sig_time=”.$_GET["fb_sig_time"].”&”;
$para .= “fb_sig_added=”.$_GET["fb_sig_added"].”&”;
$para .= “fb_sig_profile_update_time=”.$_GET["fb_sig_profile_update_time"].”&”;
$para .= “fb_sig_expires=”.$_GET["fb_sig_expires"].”&”;
$para .= “fb_sig_user=”.$_GET["fb_sig_user"].”&”;
$para .= “fb_sig_session_key=”.$_GET["fb_sig_session_key"].”&”;
$para .= “fb_sig_ss=”.$_GET["fb_sig_ss"].”&”;
$para .= “fb_sig_cookie_sig=”.$_GET["fb_sig_cookie_sig"].”&”;
$para .= “fb_sig_ext_perms=”.$_GET["fb_sig_ext_perms"].”&”;
$para .= “fb_sig_api_key=”.$_GET["fb_sig_api_key"].”&”;
$para .= “fb_sig_app_id=”.$_GET["fb_sig_app_id"].”&”;
$para .= “fb_sig=”.$_GET["fb_sig"];

Categories

Blog Stats

  • 13,327 hits

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 2 other followers

Follow

Get every new post delivered to your Inbox.