Reproduced with permission from Penworks Lingo User"s Journal
-- Source Code from the Lingo User"s Journal
-- Copyright (c) 1995 by Penworks Corporation
-----The movie Script-----
on startMovie
set audioList =birth(script "randomListMaker", 5)
set videoList =birth(script "randomListMaker", 5)
repeat with x=1 to 5
repeat with y=1 to 5
put getNextRandom(audioList), "<--Audio Video-->", getNextRandom(videoList)
end repeat
put "-------------------------"
end repeat
on birth me, howMany
set the listSize of me = howMany
generateList(me)
return(me)
end
on getNextRandom me
if the nextItem of me > the listSize of me then
generateList(me)
end if
set thisNumber =getAt(the randomList of me, the nextItem of me)
set the nextItem of me=the nextItem of me+ 1
return(thisNumber)
end
on generateList me
set the randomList of me =[]
repeat with x=1 to the listSize of me
addAt(the randomList of me, random(x),x)
end repeat
set the nextItem of me =1
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA