If you've made an interface layer (i'll call it UI) with parallax/scaling set to 0, you can use that to get the right mouse coordinates, and then compare that against the Border size/thickness
Var: Border = 50
If Mouse.x("UI") is greater than ViewportRight("UI")-Border --> scroll right
If Mouse.x("UI") is less than ViewportLeft("UI")+Border --> Scroll left
and do the same for Top and Bottom
edit: ViewportLeft("UI") and ViewportTop("UI") should always be 0
so you can do this instead:
If Mouse.x("UI") is less than Border --> Scroll left
There are other expressions to use instead of ones i've mentioned above, such as: WindowWidth, Mouse.AbsoluteX and CanvasWidth.. but I would avoid these because they can give different results depending on browser/device settings.