| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Dec 2005
Posts: 27
|
First of all I want to say I couldn't find a place to post this and I don't know if it's the right place to post it here, if it's wrong, please move it to the correct place.
I have a weird problem with SharedObjects in Flash Lite 2.0 I know that it works different from the one on PC, and I read articles about it and wrote my code. Here's the code from the dice throwing game I've been working on, it should be right according to the articles on the Internet: Code:
function save() {
_root.so.data.luck = luck;
_root.so.data.skill = skill;
_root.so.data.cheat = cheat;
_root.so.data.money = money;
_root.so.data.bank = bank;
_root.so.data.credits = credits;
_root.so.flush();
}
function loadednow(so:SharedObject) {
trace(so.getSize());
if (so.data.created == "yes") {
trace("a");
_root.luck = so.data.luck;
_root.skill = so.data.skill;
_root.cheat = so.data.cheat;
_root.money = so.data.money;
_root.bank = so.data.bank;
_root.credits = so.data.credits;
} else {
trace("b");
so.data.created = "yes";
_root.luck = Number(50);
_root.skill = Number(50);
_root.cheat = Number(50);
_root.money = Number(1000);
_root.bank = Number(1000);
_root.credits = Number(0);
}
save();
}
SharedObject.addListener("the_gamble", loadednow);
var so:SharedObject = SharedObject.getLocal("the_gamble");
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Flash, JavaScript and the HTML DOM (dHTML) | drZoode | HTML and JavaScript | 10 | 08-21-2008 07:59 PM |
| Flash Lite 1.1 | Um Design | FlashLite / Portable Devices Development | 1 | 12-02-2005 04:57 AM |
| Slide show Fash 4 (Flash Lite) | spl72 | FlashLite / Portable Devices Development | 0 | 08-25-2005 09:03 AM |
| Flash Encrypt 1.2 Released. | SIntrix | General Chat | 14 | 04-21-2005 10:02 PM |
| [Q] Do we need those forums??? | CyanBlue | General Chat | 59 | 07-27-2004 12:13 PM |