Flasher Archive

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


Subject: FLASH: Placing clips randomly in a movie
From: Joe Fun Gray
Date: Thu, 2 Nov 2000 19:03:53 GMT

Hey all,

I'm working on a game based on "Concentration." What I want to do is
randomly place the game pieces on a grid I've specified. I've been able to
do this correctly. However, I can't figure out a way to keep game pieces
from landing on each other.

Has anyone done anything like this? My random placement code reads as
follows, "cap" being the game piece and "position" being the location:

Set Variable: "placement" = 18
If (placement > 0)
Loop While (placement > 0)
Set Variable: "location" = Random (18)
Set Property ("/cap"&placement, X Position) = GetProperty (
"/position"&location, _x )
Set Property ("/cap"&placement, Y Position) = GetProperty (
"/position"&location, _y )
Set Variable: "placement" = placement - 1
End Loop
End If

All help would be appreciated, thanks!


Joe Fun Gray
The 11th Hour Artist
Art Director - Commercial Services
--------------------
Egreetings Network, Inc.
149 New Montgomery Street
San Francisco, CA 94105
--------------------
415.375.4313

My inferiority complex is not as good as yours.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre

Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save £200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


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