I think I understand what you are asking.  If so, this might help get 
you started (Completely untested):

global gQuestionList
global gCurrentIndex

on startMovie
   gQuestionList = [["720","atq 1"], ["740", "atq 2"], ["760", "atq 3"]]
   gCurrentIndex = 0  -- one before the beginning
end

on nextQ
   gCurrentIndex = gCurrentIndex + 1
   if gCurrentIndex > count(gQuestionList) then  -- we're done
     go "endgame"

   else
     -- Pull out the next question list from the list of lists
     thisQuestionList = gQuestionList[gCurrentIndex]

     -- then choose a random element from that list
     nItems = count(thisQuestionList)
     randomIndex = random(nItems)
     thisLabel = thisQuestionList[randomIndex]
     go thisLabel
   end if
end

Irv


At 7:22 PM +0530 4/6/01, Ravi Garimella wrote:
>Hi List
>I am using the below code to go to a random marker in the list. But 
>now i need to create a random marker and a sequential
>marker in one list.
>Like
>gQuestionList = [["720","atq 1"], ["740", "atq 2"], ["760", "atq 3"]]
>
>Here i need to go to a random marker in the first sublist of ["720" 
>and "atq 1"] and then sequentially go to the next sublist of
>["740", "atq 2]and select a random marker of ["740","atq 2"] like 
>wise till the end of the list. The path is not repeated.
>Any guidance on this will be appreciated
>
>ravi
>
>
>on nextQ
>  global gTwoQList
>  gTwoQlist = ["720", "atq 1"]
>
>  remQs = (gTwoQList.count)
>
>  if remQs = 0 then
>    go "endgame"
>  else
>    thisQnum = random(remQs)
>    go gTwoQlist[thisQnum]
>    deleteAt gTwoQlist, thisQnum
>  end if
>  end
>
>
>
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
>email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo.  Thanks!]

-- 

Lingo / Director / Shockwave development for all occasions.

   (Home-made Lingo cooked up fresh every day just for you.)

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to