I am creating a matching game which is already comeplete and functionable. (you know the game you flip over a card or picture and try to find its match if you get it they stay flipped over if not they both go back to the other side. You win when you make all the matches).
However I want to throw a little twist to it. When you get a match I would like a MIAW to open up and play a short video clip. I figured that I could put the video clips into a list and always play the first video in the list and after each time a video is played delete the first item in the list (therefore you don't ever play the same movie twice.)
I have some of the script but I just need a little help finetuning as this script doesn't work.
On startMovie
global gwlist
gwlist = ["info", "ecomm", "net"]
end
on vidrun
gwlist = ["info", "ecomm", "net"]
put gwlist
-- ["info", "ecomm", "net"]
gwlist.deleteat(1)
put gwlist
-- ["net"]
put
put list
-- <Void>
put gwlist
-- ["ecomm", "net"]
put gwlist
-- ["net"]
global ewindow
put gwlist[1]
-- "net"
ecomm = gwlist[1]
put ecomm
-- "net"
wecomm = window(gwlist[1])
open wecomm
gwlist.deleteat(1)
put gwlist
-- []
if gwlist = [] then
Please any help is very much appriciated.
However I want to throw a little twist to it. When you get a match I would like a MIAW to open up and play a short video clip. I figured that I could put the video clips into a list and always play the first video in the list and after each time a video is played delete the first item in the list (therefore you don't ever play the same movie twice.)
I have some of the script but I just need a little help finetuning as this script doesn't work.
On startMovie
global gwlist
gwlist = ["info", "ecomm", "net"]
end
on vidrun
gwlist = ["info", "ecomm", "net"]
put gwlist
-- ["info", "ecomm", "net"]
gwlist.deleteat(1)
put gwlist
-- ["net"]
put
put list
-- <Void>
put gwlist
-- ["ecomm", "net"]
put gwlist
-- ["net"]
global ewindow
put gwlist[1]
-- "net"
ecomm = gwlist[1]
put ecomm
-- "net"
wecomm = window(gwlist[1])
open wecomm
gwlist.deleteat(1)
put gwlist
-- []
if gwlist = [] then
Please any help is very much appriciated.