Delay command don't work well

Mac OSX specific forum
User avatar
LESTROSO
Enthusiast
Enthusiast
Posts: 124
Joined: Thu Nov 03, 2005 12:30 pm
Location: Italy
Contact:

Delay command don't work well

Post by LESTROSO »

Dear Fred, i have found a problem with "Delay" instruction and "Playmovie" because in my game (tic tac toe) don't work fine like windows version.

For example when i push an imagegadget, appear "x" and "0" togegher.....but i want that first appear "x" and then after 2 seconds appear the "0" (to simulate the choice of computer).

Why my code (.pb) in purebasic 3.94 windows xp,work fine and for mac os x version(actually 3.94d) don't work well? In fact in my code there is first
Case 1
If statocella1=0
SetGadgetState(1,UseImage(20))
PlayMovie(16,0)
statocella1=1
click=1
EndIf

First i hear the sound and then appear the image called 20 (the X).

If i put a delay like this:

Case 1
If statocella1=0
SetGadgetState(1,UseImage(20))
Delay(1000)
PlayMovie(16,0)
statocella1=1
click=1
EndIf

First the program make the delay, then the sound and finally change the image,.....why??

For logic first must change the image to 20 (X), then the Delay and then PlayMovie(hear the sound).......


Thanks Fred...so much!!!