2012年7月17日 星期二

OMG!!!FLASHEFF真是個好東西!!!

http://www.flasheff.com/

import flash.events.IOErrorEvent;
import com.jumpeye.Events.FLASHEFFEvents;

aaa.addEventListener(MouseEvent.CLICK, clickHandler);
//bbb是在原件上那個flashffe的名字
function clickHandler(event:MouseEvent):void {
  bbb.show()
}

2012年7月15日 星期日

progression複習


看目前的sceneid有沒有包在"/index/portfolio"之下
if (new SceneId("/index/portfolio").contains(manager.currentSceneId))

看目前的sceneid是不是"/index/portfolio/p1"
if (manager.destinedSceneId.equals(new SceneId("/index/portfolio/p1")))

在SceneObject下多加子Scene

override protected function atSceneLoad():void
{
addScene(new P1Scene("p1"));
addScene(new P2Scene("p2"));
addScene(new P3Scene("p3"));
}
子scene-  P1Scene.as
init的時候
_cast = new PortfolioCast(0, 2);//帶參數給cast





不用腦FQL語法

自己以及朋友的uid,姓名,以及50x50的頭像連結
SELECT uid, name, pic_square FROM user WHERE uid = me() OR uid IN (SELECT uid2 FROM friend WHERE uid1 = me())



SELECT uid, name, pic_square FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())
http://jasonblog.tw/2011/12/facebook-comments-for-blogger.html


自己的uid 名字小圖
SELECT uid, name, pic_square FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())


某id的相簿名稱相簿id
SELECT name,aid FROM album  WHERE aid IN (SELECT aid  FROM album WHERE owner = 要查的fbid )


fb大張大頭貼
SELECT src_big FROM photo WHERE pid IN (SELECT cover_pid FROM album WHERE owner ='要查的fbid' AND type = 'profile')


檢查是否是粉絲
SELECT page_id FROM page_fan WHERE uid = me() and page_id = '應用程式 ID / API 鑰匙'


撈某一id的大頭
SELECT pic_square FROM user WHERE uid =要查的fbid


http://developers.facebook.com/docs/reference/api/permissions/
允許頁


http://developers.facebook.com/tools/explorer
測試fql
/fql?q="你的fql"


Tag朋友


var _loc_2:* = new Array();//tag框框
_loc_2.push( { tag_uid:_fid, x:100, y:0} );
_loc_2.push( { tag_uid:_uid, x:0, y:0 } );
var _loc_3:Object = new Object();
_loc_3 = {message:_uname+'分享了一個好心情的禮物給 '+_fname+_stringPage._text.text+'轉個念頭轉個彎,一起擁有幸福好心情。'+('@'+_uname), fileName:"filename", image:bitmap, tags:JSON.encode(_loc_2)};
Facebook.api("/" +_uid + "/photos", this.onUploadCompleteHandler, _loc_3, "POST");



tag朋友附連結
"@[100000406220851:Name]"
_loc_5 = {message:"@["+uid+":Name]"+"和"+"@["+fbid+":Name]"+msg, fileName:"filename", image:_bitmap};

Fql排序
Facebook.fqlQuery("SELECT uid, name, pic_square  FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 ='" +uid + "')ORDER BY name", getFriend);