Okay here we go, this should simplify things a lot more for you but I'm hoping I kind of got you on the right track. There are a few things I'm uncertain with flash integration on how difficult it may be or which method is the easiest for you, so I'll let you ponder on it a bit.
- All of these variables are determined in the php file for the map functions. This map
file is called functions.php. They will be echoe'd/printed out so that they can easily be displayed in the flash document. For you this will take next to nothing on time as even I can do it. That was the easiest way I figured we could set these variables on just doing a loadvariable function in the flash file to display and output them unless you know of an easier way to do it.
- In the functions php file, any time a person loads a new particular map square. A random integer is defined from 1 to 5. If it is >= 4 then a computer will be shown, otherwise it will display the text "No Wrestler Found". Also there are certain map squares where by default it will set the random integer below 4 to ensure no computer is found. If a computer is found then I run this mysql statement
select name, id, level from computer where maparea = $user[maparea] order by rand() limit 0,1
Now that will return a computer who is on that particular map. This is one thing I need you to decide what is the easiest method. We can either do a load variable and send that computer's id, level, and name over to you unless you know of an easier method. Naturally you display a radio button to the left and then a challenge (submit) button below. If you select and press submit, it sends the data of what computer id you selected to face back to [url removed, login to view] and then ends the flash movie and forwards you to /battle/[url removed, login to view] which is a whole seperate system. We don't have to script the battle system, I've done that already. When that system is done it will reload the flash movie.
The user area is slightly different but same concepts as the computer form. We need to decide how we want to load the variables but this is the mysql statement.
select * from user where mapid=$user[mapid] AND maparea=$user[maparea] AND defensecurrent > 0 limit 0,5
This will be contained in a while () statement loop so I guess we can assign an array to send each particular data bit. This data we'll be loading the username, id, level.
If no user is found on a map square it will state "No Wrestler Found". If the map has user battle disabled, also defined by a variable in the PHP functions file, then regardless of whether a user is there or not it will always display the text No User is Found.
----------- Music On/Off Switch -----------
I haven't found the music I wanted to add to this, but I wanted to add like three songs to be displayed and then loop between each other so I'd like the feature to be built in with really quick crappy songs that I can later replace.
--------- Map Background & Character ------
Here comes the main tomoly. Every map is different, sometimes I have maps that are 8 squares by 8 squares. Other times I have maps that are 10 squares by 30 squares. All squares should be 20 x 20 unless you think advise other. Each individual square counts as a map id. The person moves from one square to another, it sends that variable to a PHP file which updates it to the database. If the map is rather large and it doesn't cover inside that little red text area, then the map should start to scroll right. The map is nothing more then a background image with borders controlling the size. So basically I have a wall around the character each time and I can make the wall closer or farther to the character depending on the map size. Anytime a person moves to a new square, the computer, user, and mapid text must be immediately updated.
I was thinking of making each map a new keyframe so it just loads a new background and then control the borders of the map based on how big/small I want the map and insert a background into it. On the sides of each map in the center portion so very top center, very left center, very right center, and bottom center it should have a place where u can walk your character through to load a new map or keyframe. If the map exists for going down and the character meets the requirements of that map, they should be able to go through and it'll load a new map, if not then it won't load anything and just give a little text error saying "You can't go anywhere yet" or something like that.
I only want you to make a basic map or two, I'll add the other 98. For background just use a color, save it as a background/symbol, and I'll edit them later. For the character that needs to be loaded into this movie, just a stick guy who can move four directions works for me. I'll also update this with a graphic. All backgrounds I'll make. All I need is when the flash movie is first loaded to send the person to the correct map and from there to do error checking as necessary.