Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: Random numbers possible?
From: Nigel Randsley-Pena
Date: Fri, 17 Jul 1998 14:43:11 +0100

Jochen Haeberle wrote:
....
> I am looking for a way to have some sort of random numbers in Flash 3. I
> would like to diplay some movieclips at random times and places in my movie.
....


I've done something similar to what you want.
First flash3 doesn't have a PRNG so you have to use Java or Javascript.
As you're asking about Flash3 go with JavaScript.
Have the script generate some PRN's.
Use named instances of the movies you want to appear 'randomly'.
Now for the random time do the following :
At the beginning of the flash movie send a startup call to your Script,
it should do the following :
- Generate one 'random' number for the movie
- Another for a time lapse
Send this output to another function that takes these inputs and waits
for the specified time and then sends a play directive (tell target) to
the flash movie.

That takes care of both randomly selected movieclip and random time.

Now for the random placement. This is possible with DHTML if you want to
go that way but if you want to stay in Flash3 + JavaScript you'll have
to fake it.
Create various named instances of the same movieclip in different areas.

Hope this helps.

------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com


Replies
  Re: Random numbers possible?, Jochen Haeberle

Replies
  Random numbers possible?, Jochen Haeberle

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]