// Center point is p1; angle returned in radians
function findAngle(p0:Point,p1:Point,p2:Point) {
var a = Math.pow(p1.x-p0.x,2) + Math.pow(p1.y-p0.y,2),
b = Math.pow(p1.x-p2.x,2) + Math.pow(p1.y-p2.y,2),
c = Math.pow(p2.x-p0.x,2) + Math.pow(p2.y-p0.y,2);
return Math.acos( (a+b-c) / Math.sqrt(4*a*b) );
}
as3 get radians between three point
2014年7月29日 星期二 by Hu, Ching-Hsiang
Filed under
having
0
意見
as3 radians to degrees
by Hu, Ching-Hsiang
var degrees:Number = radians*180/Math.PI ;
Filed under
having
0
意見
AS3 String to Boolean
2013年12月4日 星期三 by Hu, Ching-Hsiang
var boolValue:Boolean = (boolString == "true") ? true : false;
just one line! I like it!
Filed under
having
0
意見
old mac install win64bit
2013年4月28日 星期日 by Hu, Ching-Hsiang
http://www.iruberleet.org/2011/10/12/fixing-select-cd-rom-boot-type-when-installing-64bit-windows/
Filed under
having
0
意見
air for mobile device keep awake
2013年4月23日 星期二 by Hu, Ching-Hsiang
it’s very easy to make the device stay awake. First you need to enable the following two permissions in the -app.xml file:
<uses-permission android:name="android.permission.WAKE_LOCK">
<uses-permission android:name="android.permission.DISABLE_KEYGUARD">
</uses-permission></uses-permission>
Then you need to use this simple line of code anytime you want to keep the device awake:
NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;
To enable the device to go to sleep again:
NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.NORMAL;
Filed under
having
0
意見
as3 text to speech
2013年3月27日 星期三 by Hu, Ching-Hsiang
var req:URLRequest= new URLRequest( "http://translate.google.com/translate_tts
?ie=UTF-8&tl=zh-TW&q=" + encodeURI("中文"));
var snd:Sound = new Sound(req);
snd.play();
Filed under
having
0
意見
Adobe AIR to Google Play on Mac
2012年12月13日 星期四 by Hu, Ching-Hsiang
xxx
Loading
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
Filed under
having
0
意見
訂閱:
文章 (Atom)
