CDXL not work at ant case ?(would be more amiga
As for video when user closes is just exiting last until loop
So put a playvideo under this last exppression
Code: Select all
Function p_HandlerFunc(msg)
Switch(msg.action)
Case "CloseWindow":
SetDisplayAttributes({Width = 640, Height = 360, Borderless = True})
SetVideoSize(2,640,360)
PlayVideo(2)
While IsVideoPlaying(2)
Wait(1)
Wend
CloseVideo(2)
End
Case "OnKeyDown":
If msg.key = "ESC" Then End
EndSwitch
EndFunction
InstallEventHandler({CloseWindow = p_HandlerFunc,
OnKeyDown = p_HandlerFunc})
Repeat
;LOAD FIRST IMAGE
DisplayBrushFX(1, 0, 0, {type = #CROSSFADE, speed = #NORMALSPEED})
WaitLeftMouse
;SECOND
DisplayBrushFX(2, 0, 0, {type = #CROSSFADE, speed = #FASTSPEED})
WaitLeftMouse
Forever
Code: Select all
Function p_HandlerFunc(msg)
Switch(msg.action)
Case "CloseWindow":
DebugPrint("last video")
End
Case "OnMouseUp":
displayfx=displayfx+1
Case "OnKeyDown":
If msg.key = "ESC" Then End
EndSwitch
EndFunction
InstallEventHandler({ CloseWindow = p_HandlerFunc,
OnKeyDown = p_HandlerFunc,
OnMouseUp = p_HandlerFunc })
DisplayFX = 1 ; initiate a global var
Repeat
Switch(DisplayFX)
Case 1:
;DisplayBrushFX(1, 0, 0, {type = #CROSSFADE, speed = #NORMALSPEED})
DebugPrint("fisrt")
Case 2:
;DisplayBrushFX(2, 0, 0, {type = #CROSSFADE, speed = #FASTSPEED})
DebugPrint("second")
EndSwitch
CheckEvent()
Wait(1)
Forever
Code: Select all
if displayfx > 8
displayfx = 1
endif
Code: Select all
PlayVideo(1)
While IsVideoPlaying(1)
Wait(1)
Wend
CloseVideo(1)
Code: Select all
if IsVideoPlaying(1)=False
displayfx = displayfx+1
if displayfx > 8
displayfx = 1
endif
endif