Author Topic: Screen Save Skeleton (using lines,gif and sound)  (Read 17 times)

Alex

  • Newbie
  • *
  • Posts: 3
    • View Profile
Screen Save Skeleton (using lines,gif and sound)
« on: May 23, 2020, 12:17:06 PM »
Window Background = Black, Res = 255, 255, Size = Max, Max, Border = False

Var AJ Integer, LJ Integer, X1 Integer, X2 Integer, Y1 Integer, Y2 Integer, X3 Integer, Y3 Integer
Var IncX1 Integer, IncX2 Integer, IncX3 Integer, IncY1 Integer, IncY2 Integer,IncY3 Integer,CorLinha Integer
Var RGB1 Integer, RGB2 Integer, RGB3 Integer, Inc1 Integer, Inc2 Integer, Inc3 Integer
Var LM Integer, TC String

Sound xf,"xf.mp3"

AJ = WindowHeight()
LJ = WindowWidth()
X1 = Random(AJ)
X2 = Random(AJ)
X3 = Random(AJ)
Y1 = Random(LJ)
Y2 = Random(LJ)
Y3 = Random(LJ)
IncX1 = 1
IncY1 = 1
IncX2 = 1
IncY2 = 1
IncX3 = 1
IncY3 = 1
RGB1 = Random(255)
RGB2 = Random(255)
RGB3 = Random(255)
Inc1 = 1
Inc2 = 2
Inc3 = 3

AnimatedGif Caveira,"Caveira.gif"
AnimatedGif Caveira.Visible=True
AnimatedGif Caveira.Play
Sound xf.Play
Sound xf.Loop = True

Message " Put the mouse icon in the left higth screen corner to stop"

Wait 100   

While MouseY > 1 And MouseX > 1
 AnimatedGif Caveira.Lin=X2-90
 AnimatedGif Caveira.Col = Y2-10
 TC = KeyTest ("?")
 CorLinha = RGB(RGB1,RGB2,RGB3)
 Line X1, Y1, X2, Y2, CorLinha
 Line X2, Y2, X3, Y3, CorLinha
 X1 += IncX1
 X2 += IncX2
 X3 += IncX3
 Y1 += IncY1
 Y2 += IncY2
 Y3 += IncY3
 If X1 < 0
  X1=0
  IncX1 = Random(2)+1
 EndIf
 If X1 > AJ
  X1=AJ
  IncX1 = IncX1 * (-1)
 EndIf
 If X2 < 0
  X2=0
  IncX2 = Random(2)+1
 EndIf
 If X2 > AJ
  X2=AJ
  IncX2 = IncX2 * (-1)
 EndIf
 If X3 < 0
  X3=0
  IncX3 = Random(2)+1
 EndIf
 If X3 > AJ
  X3=AJ
  IncX3 = IncX3 * (-1)
 EndIf
 If Y1 < 0
  Y1=0
  IncY1 = Random(2)+1
 EndIf
 If Y1 > LJ
   Y1=LJ
  IncY1 = IncY1 * (-1)
 EndIf
 If Y2 < 0
  Y2=0
  IncY2 = Random(2)+1
 EndIf
 If Y2 > LJ
  Y2=LJ
  IncY2 = IncY2 * (-1)
 EndIf
 If Y3 < 0
  Y3=0
  IncY3 = Random(2)+1
 EndIf
 If Y3 > LJ
  Y3=LJ
  IncY3 = IncY3 * (-1)
 EndIf
 RGB1 += Inc1
 RGB2 += Inc2
 RGB3 += Inc3
 If RGB1 <= 0
  RGB1 = 0
  Inc1 = Random(3)+1
  EndIf
 If RGB1 >= 255
  RGB1 = 255
  Inc1 = Random(3)+1
 Inc1 = Inc1 * (-1)
 EndIf
 If RGB2 <= 0
  RGB2 = 0
  Inc2 = Random(3)+1
 EndIf
 If RGB2 >= 255
  RGB2 = 255
  Inc2 = Random(3)+1
  Inc2 = Inc2 * (-1)
 EndIf
 If RGB3 <= 0
  RGB3 = 0
  Inc3 = Random(3)+1
 EndIf
 If RGB3 >= 255
  RGB3 = 255
  Inc3 = Random(3)+1
  Inc3 = Inc3 * (-1)
 EndIf
 Wait 10
Loop
EndWindow