Belzelcior, when I run your code, I get the Advance background, a non-spinning cube with the loading texture, and another cube with the loading texture... that is attached to my mouse cursor!
Very strange.
Oh! I see, you are having the mouse rotate the camera. Got it.
I see you are still creating a second camera. Unless you really need two cameras, it would be better to just use the default camera that is present when you start the program. Otherwise, your program is still showing two cubes, one for each camera. Here is your code without the second camera...
REM Project: Test
REM Created: Tuesday, October 27, 2009
REM ***** Main Source File *****
REM Initialize global variables
global screenWidth as integer
global screenHeight as integer
global screenDepth as integer
global oCube as integer
global aCameraspeed as float
global cMainX as float
global cMainY as float
global cMainZ as float
REM Initialize display and hide mouse
initializeDisplay()
REM Camera variables
cMainX = 40
cMainY = 5
cMainZ = 0
REM Action variables
aCameraspeed = 5
REM Create and set main camera
position camera cMainX,cMainY,cMainZ
REM Object variables
oCube = 1
REM Create objects
make object cube oCube,20
REM Image & texture variables
iBackground = 1
tCube = 2
REM Load images
load image "media/images/iBackground.jpg",iBackground
REM Load textures
load image "media/textures/tCube.jpg",tCube
REM Insert background image
sprite iBackground,0,0,iBackground
size sprite iBackground,screenWidth,screenHeight
REM Remove backdrop and set what draws first
draw sprites first
backdrop off
REM Texturize objects
texture object oCube,tCube
REM Position objects
position object oCube,0,10,80
REM Start main loop
repeat
REM Camera control
rotate camera camera angle x()+mousemovey(),camera angle y()+mousemovex(),0
if keystate(17)=1 then move camera aCameraspeed
if keystate(31)=1 then move camera -aCameraspeed
sync
until escapekey()=1
REM Delete objects and bring back the pointer
endGame()
REM Functions
function initializeDisplay()
cls : sync on : sync rate 30
screenWidth = screen width()
screenHeight = screen height()
screenDepth = screen depth()
set display mode screenWidth,screenHeight,screenDepth
hide mouse
endfunction
function endGame()
delete object oCube
show mouse
endfunction
Now, with the above code, the camera rotates, not the cube, so as the camera turns, the cube is lost from view. I'm not sure if that is what you intended, but the code is working as it should.
If you absolutely MUST create that second camera, you can effectively "turn off" the default camera zero by pointing it away from the cube, or shrinking its view to 0,0,0,0.