Cookie problemos

(EDIT: Ive added “/” inside the parantesis of the SharedObjects, so that they will be saved in the same folder wherever it is shared objects are stored)

Ive got some problems with my SharedObjects. The suckers just wont work :frowning:

Im using global variables as SharedObjects, since Im dealing with a lot of separate swf-files loading into different levels of the main.swf.

Anyway, below is an abreviation of the code which should highlight what Im trying to do. Can anybody tell me what Im doing wrong here?


MAIN.SWF (should load BookMark_2.swf and BookMark_3.swf into level 2 and level 3, respectively)

//functiondefinition
function fn_getBookMark(){
global.gl_BookMark = SharedObject.getLocal(“gl_BookMark”, “/”);
loadMovieNum("BookMark
" + gl_BookMark.data.a + “.swf”, 2);
loadMovieNum(“BookMark_” + gl_BookMark.data.b + “.swf”, 3);
}

//button calling fn_getBookMark
fn_getBookMark();

LEVEL_1.SWF (loads into MAIN.SWF on _level1) (should set SharedObjects)

// functiondefinition
function fn_setBookMark(a, b){
_global.gl_BookMark = SharedObject.getLocal(“gl_BookMark”, “/”);
_global.gl_BookMark.data.a = a;
_global.gl_BookMark.data.b = b;

_global.gl_BookMark.flush();
}

//button that calls fn_setBookMark
fn_setBookMark(2, 3);

Problem solved.

If anybody is interested (the number of responses indicates that this is not the case), there was nothing wrong with the code. The problem had to do with a button with limited scope, unable to execute the function.

Yep, silly, huh? So if any moderator wish to delete this post, be my guest :slight_smile: (apparently I couldnt)

danish?

(just checking…)

Close…Swedish :slight_smile:

ah…

but I was CLOSE :slight_smile:

hehe… men lidt dansk forstår du da vel…? ikk?

He, he, lite förstår jag nog.

Men inte mycket - jag hade en dansk flickvän i 1 år en gång, och vi pratade engelska hela tiden :smiley: Så du förstår att jag är trög :wink:

hehe… :slight_smile:

I bet she had the weirdest accent :stuck_out_tongue: otherwise swedes and danes communicate pretty well…

(for all I know)… :stuck_out_tongue:

Well, she was from Köpenhamn, so…I dunno.

But its usually easier for a dane to understand a swede than the other way around, for some reason :slight_smile:

odd…

:smirk: