I am upgrading a code.

this was inside a mc and itworks:

onClipEvent (enterFrame){
if (this.hitTest(_root.backen1.alg01)){
this.moln.gotoAndPlay("go");
s = new Sound();
s.attachSound("alg");
s.start();
trace ("alg");
}
}

I rewrote this and put it outside the mc but I cant get it to work

function pulk1(a,b){
pulka.onEnterFrame = function(){
if (pulka.hitTest(a)){
pulka.moln.gotoAndPlay("go");
s = new Sound();
s.attachSound(b);
s.start();
trace (b);
}
}
}
//////
pulk1(_root.backen1.alg01,"alg");

Can anyone see why?