Here is an example, of course this is something simple, and probably won't work in your specific case. I just made it as an example of how things should go.
PHP Code:
baseLayer.onEnterArea(){ //onEnterArea() for your container
actionA(); //action that happens onEnterArea()
}
baseLayer.onLeaveArea(){ //onLeaveArea() for your container
actionB(); //action that happens onLeaveArea()
}
baseLayerObjects.onEnterArea(){ //onEnterArea() for the objects in your container
actionA(); //same action used for baseLayer.onEnterArea() this makes sure baseLayer.onLeaveArea() isn't triggered
}
baseLayerObjects.onLeaveArea(){ //onLeaveArea() for the objects in your container
actionA(); //also the same action as baseLayer.onEnterArea() this is just to make sure everything remains at the baseLayer.onEnterArea() state
}
I think as long as you have gotoTarget(); in your actions the above should work fine. I mean, if it's already at the target, another onEnterArea() of the same action will cause nothing to happen (this I know for certain).