This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import flash.display.Loader; | |
import flash.display.Sprite; | |
import flash.events.Event; | |
import flash.net.URLRequest; | |
import flash.text.Font; | |
import flash.text.TextField; | |
import flash.text.TextFieldAutoSize; | |
import flash.text.TextFormat; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private var uploadmanager:UploadManager = UploadManager.Instance; | |
// init | |
initUploaderManager(); | |
private function initUploaderManager():void | |
{ | |
// init uploadmanager | |
// set file filter | |
uploadmanager.ApplyFileFilters([new FileFilter("Images (*.jpg, *.jpeg, *.JPG, *.JPEG, *.png, *.PNG)", "*.jpg;*.jpeg;*.JPG;*.JPEG;*.png;*.PNG")]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!--This Adobe Flex compiler configuration file was generated by a tool.--> | |
<!--Any modifications you make may be lost.--> | |
<flex-config> | |
<output>D:\Data\Data\My documents\mydata\as3_test\font\BuildSWC\.\bin\BuildSWC.swc</output> | |
<target-player>10.1</target-player> | |
<benchmark>false</benchmark> | |
<static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries> | |
<compiler> | |
<define append="true"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package { | |
import flash.display.Sprite; | |
import utility.URLUtil; | |
public class SWCMain extends Sprite{ | |
public function SWCMain(){ | |
// you need to refer to a master class and all other classes you will be using. | |
var a:Array = [URLUtil]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @mxmlc -debug -o=UnicodeRange.swf | |
*/ | |
package | |
{ | |
import flash.display.Sprite; | |
/** | |
* description:get unicode range | |
* use charCodeAt to get numeric Unicode character code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Facebook.api("me/photos", function(result:Object, fail:Object):void | |
{ | |
if (result) { | |
trace("success"); | |
// blah blah blah... | |
} | |
}, | |
{ | |
image:bmp, message:"your message", fileName:'card.jpg', tags:JSON.encode([ { "tag_uid":_friendId, "x":0, "y":0 } ]) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import flash.display.Sprite; | |
import flash.display.StageAlign; | |
import flash.display.StageScaleMode; | |
import flash.events.Event; | |
import starling.core.Starling; | |
[SWF( width="800", height="600", frameRate="60" , backgroundColor="0xCCCCCC")] | |
public class Main extends Sprite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import flash.display.Sprite; | |
import fr.kouma.starling.utils.Stats; | |
import nape.geom.Vec2; | |
import nape.phys.Body; | |
import nape.phys.BodyType; | |
import nape.phys.Material; | |
import nape.shape.Circle; | |
import nape.shape.Polygon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import flash.display.Sprite; | |
import flash.events.TextEvent; | |
import flash.text.TextField; | |
import flash.text.TextFormat; | |
public class BaseInput extends Sprite | |
{ | |
private const MAX_NUM_LINES:uint = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var jpgencoder:JPGEncoder = new JPGEncoder(80); | |
var ba:ByteArray = jpgencoder.encode(Bitmap(_arrPhotos[0].photo).bitmapData); | |
var header:URLRequestHeader = new URLRequestHeader("Content-type", "application/octet-stream"); | |
var request:URLRequest = new URLRequest("http://api.wwwins.com.tw/saveImg.php?category=" + arrSwitchBtnValue[indexSwitch]); | |
var loader:URLLoader = new URLLoader(); | |
request.requestHeaders.push(header); | |
request.method = URLRequestMethod.POST; | |
request.data = ba; | |
loader.load(request); |