; 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 default fade Level to 1 =( 100%) SpriteFadeLevel spr,1 Next ; limit the program to a max of 75 frames per second SetFPS 75 Do ; Clear the Screen Cls RGB(30,40,70) ; Get the Mouse Pointers Position mX=MouseX() mY=MouseY() ; Update the Sprites TurnSpeed#=1 Sprite=GetFirstSprite() While Sprite Fadelevel#=GetSpriteFadeLevel(Sprite) ; check if the mouse pointer is hitting this sprite If PointHitSpritePixels(mx,my,sprite,1)=false ; Turn This sprite TurnSprite Sprite,TurnSpeed# If FadeLevel#=>1 ; Set this sprites drawmode to rotated SpriteDrawMode Sprite, 2 Else ; Set this sprites drawmode to rotated +fade SpriteDrawMode Sprite, 2+64 SpriteFadeLevel Sprite,FadeLevel#+0.010 EndIf Else ; Set this sprites drawmode to rotated ; with pixel FADE SpriteDrawMode Sprite, 2+64 If FadeLevel#>0.5 FadeLevel#=FadeLevel#-0.010 EndIf ; Set the Fade Level of this sprite to 50% faded out SpriteFadeLevel Sprite, FadeLevel# EndIf ; Bump The Turn Speed TurnSpeed#=TurnSpeed#+0.25 ; Get the NExt Sprite Sprite=GetNextSprite(Sprite) EndWhile ; Draw All The Sprites DrawAllSprites ; Display information Print "Move The Mouse Over Sprites" ; Show the screen Sync ; Loop back to the Do statement to keep program running Loop |