Executing action on certain frame

This is a strange problem …

I have some action on a timeline, on frame 10 (a keyframe). So currently I’m on frame 1, and when I gotoAndPlay frame 10 , the code gets executed.

BUT, when I’m on frame 1, and I gotoandPlay frame 11 , the code does NOT get executed!! It was a shock actually, cuz I never thought flash would behave this way. Or is this something new with Flash/AS3?

If Im jumping to any frame after 10, how can I let that code be executed? Note that im just giving a numbered example, but in reality, I dont know which keyframe has some code.

Thanks guys!