If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Snakes and ladders - moving a movie clip using random value from dice

Ok, i am creating a snakes and ladders game and have so far produced the board, the counter and the dice.

Once the dice is rolled it returns a value called 'rollValue'

The counter is a movie clip with the instance name 'counter' and is set up on the timeline with position 1 on the timeline being the first place on the board, position 2 on the timeline being the second place, 3 on the timeline being 3rd position on board etc etc.

What i need to do is move the counter to the position on the timeline (hence moving it on the board) that is returned by the dice value.

I was thinking something like this:

counter.gotoAndStop(rollValue);

or maybe this on the actual counter which would move it the amount of places determined by rollValue:

on (press) {
gotoAndStop(rollValue);
}

Although im not receiving any errors when testing both of these, the counter isn't moving

I simply need the snake to progress along the board each time the dice is rolled rather than go back to the beginning. I am using the getProperty action like this to get the current frame the snake is on on the timeline:

...but when i try to do this with the dice, it just wont disable the dice therefore the dice can be rolled as many times as you want. I just need the dice to be rolled once then disabled until the counter has been clicked and ready for the next move.

Hi, just thoght ide check back on this thread. version 1 of my game is now complete, thanks for everyones help. I plan to integrate a database with high score chart at some point so may return to this thread.

I think this game was moved here, and you could easily get the fla using some decompiler. But it's pointless, as it does not work (see "undefined"-s everywhere ?). And, even if it did, you should look for as3 games, if you want to learn flash at this point of time.