# Anyone See the Problem?

**URL:** <https://forum.kirupa.com/t/anyone-see-the-problem/223870>\
**Category:** Uncategorized\
**Created:** [April 26, 2007, 10:23am UTC](https://forum.kirupa.com/t/anyone-see-the-problem/223870 "2007-04-26T10:23:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brionace](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/brionace/32/3130_2.png) [@brionace](https://forum.kirupa.com/u/brionace)\
**Post date:** [April 26, 2007, 10:23am UTC](https://forum.kirupa.com/t/anyone-see-the-problem/223870/1 "2007-04-26T10:23:43Z")

</div>

Hi everyone,  
My code below is used to move cubes on stage using mouse but sofar it simply isnt working. the code seems correct and ive spent days just trying to figure it out, but no luck:( So wondering, whether an outside view could spot the problem? any help appreciated.  
Thnx.

```auto
//connect, create a shared object, and connect it 
stop();
user_nc = new NetConnection();
user_nc.onStatus = function(info) {
    trace("Level: " + info.level + " Code: " + info.code);
};
user_nc.connect("rtmp://localhost/cubes");
cube_so = SharedObject.getRemote("breaching", user_nc.uri, false);
cube_so.connect(user_nc);
//let all the cubes be equal 
for (i; i <= 26; i++) {
    clickedCube = eval("_root.cube" + i);
    //Add a name property to each cube
    clickedCube.name = "cube" + i;
    clickedCube.onPress = function() {
        //move the cube 
        this.onMouseMove = function() {
            cube_so.data[this.name].x = this._x = _root._xmouse;
            cube_so.data[this.name].y = this._y = _root._ymouse;
        };
    };
    //on release let go of the cube 
    clickedCube.onRelease = clickedCube.onReleaseOutside = function () {
        if (this.hitTest(_root.receptor)) {
            this.gotoAndStop(this._currentframe + 1);
        }
        delete this.onMouseMove;
    };
}
//update users cubes 
cube_so.onSync = function(list) {
    clickedCube._x = cube_so.data[list[0].name].x;
    clickedCube._y = cube_so.data[list[0].name].y;
};

```
