We are trying to make an AVI player with warnings if the files are not found, the problem is that it repeats the same warning. Anyone have an Idea how to fix this?
Thanks
REM Project: Science Program
REM Created: 3/10/2006 7:27:21 PM
REM
REM ***** Main Source File *****
REM
sync on : sync rate 60
startblue "DC2","583a7e"
progress=createprogressbar((screen width()/2)-100,(screen height()/2)-30,200,50,progress)
setprogressbarrange progress,0,7
setprogressbarpos progress,0
global combo
combo=createcombobox(5,100,100,25,combo)
additem combo,"-------"
additem combo,"Intro"
additem combo,"Law 1"
additem combo,"Law 2"
additem combo,"Law 3"
additem combo,"The End"
additem combo,"-------"
setprogressbarpos progress,1
if file exist("Intro.avi")=1
load animation "Intro.avi",1
else
warningmessage "You don't have Intro.avi file"
endif
setprogressbarpos progress,2
if file exist("Law1.avi")=1
load animation "Law1.avi",2
else
warningmessage "You don't have Law1.avi file"
endif
setprogressbarpos progress,3
if file exist("Law2.avi")=1
load animation "Law2.avi",3
else
warningmessage "You don't have Law2.avi file"
endif
setprogressbarpos progress,4
if file exist("Law3.avi")=1
load animation "Law3.avi",4
else
warningmessage "You don't have Law3.avi file"
endif
setprogressbarpos progress,5
if file exist("Theend.avi")=1
load animation "Theend.avi",5
else
warningmessage "You don't have Theend.avi file"
endif
setprogressbarpos progress,6
setprogressbarpos progress,7
deletegadget progress
x=300
y=300
xs=600
ys=600
setautoupdate combo,1
do
if same<>selecteditem(combo)
warned=0
endif
if selecteditem(combo)=1 and file exist("Intro.avi")=1
play animation 1,x,y,xs,ys
else
stage=1
endif
if warned=0 and stage=1
warningmessage "You don't have Intro File" : warned=1
endif
if selecteditem(combo)=2 and file exist("Law1.avi")=1
play animation 2,x,y,xs,ys
else
stage=2
endif
if warned=0 and stage=2
warningmessage "You don't have Law1 file": warned=1
endif
if selecteditem(combo)=3 and file exist("Law2.avi")=1
play animation 3,x,y,xs,ys
else
stage=3
endif
if warned=0 and stage=3
warningmessage "You don't have Law2 file" : warned=1
endif
if selecteditem(combo)=4 and file exist("Law3.avi")=1
play animation 4,x,y,xs,ys
else
stage=4
endif
if warned=0 and stage=4
warningmessage "You don't have law3 file" : warned=1
endif
if selecteditem(combo)=5 and file exist("Theend.avi")=1
play animation 5,x,y,xs,ys
else
stage=5
endif
if warned=0 and stage=5
warningmessage "You don't have theend file" : warned=1
endif
same=selecteditem(combo)
sync : sync
loop