Nov 28

flash?????? sharedobject()???

admin , 23:15 , 游戏开发 , 评论(0) , 引用(0) , 阅读(25297) , Via 本站原创 | |

??????shareobject()??????????????????????????????????????????????????????

Flash???????????????????????????Flash??????????????????????????????????

??SharedObject??

???????SharedObject?????????????????????????????Flash?????????????????????????SharedObject???????????????????????????????????????????.sol?
?????????????????????????????????
1?getLocal(name)??? ?“name”?????????????????
2?flush????? ???????????????
3?data?????????????????????

????????????????????????????
SharedObject.getLocal(objectName [, localPath])
??objectName??????????localPath??????????

// ?????????????
var cookie:Object = SharedObject.getLocal("cookie");

??????????????cookie.sol??????????????100k???????????flash????????????????????????????flash???????SharedObject????????????SharedObject????swf??????localPath ?? "/"?
?win2k? win xp???????C:\Documents and Settings\username\Application Data\Macromedia\Flash Player\#SharedObjects (username???????)

?????????????data?????????“????”????????????????/???????????????????????????????????cookie????? SharedObject???????????SharedObject???????????cookie???????

cookie.data.name = "??";
cookie.data.password = "123456";
cookie.data.rememberPassword = true;

??????????????????????????cookie.flush()?????

????????????????????????

  1. var user_so = sharedobject.getlocal("user"); // ?????????
  2. send_btn.onRelease = function() {
  3. with (user_so) {
  4. data.name = name; //?data???flush?????????????????
  5. flush();
  6. }
  7. };

?????????????????????????????.sol???????????cookies??????

   ???????flash?????????????SharedObject.getLocal()?????path?????????????flash?????????????


Tags: ,
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]