A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: SharedObjects...please explain?

  1. #1
    Junior Member
    Join Date
    Aug 2000
    Posts
    17
    Can someone please explain the SharedObjects? I read that it is like a cookie without the javascript that the flash player can write directly, is this correct?

    If so and they are simple text files, I should be able to tell the player to write a ".dingosmoov" file and then read it? or .bobo .whoyadaddy file since it just a simple text file?

    or for that matter save out a playlist to the client machine?

    Please could someone explain.

    Peace,

    dingosmoov
    [Edited by FlashGuru on 03-05-2002 at 08:10 PM]

  2. #2
    Beyond the Sea
    Join Date
    Mar 2000
    Posts
    997

    yeah, I'd like more clarification myself...

    Guru said it can be used in the standalone and in the browser. (See this thread: http://board.flashkit.com/board/show...hreadid=275558 )

    Is it also cross-platform? Will SharedObjects work from a standalone player on a Mac?
    [Edited by FlashGuru on 03-05-2002 at 08:11 PM]

  3. #3
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    Code:
    myobj=SharedObject.getLocal("myobj");
    myobj.data.arr=["a","b","c"]
    myobj.data.obj={a:"a",b:"b",c:"c"}
    myobj.data.bool=false
    myobj.data.num=7
    myobj.flush()

    This will save all the data placed inside of the data object property to a localfile which can then be loaded back into the flash movie using:

    Code:
    myobj=SharedObject.getLocal("myobj");
    [edit]im too hooked on this LocalConnection stuff[/edt]

    [Edited by FlashGuru on 03-05-2002 at 08:09 PM]

  4. #4
    Senior Member
    Join Date
    Sep 2000
    Posts
    298

    Smile sounds great!

    cool I am so happy! Now one more question. will the new projector be able to test for internet connection (like flash jesters netchecker)? for instance, net checker test for net connection then returns a variable telling flash yes or no, which the developer can use to adjust actions from the flash movie. Man I hope so this would fit perfectly with theproject I am working on right now!

    Dreaming of March 15th

  5. #5
    Beyond the Sea
    Join Date
    Mar 2000
    Posts
    997

    ooo, Guru

    Great stuff. I also notice this tidbit:

    myobj.data.obj={a:"a",b:"b",c:"c"}

    Is that an associative array? Am I loopy, or could we not do that in Flash 5? MMM...can't wait to get this thing!

  6. #6
    Junior Member
    Join Date
    Aug 2000
    Posts
    17
    thanks for the response. Sounds great!

    Also, I got the same question as Kraken, is that an associative array type?

    Peace,

    dingosmoov

    P.S.- is it the 15th yet?

  7. #7
    World Kit Vote Holder Abelius's Avatar
    Join Date
    Feb 2002
    Location
    US
    Posts
    963
    FlashGuru:

    Where in heaven do you get the time to reply to all those answers, let alone code so good?
    In one word, my appreciation...

  8. #8
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    This code:

    Code:
    obj={a:"a",b:"b",c:"c"}
    makes an object with three properties:

    Code:
    a="a"
    b="b"
    c="c"
    It just the same as doing:

    Code:
    obj=new Object()
    obj.a="a"
    obj.b="b"
    obj.c="c"
    Objects are in effect associative arrays.

  9. #9
    Senior Member
    Join Date
    Oct 2000
    Posts
    310
    fyi, there is some information on SharedObjects in the

    Macromedia Flash MX Security whitepaper
    http://download.macromedia.com/pub/f...s/security.pdf

    mike chambers

    [email protected]

  10. #10
    Junior Member
    Join Date
    Mar 2002
    Posts
    3
    Kraken - That object or assoc array syntax is indeed valid for Flash 5.

  11. #11
    Junior Member
    Join Date
    Aug 2000
    Posts
    17
    Thanks Mike, that pdf has some great information!

    Peace and Elbow Grease!

  12. #12
    Deathbringer sylkro's Avatar
    Join Date
    Oct 2000
    Location
    London
    Posts
    202
    Hey All,

    Hi Kraken, i posted this on another post called "new methods". http://board.flashkit.com/board/show...hreadid=276725. Check out this site:

    http://www.layer51.com/proto

    under the "Classes" section, you'll see a new Hash class which will allow you to create a real associative array in flash including all the functions to sort, check, assign and delete. I included a couple of functions myself which are also under the classes section, but since i'm not the author of the class, they're not in the same page, just under in the main list.

    To everyone else, if you don't know about this site, check it out, it's amazing.

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