A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: retrieving data from a sharedobject...

  1. #1
    aidanmack.co.uk
    Join Date
    Dec 2001
    Location
    York, UK
    Posts
    400

    retrieving data from a sharedobject...

    Hi guys,
    im new to this sharedobject lark..
    I have some code so far which i believe puts a bunch of variables into a sharedobject for safe keeping on the press of a button.

    Code:
    testb.onPress = function() {
    	trace("bosh")
    so = SharedObject.getLocal("test");
    so.data.test1 = 12;
    so.data.test2 = 13
    so.data.test3 = 14
    so.flush();
    
    };
    I just dont no how to get them back.
    is their away of getting them to display in say a dynamic text field direct from the shared object?

    thanks for any help

    cheers
    aidan.

  2. #2
    Senior Member
    Join Date
    Jun 2002
    Posts
    400
    Create a dynamicText box and try this.
    Code:
    dynamicText_txt.text = so.data.test1;
    You may need a button or something else.
    Code:
    my_btn.onPress = function(){
    dynamicText_txt.text = so.data.test1;
    }
    Last edited by LayneSmith; 05-03-2007 at 09:50 AM.

  3. #3
    aidanmack.co.uk
    Join Date
    Dec 2001
    Location
    York, UK
    Posts
    400
    Cheers Layne, i have it all working now.
    thanks.

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