Flasher Archive

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


Subject: Re: FLASH: Site Check Mahjong Game
From: Laura Mollett
Date: Tue, 29 Feb 2000 01:09:46 GMT

> Very impressive! I am curious to hear about how you wrote the script to
> place the tiles randomly on the stage, particularly in respect to the
> different levels of tiles.
>
> Nice Work!
> -Eric-

Thanks! We-ell... first it takes all the tiles and counts them down, setting
each instance to "false" (not done, so it won't get the same tile later).
Then it goes through and sets a location (but doesn't equate a tile with
that location). So every spot on the board has a position. Then it picks up
a random tile, puts it in the first position, and sets done to "true" so it
can't pick that tile up again. At that point, each tile is duplicated and
actually placed in the spot on the board where it belongs. The spots are
filled in order, assigned by x/y coordinate (some tricky math to get the
"offset" tiles in just the right place) and by depth. That's the reason why
they're duplicated movie clips - so we could assign depth. The visibility of
the original clip is set to false and the duplicate is moved - that was the
trick to get them to line up properly :) The 3d effect is just a matter of
offsetting the x/y coordinates on the tiles by the right amount, having the
script loop through layer by layer rather than the whole board at once. So,
really it chooses the tiles randomly, but places them in order. Hope that
answers your question. Let me know if it doesn't and I'll try again - I'm
learning that people like Marc and Chrissy and Branden and Dorian (and John,
when he's back :) have a special gift for being able to *explain* how to do
things as well as knowing how.

Also thanks again to everyone else who responded. We love the idea of a
"floating window" for the hints button including information on which tiles
match and are planning on including that - thanks Michael! Also really like
the idea of a wind chimes sound and are planning on adding that somewhere
(and changing the annoying one :) thanks to Alan, and fixing it so the
button "unselects" itself as Jason suggested. The "you lose" code will go in
as soon as we figure out how to do it :) - it seems kind of complicated to
us to have a continual loop to know how many matches are left on the board
and how many of those are free. We think we know how, but are afraid it'll
be processor intensive :(. Oh yes and will add the half moons as well as the
quarter moons to things that are supposed to match regardless of direction -
thanks Hal! and have a few other bugs and improvements that have come up to
add also (nothing is ever really done, is it? ;)

Laura

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World’s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California

-Register before Feb 25 and save $200!!-- 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]