Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiscreen effect
#1
Hi
this is a first raw example to get multiscreen effect on the screen.

Code: (Select All)

Const Tot = 4, One = 1, Two = 2, Three = 3
Dim screens(One To Tot) As Long, Movies(One To Three) As Long
If _FileExists("QB64bee.jpeg") Then Movies(One) = _LoadImage("QB64bee.jpeg", 32)
If _FileExists("QB64.jpeg") Then Movies(Two) = _LoadImage("QB64.jpeg", 32)
If _FileExists("QB64pe.jpg") Then Movies(Three) = _LoadImage("QB64pe.jpg", 32)

screens(Tot) = _NewImage(1000, 700, 32)
Screen screens(Tot)
_Title "Multiscreen"
_ScreenMove 1, 1
For c% = 1 To 3
    _PutImage , Movies(c%), screens(Tot)
    _Delay 1
Next c%
Randomize Timer
Dim k(One To Three) As Integer, h(One To Three) As Integer
While InKey$ = ""
    Cls
    _PutImage (20 + k(One), 20 + h(One))-(333, 330), Movies(One), screens(Tot)
    _PutImage (20 + k(Two), 370 + h(Two))-(333, 680), Movies(Two), screens(Tot)
    _PutImage (350 + k(Three), 20 + h(Three))-(980, 680), Movies(Three), screens(Tot)
    _Delay .1
    _Display
    For c% = One To Three
        k(c%) = Int(Rnd * 4)
        h(c%) = Int(Rnd * 5)
    Next c%
Wend
_Delay .5

While InKey$ = ""
    Cls
    _PutImage (20 + k(One), 20 + h(One))-(333, 330), Movies(One), screens(Tot)
    _PutImage (20 + k(Two), 370 + h(Two))-(333, 680), Movies(One), screens(Tot)
    _PutImage (350 + k(Three), 20 + h(Three))-(980, 680), Movies(One), screens(Tot)
    _Delay .1
    _Display
    For c% = One To Three
        k(c%) = Int(Rnd * 4)
        h(c%) = Int(Rnd * 5)
    Next c%
Wend


End

Multiscreen in this videomusic

you can download images from google search or use those posted here.
Happy Coding!


Attached Files Image(s)
           
Reply


Messages In This Thread
Multiscreen effect - by TempodiBasic - 07-08-2024, 03:40 AM
RE: Multiscreen effect - by bplus - 07-08-2024, 11:57 AM
RE: Multiscreen effect - by TempodiBasic - 07-10-2024, 04:47 PM
RE: Multiscreen effect - by bplus - 07-10-2024, 06:05 PM
RE: Multiscreen effect - by TempodiBasic - 07-11-2024, 04:41 PM
RE: Multiscreen effect - by Pete - 07-11-2024, 02:13 AM
RE: Multiscreen effect - by SMcNeill - 07-11-2024, 06:17 PM
RE: Multiscreen effect - by TempodiBasic - 07-20-2024, 06:03 PM



Users browsing this thread: 2 Guest(s)