flash on 2013-7-2
♥0 |
Line 39 |
Modified 2013-07-02 15:13:01 |
MIT License
archived:2017-03-30 02:46:55
ActionScript3 source code
/**
* Copyright tepe ( http://wonderfl.net/user/tepe )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/gOhN
*/
package {
import flash.text.TextField;
import flash.display.*;
import flash.net.*;
import flash.events.*;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
var so : SharedObject = SharedObject.getLocal("my_data");
if(so){
var obj : Object = so.data;
var sp:Sprite = new Sprite();
sp.graphics.beginFill(0xff0000);
sp.graphics.drawRect(100,100,200,200);
sp.graphics.endFill();
obj.sprite = sp;
obj.num = 123;
obj.str = "書き込みテスト";
obj.ary = ["配","列","テ","ス","ト"];
obj.obj = {data:"オブジェクトテスト"};
if(obj.cnt == null)obj.cnt = 0;
else obj.cnt++;
}
var tf:TextField = new TextField();
addChild(tf);
var str:String = new String();
//str += obj.cnt.toString();
for(var s:String in obj){
if(typeof(obj[s])){
addChild(obj[s]);
}
else{
str += s+"\n";
str += obj[s].toString()+"\n";
}
}
tf.text = str;
tf.height = 400;
}
}
}