[vet-mm] Actionscript 3.0 Randomise

Travis Parker tparker at sjrc.melb.catholic.edu.au
Wed Dec 3 13:58:41 EST 2008


Guys,

Am currently writing the course for next year's Cert III students. As we
did Actionscript 3.0 this year, I would like to continue with it so as to
not disrupt the students' preparation. I am trying to make a flash
document with a button for interactivity that takes them to a random frame
(We covered interactive flash documents this year that jump to
pre-determined frames).

Here is the code I used to jump between frames (Used for a multi-choice
game):

start_btn.addEventListener(MouseEvent.CLICK, ask);

function ask(event:MouseEvent) :void {
gotoAndPlay("Question");
}

Here is what I have for actionscript 2.0 to jump to random frames:

on (release) {
gotoAndPlay(random ( 25 ));
}

I realise that there is no randomise function in Actionscript 3.0.

Is there anyone out there with a solution to this or should I just not try
it?!?!?

Many thanks and happy holidays

Trav



-- 
This e-mail and any attachments may be confidential. If you are not the 
addressee indicated in this message (or responsible for delivery of the 
message to such person), you may not copy or deliver this message to anyone, 
and you should destroy this message and kindly notify the sender by reply e-
mail. St John's Regional College does not represent or warrant that the 
attached files are free from computer viruses or other defects. The attached 
files are provided, and may only be used, on the basis that the user assumes 
all responsibility for any loss, damage or consequence resulting directly or 
indirectly from the use of the attached files, whether caused by the 
negligence of the sender or not. The liability of St John's Regional College 
is limited in any event to either the resupply of the attached files or the 
cost of having the attached files resupplied. Any representations or opinions 
expressed in this e-mail are those of the individual sender, and not 
necessarily those of St John's Regional College.


More information about the vet-mm mailing list