2012年12月13日 星期四 by Hu, Ching-Hsiang
step1. add "adt" to path
Terminal:
touch ~/.bash_profile; open ~/.bash_profile
in TextEdit :
PATH="$PATH:/Applications/Adobe Flash Builder 4.6/sdks/4.6.0_AIR3.4/bin"
export PATH
save bash_profile (Command+S)
Terminal:
source ~/.bash_profile
test Version
adt -version
step2. create p12 for AIR
adt -certificate -cn yoururl.com.tw 1024-RSA googleplay.p12 123456
step3. after 2033/10/22
keytool -genkeypair -keystore googleplay.p12 -storetype pkcs12 -validity 8050
ref http://zengrong.net/post/1695.htm
2012年11月7日 星期三 by Hu, Ching-Hsiang
var urls:Dictionary = new Dictionary();
urls[button0_btn] = "url0";
urls[button1_btn] = "url1";
urls[button2_btn] = "url3";
button0_btn.addEventListener(MouseEvent.CLICK, onClick);
button1_btn.addEventListener(MouseEvent.CLICK, onClick);
button2_btn.addEventListener(MouseEvent.CLICK, onClick);
function onClick(evt:MouseEvent):void{
trace(urls[evt.target]);
}
2012年10月3日 星期三 by Hu, Ching-Hsiang
1- removed all the import com.adobe.serialization.json.JSON
2- changed each JSON.decode to JSON.parse
3- changed each JSON.encode to JSON.stringify
4- changed JSONParserror to Error
by Hu, Ching-Hsiang
FacebookDesktop.as
'params.next = "http://static.ak.fbcdn.net/connect/xd_proxy.php#origin="+(appOrigin?appOrigin:"")'
and change it to
'params.next = "http://www.facebook.com/"'
This solved my problem.
2012年8月7日 星期二 by Hu, Ching-Hsiang
2012年5月7日 星期一 by Hu, Ching-Hsiang
2012年5月4日 星期五 by Hu, Ching-Hsiang
2012年3月26日 星期一 by Hu, Ching-Hsiang
var js:URLRequest=new URLRequest();
//js.url="javascript:window.opener.focus()";
js.url="javascript:if(window.opener){window.opener.focus();}else{window.open('http://yoururl.com','name');newWindow.focus(); void(0);}";
navigateToURL(js,'_self');
2012年3月22日 星期四 by Hu, Ching-Hsiang
var my_menu:ContextMenu = new ContextMenu();
my_menu.hideBuiltInItems();
var my_notice = new ContextMenuItem("xxx");
var my_email = new ContextMenuItem("xx@yoururl.com");
var my_copyright = new ContextMenuItem("Copyright");
my_menu.customItems.push(my_notice, my_email, my_copyright);
contextMenu = my_menu;
2012年3月20日 星期二 by Hu, Ching-Hsiang
import com.greensock.TweenLite;
import com.greensock.plugins.*;
import com.greensock.easing.*;
TweenPlugin.activate([VolumePlugin]);
var snd:Sound = new Sound();
var req:URLRequest = new URLRequest(“MySound.mp3″);
snd.load(req);
var trans:SoundTransform;
trans = new SoundTransform(1, 0);
var channel:SoundChannel = snd.play(0, 1, trans);
TweenLite.to(channel, 4, {volume:0});
2012年3月19日 星期一 by Hu, Ching-Hsiang
2012年2月17日 星期五 by Hu, Ching-Hsiang
import flash.events.Event;
import flash.geom.Point;
stage.addEventListener (Event.ENTER_FRAME,enterframe);
function enterframe(e:Event):void{
arrow_mc.rotation=GetAngleOfLineBetweenTwoPoints(new Point(arrow_mc.x,arrow_mc.y),new Point(mouseX,mouseY));
}
function GetAngleOfLineBetweenTwoPoints(p1:Point, p2:Point):Number{
var xDiff:Number= p2.x - p1.x;
var yDiff:Number= p2.y - p1.y;
return Math.atan2(yDiff, xDiff)/Math.PI*180;
}