prova così dalla _root

_root.mymc.onLoad = function(){
foo();
trace(this + " d: " + d)
}