You'd probably want something like these for accurate 3D movement as this will take into account the x angle as well.
#constant TRUE 1
#constant FALSE 0
disable escapeKey
sync on
sync rate 60
make matrix 1, 100, 100, 100, 100
repeat
rotate camera camera angle x() + mouseMoveY(), camera angle y() + mouseMoveX(), 0
if (upKey() = TRUE)
position camera getNewPositionX(camera position x(), camera angle x(), camera angle y(), 0.1), getNewPositionY(camera position y(), camera angle x(), 0.1), getNewPositionZ(camera position z(), camera angle x(), camera angle y(), 0.1)
endIf
sync
until (escapeKey() = TRUE)
end
function getNewPositionX(_currentX as float, _angleX as float, _angleY as float, _distance as float)
local result as float
result = _currentX + sin(_angleY) * cos(_angleX) * _distance
endFunction result
function getNewPositionY(_currentY as float, _angleX as float, _distance as float)
local result as float
result = _currentY - sin(_angleX) * _distance
endFunction result
function getNewPositionZ(_currentZ as float, _angleX as float, _angleY as float, _distance as float)
local result as float
result = _currentZ + cos(_angleY) * cos(_angleX) * _distance
endFunction result
[Edit] Fixed some stupid mistakes. Spend too much time switching between programming languages! [/Edit]

Previously TEH_CODERER.