前段时间我问过类似的问题,但我正在制作一个新的问题,以通过一些例子来更具体地解决我的问题!
我从谷歌搜索中找到了这个代码片段/教程,但我似乎无法弄清楚如何根据我的需要修改它:
// open a local shared object called "myStuff", if there is no such object - create a new one
var savedstuff:SharedObject = SharedObject.getLocal("myStuff");
// manage buttons
btnSave.addEventListener(MouseEvent.CLICK, SaveData);
btnLoad.addEventListener(MouseEvent.CLICK, LoadData);
function SaveData(MouseEvent){
savedstuff.data.username = nameField.text // changes var username in sharedobject
savedstuff.flush(); // saves data on hard drive
}
function LoadData(MouseEvent){
if(savedstuff.size>0){ // checks if there is something saved
nameField.text = savedstuff.data.username} // change field text to username variable
}
// if something was saved before, show it on start
if(savedstuff.size>0){
nameField.text = savedstuff.data.username}
所以我想弄清楚如何做是将用户当前帧保存到本地硬盘驱动器,因为我的闪存进度是基于帧位置的。是的,那么我该如何修改它以存储当前帧的数据?以及电影剪辑中的当前帧如何,如果这会让事情有所不同?
帮助MUUUCH赞赏!谢谢!