This is what I do...
I set vars targetWidth and targetHeight to the "natural size" of the game container (I normally set them to 960x640 which is iPhone 4 size)
Then when I scale the game I set:
offsetX = Std.int(System.stage.width/scale - targetWidth);
offsetY = Std.int(System.stage.height/scale - targetHeight);
Now instead of using event.viewX and event.viewY use this:
scale = FMath.min(System.stage.width / targetWidth, System.stage.height / targetHeight);
var targetX = event.viewX/scale - offsetX/2;
var targetY = event.viewY/scale - offsetY/2;
That gives me the correct values every time, whether the game container has scaled or not.
When I don't want any scaling (i.e. for desktop or devices I know have screen sizes that will not require it) I just set scale to 1, and offsetX and offsetY to 0.
This allows me to deploy on any device, so my games are set not to scale on desktop browsers and on most "standard" size mobile devices i.e. devices like iPhone 4/5, iPad etc. but will fill the screen responsively, but at the same time they will scale on oversize devices like iPhone 6, Samsung Galaxy S4/S5 etc.
Hope that helps.