Flash
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Tutorialized Forums2D GraphicsFlash

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
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  
Old May 15th, 2008, 08:45 AM
philipgrahammay philipgrahammay is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 3 philipgrahammay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 32 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old May 16th, 2008, 12:04 PM
EagleVision's Avatar
EagleVision EagleVision is offline
Moderator
Click here for more information. Click here for more information
 
Join Date: Feb 2008
Location: Florida
Posts: 257 EagleVision User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 14 h 3 m 8 sec
Reputation Power: 1
Send a message via MSN to EagleVision
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;
};

Reply With Quote
  #3  
Old May 16th, 2008, 06:11 PM
philipgrahammay philipgrahammay is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 3 philipgrahammay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 32 sec
Reputation Power: 0
Thanks for trying but no luck.

Any other ideas?

Phil

Reply With Quote
  #4  
Old May 17th, 2008, 12:35 PM
EagleVision's Avatar
EagleVision EagleVision is offline
Moderator
Click here for more information. Click here for more information
 
Join Date: Feb 2008
Location: Florida
Posts: 257 EagleVision User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 14 h 3 m 8 sec
Reputation Power: 1
Send a message via MSN to EagleVision
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.

Reply With Quote
  #5  
Old May 17th, 2008, 12:46 PM
philipgrahammay philipgrahammay is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 3 philipgrahammay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 32 sec
Reputation Power: 0
Smile

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

Reply With Quote
  #6  
Old May 17th, 2008, 01:01 PM
EagleVision's Avatar
EagleVision EagleVision is offline
Moderator
Click here for more information. Click here for more information
 
Join Date: Feb 2008
Location: Florida
Posts: 257 EagleVision User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 14 h 3 m 8 sec
Reputation Power: 1
Send a message via MSN to EagleVision
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.

Reply With Quote
Reply

Viewing: Tutorialized Forums2D GraphicsFlash > Saving _currentframe


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway