Actionscript 3 saving currentframe location to local hard drive?

前端 未结 1 1738
無奈伤痛
無奈伤痛 2021-01-27 16:20

I asked similar question sometime ago, but I am making new one to be much more specific with my question with some example!

I´ve found this code snippet/tutorial from go

相关标签:
1条回答
  • 2021-01-27 16:35

    In your example it looks like it is already saving something to the shared object:

    savedstuff.data.username = nameField.text;
    

    Just replace it with the movie clip frame value instead (and probably under a different property name other then "username").

    Then on load, there is another line where it loads the data:

    nameField.text = savedstuff.data.username;
    

    It would be the same way, except replace "username" with whatever property name you choose. Then you may have to parse into an int again and use it to restore progress however way you have it set up.

    0 讨论(0)
提交回复
热议问题