; Load Bubble Media which is located two folders back from ; this path. BubbleImage=LoadNewImage("..\../Media/bubble_64x64.bmp") PrepareFXImage BUbbleImage ; Create a number of ranomdly positioned sprites For lp=1 To 25 ; Get a random coord on the screen X=Rnd(GetScreenWidth()) Y=Rnd(GetScreenHeight()) ; Create a sprite Spr=NewSprite(X,y,BubbleImage) ; Center this sprites handle CenterSpriteHandle Spr ; Set this sprites drawmode to plain rotated SpriteDrawMode Spr, 2 ; Set the Alpha Add colour to a random RGB colour SpriteAlphaAddColour Spr, RndRGB() Next Do ; Clear the Screen Cls RGB(10,20,40) ; Get the Mouse Pointers Position mX=MouseX() mY=MouseY() ; Update the Sprites TurnSpeed#=1 Sprite=GetFirstSprite() While Sprite ; check if the mouse pointer is hitting this sprite If PointHitSpritePixels(mx,my,sprite,1)=false ; Turn This sprite TurnSprite Sprite,TurnSpeed# ; Set this sprites drawmode to rotated with ; Alpha COlour Addition SpriteDrawMode Sprite, 2 Else ; Set this sprites drawmode to rotated ; with Alpha Colour Addition SpriteDrawMode Sprite, 2+4096 EndIf ; Bump The Turn Speed TurnSpeed#=TurnSpeeed#+1.25 ; Get the NExt Sprite Sprite=GetNextSprite(Sprite) EndWhile ; Draw All The Sprites DrawAllSprites ; Display information Print "Move The Mouse Stop Sprites Rotating" Sync ; Loop back to the Do statement to keep program running loo |