-
Snakes and ladders - moving a movie clip using random value from dice
Hi there, im fairly new to Flash so this is a basic question...
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
Any advice appreciated. Thanks.
- Steve
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|