exitFrame enter random frame or marker

Date: Mon Feb  8 13:16:30 MST 1999
From: Jerry Cornelius <multiverse@hotmail.com>
Subject: exitFrame enter random frame or marker
Although I didn't write any of the code below, and without the permission of those who submitted these as solutions to my quandry, I felt I should make those available here.

The object was to click on an object, which takes you to a fade of the environment. At the last frame of the fade, I needed a simple computation to choose what the next frame would be. It had to choose 1 of 20. When you click on the resulting frame, it takes you back to the beginning frame for a loop completion and a chance to get another random frame.

Enjoy!

Object: Choose a random frame (or marker) from an exitFrame

Source: Newsgroup: Randomosity: pick a frame, any frame

Author: Jerry Cornelius, berry@web-x.com, http://www.web-x.com

Visit Web-X for all your WWW, Internet and eCommerce needs.

*********************************************************

Example 1 - author: K.I.Prasad ()

*********************************************************

on exitFrame me
    put random(20) into x
    go to frame (229 + x) --or play frame
  end exitFrame

*********************************************************

Example 2 - author: Rob Dillon (http://www.ddg-designs.com)

*********************************************************

on exitFrame me
  go to frame (random(20) + 229)
end

*********************************************************

Example 3 - author: Curtiss (http://www.desertisle.com/curtiss/)

*********************************************************

put random(20) + 229 into myFrame
play frame myFrame

*********************************************************

Example 4 - author: Darrin Hurd ()

*********************************************************

On ExitFrame
    go to frame random(20)+230
end

this should round to the closest Integer when it jusmps to a frame.

or you could create a text member structured as a list of pages you want to go to ie

230
231
234
237
238
239
240

call it "RandPages"

and then

On ExitFrame
    go to frame  integer(line  (random(numlines of member "RandPages")+1) of
member "RandPages")
end

Hope this works, it is just Pseudo Code I am just writing from memory, as dont have director at home.
*****************************************************************

I hope someone somewhere finds this tip helpful. Please email me at multiverse@hotmail.com to let me know if it was helpful.

Stay Blanaced!