A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: shared object

  1. #1
    Junior Member
    Join Date
    Nov 2007
    Posts
    8

    shared object

    I have an flash with with many scenes.
    At the beginning of each scene is an animation.
    You can link back to the intro (main page) from each scene.

    I don't want the animation to play again in each scene if they have already visited so I did:

    var so:SharedObject = SharedObject.getLocal("tailor");
    if (so.data.alreadyVisited == true) {
    gotoAndStop(193, "tailor");

    tailor being the scene.

    PLEASE HELP!!
    ONLY thing to finish then I'm done!!!

  2. #2
    Junior Member
    Join Date
    Nov 2008
    Posts
    23
    You mean something like this?
    PHP Code:
    var so:SharedObject=SharedObject.getLocal("tailor");
    if(
    so.data.alreadyVisited==true){
        
    gotoAndStop(193"tailor");
    }
    else{
        
    so.data.alreadyVisited=true;


  3. #3
    Junior Member
    Join Date
    Nov 2007
    Posts
    8

    Talking Thank you!!!!

    Thank you it worked!!!!

  4. #4
    Junior Member
    Join Date
    Nov 2007
    Posts
    8

    Unhappy More help PLEASE- really didn't work

    OK - so I added it the one scene and it worked.

    Added the code to 5 other scenes (changing the scene name and frame) and now I get for each scene:

    Error1151: A conflict exists with definition so in namespace interval.var

    For each one (scene):
    so:SharedObject = SharedObject.getLocal("promoter");
    var so:SharedObject = SharedObject.getLocal("manager");
    var so:SharedObject = SharedObject.getLocal("magician");
    var so:SharedObject = SharedObject.getLocal("curator");
    var so:SharedObject = SharedObject.getLocal("trainer");

    Any ideas????

Tags for this Thread

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