Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Random Random Random 1

Status
Not open for further replies.

darksirius

Technical User
Nov 26, 2005
18
MY
Hi everyone, I'm very very new to Director MX but yet I need to finish a multimedia interactive project. I was wondering if there is a function of how to make question appearing in text mode randomly.It consist of five difference question that would be call randomly and display whether in text popup or sprite. If it can be made then can anyone tell me how to do the script. Thanx
 
Thanx, I got that but, sorry can you please tell me how to cycle between 5 different question, i mean how to set it in the script. I really stuck at this point.
 
This should give you an idea:

[tt]-- Movie script
global gList

on startMovie
gList = ["Q1", "Q2", "Q3", "Q4", "Q5"]
end startMovie

on randomQuestion
questionsCount = gList.count
if not questionsCount then
alert("No more questions left!")
else
randomNum = random(questionsCount)
question = gList[randomNum]
gList.deleteAt(randomNum)
alert(question)
end if
end randomQuestion
--[/tt]

Kenneth Kawamoto
 
Excellent,that really open up mind my. I shall try that as soon as possible. Thank you very much mate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top