Need help drag and dropping an object to a target MC inside a MC

Hi guys. I want to drag an item thats on stage onto a target thats inside a movieclip thats on stage. The below code works great if both the item im dragging and the target for it are on the main frame.

var myTargetName:String = "target" + event.target.name;
    var myTarget:DisplayObject = getChildByName(myTargetName);

if (event.target.dropTarget !== null && event.target.dropTarget.parent == myTarget)
{do something}

But i just cant get it to work if the target is inside a movie clip. (in my case, the target is inside a mc called “bg1”. Can anyone help?

thanks