hello all
I have a script for a game. It's a board game, and it has a flash game
board with movie clips for the game pieces.
I use movie clips because it is very easy to move them back and forth
using tell target according to their most recent promotion/demotion. Anyway,
everytime a player visits the frame that has the game board on
it, the pieces need to be on their correct spaces.
I wrote a script that does this, but I would like it to work on PREPARE
FRAME. Currently it only works on "enterframe". So for a very split
second you see the pieces scrambling around to get in their correct spots.
Why does this script only work on enterframe and not on prepare frame?
The error I get is that the "_root.marker"&q is an invalid parameter. But it
works using the on enterframe handler.
---------------------------------
on enterframe me
global gturn-- the turn of the current player
global gspot-- a list containing the positions of the player pieces
repeat with i=1 to (gspot.count)--the # of players on the board
q=string(i)
m= gspot.getat(i)--where each piece needs to be, respectively
sprite(2).telltarget("_root.marker"&q)
sprite(2).gotoframe(m)
end repeat
end
on exitframe me
go to the frame
end
--tia
-nj
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]