If I guess correctly, you placed the right click detection in a sprite script, attached to the backgroundsprite. Hence, it can only be detected if the mouse is over the background sprite.
Just place the detection in a moviescript (so NOT attached to the backgroundsprite), and it will be detected, no matter where your mouse is.
One more thing: if you use a touchscreen, the intuitive thing is to have an action on touching, not on releasing, so you should make your buttons react on an on mousedown instead. At the Science Center where I work, I always use this policy, as do most developers when working with a touchscreen. If you use it as an end-user, it's just that much more logical.