dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: How to clear shared object ????

  1. #1
    Junior Member
    Join Date
    Oct 2008
    Posts
    20

    How to clear shared object ????

    Hi,
    I made a shared object whiteboard but I have a stupid problem with removing objects. This is function to clear shared object :

    public function clearShape (so:SharedObject):void {
    trace('clear:', this.name);
    delete so.data[this.name];
    so.setDirty(this.name);
    parent.removeChild(this);
    }

    The strange thing is when I draw couple objects and after that I clear them one by one only the first one is removed. The others are clear only from whiteboard but not from shared objects.
    Any idea

  2. #2
    a.k.a gltovar deadlock32's Avatar
    Join Date
    May 2001
    Location
    Naperville,IL
    Posts
    489
    are you tracing out so.data[this.name] before you delete to to make sure it is the correct thing to delete? ( not just trace out the current name. )

    also you might have to close out the swf after a delete (and re-open). maybe you can call a flush right after a delete just to make sure its upto date.

    (not too familiar with shared objects = P )

  3. #3
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    so.clear();
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

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