Flasher Archive

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


Subject: FLASH: game scripting question (based on Flash 4 Magic Concentration)
From: Laura Mollett
Date: Tue, 15 Feb 2000 00:27:31 GMT

Hi all,

Well, I'm working on making a mahjong solitaire game (a matching game with
tiles) starting from the basic script in the Flash 4 magic book for
Concentration (Memory, Matching, whatever :). I'm doing pretty well, having
managed to figure out how to get the script to place the tiles where I want
them (there are spaces in Mahjong that don't exist in a concentration
layout) and to know where they are so it can check if a tile is free or not,
etc.

However, I've run into a sort of strange problem. To make the memory game,
all the movie clip symbols are placed on the stage. It doesn't matter where
as the actionscript on that frame then randomly moves them into place
(shuffles and deals). However, in Mahjong, some tiles are on top of others.
The script is happy to put them on top of each other for me, but the movie
sees tiles that were placed on the stage later as "on top" of ones brought
in earlier. (Normally you'd use the "bring to front" command to change this
position.) So they don't look right or can be hidden when they shouldn't be.
(The code IS filling the spaces row by row from bottom to top just fine - I
thought at first I might need to change where it loops, but that's not it.)

Selecting them all and choosing "bring to front" doesn't change this actual
layered position, nor does selecting them all and cutting and pasting them
back in at once. I thought I would put them on different layers, but I don't
know which tiles will be randomly placed on top and layers are flattened in
the swf anyway, and I'm not sure how to explain a "layer" to the code.

I can't seem to find a way to script a command. What I'd like to do is to
have the movie issue the "bring to front" command to each tile after it
moves them into place. Is there any way to do this? Alternatively, is there
a way to have the script actually get the tile from the library and place
it, rather than just moving it? Or is there some way to place them in one
frame and have it move them to another frame changing their 3dimensional
(for lack of a better word) position? Or any way at all to place them all on
the stage at the same time so there isn't any "bring to front"/ "send to
back" option - they're all the same? Or some way to tell the code to put
these on layer1, these on layer2, etc. so they'll be on top when the movie
is published? Or any other idea :)

I'd greatly appreciate any help anyone can give me. This has been tons of
fun up to now, but now I'm getting a little frustrated :)

Thanks again!
Laura Mollett

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


Replies
  Re: FLASH: game scripting question (base, Branden Hall

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