A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 21

Thread: [RESOLVED] Loading shared object data from another swf movie

  1. #1
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69

    resolved [RESOLVED] Loading shared object data from another swf movie

    Hello!!!

    i have a little time testing the shared object flash include to save data on the user computer. im actually working on a proyect that requires that for its development.

    im using the shared object to save the session of the users logged in on my site, at this part everything is ok. the trouble comes when i try to call the data stored on the shared object from another swf, residing on the same web page. it just brings nothing.

    i have weeks reading and researching everything i could to solve this situation, but anything seems to help me.

    please, can anybody tell me, how can i call the data on a variable saved on a shared object from another swf, (not the original one who creates it)?

    thanks...
    Figure out a way to solve it... i'm not gonna be here forever...

  2. #2
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69
    me again...
    guys, i really need help with this. look this is the code im actually using on both of the movies:

    *this is the code on the first flash movie (the one who creates the cookie):

    var so:SharedObject = SharedObject.getLocal("cookie","/");

    so.data.uname = _root.nombre.text;
    so.flush();



    *this is the code on my second flash movie inserted on the same web page the the first one:

    var so:SharedObject = SharedObject.getLocal("cookie","/");

    if(so.data.uname !== undefined){
    mandacome.auto = so.data.uname;
    }else{
    mandacome.auto = "visitante";
    }

    will apreciate the help.
    Last edited by gerard_pp; 09-23-2007 at 07:01 PM.
    Figure out a way to solve it... i'm not gonna be here forever...

  3. #3
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69
    anyone?...help.....
    Figure out a way to solve it... i'm not gonna be here forever...

  4. #4
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    hi what is mandacome.auto is it a textfield?

    then use mandacome.auto.text

    apart from that your logic looks ok

    (also it should be so.data.uname != undefined instead of so.data.uname !== undefined)
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  5. #5
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69
    Quote Originally Posted by silentweed
    hi what is mandacome.auto is it a textfield?

    then use mandacome.auto.text

    apart from that your logic looks ok

    (also it should be so.data.uname != undefined instead of so.data.uname !== undefined)
    Thank you so much for your reply.

    mandacome.auto is a variable inside a LoadVars object. it means author...

    however, i trace the value of so.data.uname (without the if statement)and it return undefined, even i can retrive that same value on the other flash movie (the number 1). i dont know whats going on with this.

    other thing, why i cant use !== there? can you explain me?
    Figure out a way to solve it... i'm not gonna be here forever...

  6. #6
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69
    help, please...
    Figure out a way to solve it... i'm not gonna be here forever...

  7. #7
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69
    can somebody post a working .fla example of what im trying to do?
    i know its simple, but this definitly dont work for me...
    Figure out a way to solve it... i'm not gonna be here forever...

  8. #8
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    how about uploading your flash files (simplified just to include this SharedObject functionality) ..we can take a look at it then and modify it accordingly
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  9. #9
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69
    well, its a bit complicate, but wish you can help me this way:

    look, this is the first .fla. the one who creates the shared object when you login and stay logged. here is working perfectly...
    Last edited by gerard_pp; 09-27-2007 at 09:54 AM.
    Figure out a way to solve it... i'm not gonna be here forever...

  10. #10
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69
    this is the second .fla. the one who is supossed to load the shared object data. theres a buttom that says "enviar" where is the code that request this information.

    you can download it from here:

    http://www.marttells.com/coments.fla

    thanks....
    Last edited by gerard_pp; 09-24-2007 at 09:21 PM.
    Figure out a way to solve it... i'm not gonna be here forever...

  11. #11
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69
    i will be happy with only a working .fla example of what im doing... can somebody make one for me...
    Figure out a way to solve it... i'm not gonna be here forever...

  12. #12
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69
    any help here?
    Figure out a way to solve it... i'm not gonna be here forever...

  13. #13
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    havent gone through your code...but here's a working example...

    simply enter your name in the text field and click the button...

    then when u run the second swf it will trace out the username u saved..

    hope it helps...
    Last edited by silentweed; 11-22-2007 at 07:14 PM.
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  14. #14
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69
    Hey silentweed,

    thank you so much for the files, but i forgot to mention im on flash mx 2004. (yes, i need an update ).

    can you please export the files to flash 7

    i will apreciate the help!!!
    Figure out a way to solve it... i'm not gonna be here forever...

  15. #15
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69
    hello...
    Figure out a way to solve it... i'm not gonna be here forever...

  16. #16
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69
    Can somebody export the files silentweed post to me on flash 7 (mx 2004).

    ill be thankfull
    Figure out a way to solve it... i'm not gonna be here forever...

  17. #17
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    here u go dude...
    Last edited by silentweed; 11-22-2007 at 07:14 PM.
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  18. #18
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69
    Hey silentweed, you're the man. i love you!!!
    Figure out a way to solve it... i'm not gonna be here forever...

  19. #19
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    easy now lol ... no problem ..glad i could help
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  20. #20
    Gerard_pp
    Join Date
    Aug 2007
    Posts
    69
    I try your code and adapt it to mines. it's working perfectly.

    thanks again!!!
    Figure out a way to solve it... i'm not gonna be here forever...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center