Thanks r0j0hound, that helps a little.
I seem to have run into another issue..
here is my code
behinstProto.tick2 = function ()
{
if (this.zIndex === 1 && (Math.abs(this.pinObject.zindex-this.inst.zindex)>1 || this.pinObject.layer != this.inst.layer ))
{
this.inst.type.plugin.__proto__.acts.ZMoveToObject(1,this.pinObject.type);
}
};
I end up receiving an error message saying..
uncaught typeerror: cannot read property 'index' of undefined.
line 832, 19 or commonace.js
acts.ZMoveToObject = function (where_, obj_)
{
var isafter = (where_ === 0);
if (!obj_)
return;
var other = obj_.getFirstPicked(this);
if (!other || other.uid === this.uid)
return;
// First move to same layer as other object if different
error here>>> if (this.layer.index !== other.layer.index)
{
this.layer.removeFromInstanceList(this, true);
this.layer = other.layer;
other.layer.appendToInstanceList(this, true);
}
this.layer.moveInstanceAdjacent(this, other, isafter);
this.runtime.redraw = true;
};
not sure how to fix this.. maybe I can't call it?
btw, I'm trying to make a pinned object keep the same layer/zindex as the object it is pinned to.