PDA

View Full Version : Cookie problemos



Danneman
March 1st, 2003, 07:31 PM
(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 :(

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);
----------------

Danneman
March 2nd, 2003, 04:40 PM
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 :) (apparently I couldnt)

eilsoe
March 2nd, 2003, 05:25 PM
danish?

(just checking...)

Danneman
March 3rd, 2003, 02:10 PM
Close...Swedish :)

eilsoe
March 3rd, 2003, 05:17 PM
ah...


but I was CLOSE :)




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

Danneman
March 3rd, 2003, 05:42 PM
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 :D Så du förstår att jag är trög ;)

eilsoe
March 3rd, 2003, 06:09 PM
hehe.. :)


I bet she had the weirdest accent :P otherwise swedes and danes communicate pretty well...

(for all I know)... :P

Danneman
March 4th, 2003, 09:48 AM
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 :)

eilsoe
March 4th, 2003, 03:24 PM
odd...

:smirk: