Understanding asynchronus mode
Posted: Thu Aug 22, 2019 1:35 pm
Hi,
just trying to find out how the async Tag can help me. I have two layers. Both I do move.
Of course, if I dont do asynchronously they are doing it one step after another.
Now I use the async = true tag to make them move simultaniously. But they dont move.
Can I change that?
@DISPLAY {Mode = "Windowed", Width = 960, Height = 610}
EnableLayers()
CreateLayer(0, 0, 300, 300,{Color=#BLUE})
CreateLayer(30, 300, 145, 32,{Color=#GREEN})
WaitKeyDown("Return")
/*Moves Layers not snchronously, but moves*/
MoveLayer(1, #USELAYERPOSITION, #USELAYERPOSITION, #CENTER, #CENTER)
MoveLayer(2, #USELAYERPOSITION, #USELAYERPOSITION, #CENTER, #CENTER)
WaitKeyDown("Return")
/*Moving Layers back*/
MoveLayer(1, #USELAYERPOSITION, #USELAYERPOSITION, 0,0)
MoveLayer(2, #USELAYERPOSITION, #USELAYERPOSITION, 30,300)
WaitKeyDown("Return")
/*Does not move afterall*/
MoveLayer(1, #USELAYERPOSITION, #USELAYERPOSITION, #CENTER, #CENTER,{Async=True})
MoveLayer(2, #USELAYERPOSITION, #USELAYERPOSITION, #CENTER, #CENTER,{Async=True})
WaitKeyDown("Return")
just trying to find out how the async Tag can help me. I have two layers. Both I do move.
Of course, if I dont do asynchronously they are doing it one step after another.
Now I use the async = true tag to make them move simultaniously. But they dont move.
Can I change that?
@DISPLAY {Mode = "Windowed", Width = 960, Height = 610}
EnableLayers()
CreateLayer(0, 0, 300, 300,{Color=#BLUE})
CreateLayer(30, 300, 145, 32,{Color=#GREEN})
WaitKeyDown("Return")
/*Moves Layers not snchronously, but moves*/
MoveLayer(1, #USELAYERPOSITION, #USELAYERPOSITION, #CENTER, #CENTER)
MoveLayer(2, #USELAYERPOSITION, #USELAYERPOSITION, #CENTER, #CENTER)
WaitKeyDown("Return")
/*Moving Layers back*/
MoveLayer(1, #USELAYERPOSITION, #USELAYERPOSITION, 0,0)
MoveLayer(2, #USELAYERPOSITION, #USELAYERPOSITION, 30,300)
WaitKeyDown("Return")
/*Does not move afterall*/
MoveLayer(1, #USELAYERPOSITION, #USELAYERPOSITION, #CENTER, #CENTER,{Async=True})
MoveLayer(2, #USELAYERPOSITION, #USELAYERPOSITION, #CENTER, #CENTER,{Async=True})
WaitKeyDown("Return")