A Flash Developer Resource Site

# Thread: Flash gurus i need help!

1. Hi,

I really need help urgently, so could someone please help me out here, the first game is a slider puzzle, where you have a square with 9 boxes inside them, now at the start of the game 8 of those boxes that are inside form an image and on hitting the start button they get jumbled up and leave one empty space, the objective of the game is to push one of those boxes into the empty area and then put the jumbled up image back together again, so i dont even know how to go about it, can someone tell me or point to a link where i can get the open source (fla)

The second game is an obstacle race, which is a board game, the board starts at position 1 and say ends at 20, there are 20 steps, on throw of a dice the person moves the number of steps that the dice has thrown, and at certain positions on the board there are instructions, like on the 4th step there may be an instruction saying you have landed in a pit so go back 3 steps and things like that, so now how do i make this game happen.

Thanks a lot in advance, and hope someone can help me out there.

2. well the first one i have no idea, but the second could probably be done by makin a button " roll the dice" and having it set the variable _root.dice_num to a random number between 1 and six the code would look like {dice_num = Random(6)+1} then in that same button it would set the value of the variable current_player x and y to the x and y of the player_space + dice_num. the code would look like:
Code:
```on (press) {
_root.dice_num = random(6)+1;
set ("_root.currentplayer"._x, "_root.player_space"+ dice_num);
}```
you would do the same thing for the y of the current_player.
then you would just cycle the current_player as it sees fit increasing it when the player moves or an action(obstacle) happens, then at the maximum number of players, reset back to 1, and make sure that the player_space reflects the last position of the current_player. a complicated method, but it would work.

since i'm pretty sure you are makin this for a client, and since im not gettin paid, i wont post the whole script for you. but this is a stary at least.

PS--i looked at all your posts and it seems that you like to ask for help at the last minute. just thought it was interesting.
[Edited by Anti-Matter0 on 06-26-2001 at 03:08 AM]

3. On the first one, dont really know where to start. I think it could be done by assigning the blocks numbers and then moving thier x and y with actionscript (setProperty), maybe use an array to store the pattern of the blocks...couldn't find an example of this for you, but Im positive I've seen one somewhere..

The second one should be fairly easy (cough), all you have to do is make say 20 frames with your player on a different square each time (do that inside the players own movie clip if theres going to be more than one player). Then just have a random function to give a random value from 1 to 6 (for the dice), use that to tell target the player movie..

e.g. Player 1 rolls a 5, tell the player movie to move on 5 spaces, Now in that frame (5) you could have some special actionscript to do some stuff, or trigger another movie based on what you want to do.

4. well, his idea would work, except you would have to have some type of function(not a tru funcion) that would calculate the next space to go to. or else you would only go up to space six. cuz if dice was 6 goto frame 6. and you couldnt get by that

5. Heh yeah, well I overlooked that.

A variable called playercurrent which holds the value of the current square the player is standing on, then your random dice function just adds to that and then the tell target is relative to the players orig. position..

playercurrent = 2
randomdiceroll = 3
moveplayer = 2+3
Telltarget player=goto frame moveplayer

rise and repeat.

hey, we better stop we're writing the whole thing for him :P

6. I'm pretty good at flash(not a guru mind u!!!) but I wish I could help...

7. For the SLIDER:

Use an ARRAY to hold the "pattern" of which piece is where.
You can determine X,Y based on tile size combined with location in the ARRAY "grid". The spot with NO piece, you would set as being "0" (zero).

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

 » Home » Movies » Tutorials » Submissions » Board » Links » Reviews » Feedback » Gallery » Fonts » The Lounge » Sound Loops » Sound FX » About FK » Sitemap