| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Saving _currentframe
Dear all,
I am trying to save a movieclip _currentframe property using a shared object (action-script 2). The movie clip is named "score" and i have a "loadButton" and "saveButton". Here is the code i am trying to get to work: mySharedObject = SharedObject.getLocal("savedObject"); saveButton.onRelease = function() {mySharedObject.data.myscore = score._currentframe; mySharedObject.flush();} loadButton.onRelease = function() {score._currentframe = mySharedObject.data.myscore;} Alas something is wrong and i can't get this to work. Any help greatly appreciated Thanks Phil |
|
#2
|
||||
|
||||
|
Hmm...
Maybe you can clean the code a bit'. Might work... mySharedObject = SharedObject.getLocal("savedObject"); saveButton.onRelease = function() { mySharedObject.data.myscore = score._currentframe; mySharedObject.flush(); }; loadButton.onRelease = function() { score._currentframe = mySharedObject.data.myscore; }; |
|
#3
|
|||
|
|||
|
Thanks for trying but no luck.
Any other ideas? Phil |
|
#4
|
||||
|
||||
|
Well, I asked a friend, but he didn't know.
But I still have more people to ask, so as soon as they give me an answer, I'll post it up here. |
|
#5
|
|||
|
|||
|
All is OK - I have cracked it in the end by changing the last line of code to:
loadButton.onRelease = function() {score.gotoAndStop(mySharedObject.data.myscore);} Hope this helps anyone else trying to achieve the same thing i.e. a graphical score rather than plain text |
|
#6
|
||||
|
||||
|
Yay!
I'm happy for you!! Glad you figured it out. PS: We're online at the same time! EDIT: Oops, forgot to mention somthing... You should try posting in other threads and just explorer. I see that you have 3 post, and all in here. Try posting in different places. |
![]() |
| Viewing: Tutorialized Forums > 2D Graphics > Flash > Saving _currentframe |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|