SpiritWebb wrote:
You could get your positions last known position in a few ways i guess - but a smart - less process active way could be that on pressing the logout or save button / whatever - the engine executes a command to get the ships position and translate that over to a php variable which THEN externally saves out to a database. Then the same process back - when the play logs in the flash file searches for the locally stored player variable .php file and automatically asks for the x and y pos of the ship (when last saved) then translates that over. So something like this could be used-
getXPos = this._x;
getYPos = this._y;
where then for example -
$playerXPos = getXPos;
$playerYPos = getYPos;
and to set the ships position back on login -
this._x = $playerXPos; // or getXPos
this._y = $playerYPos; // or getYPos
See how you go with that...
Is this the correct way? Sorry if I sound annoying on this, I just want to make sure I get it right!
Well it looks good, although i don't exactly understand it considering i don't know what variables your moving around there. But i think you are on the right track.
So as long as the actionscript / php scripts execute every time you load and save / exit to send out / obtain player position info as well as all other stats and variables it should be fine.
No, I haven't tried, I found that script online, and plugged in the information you provided. As I do not know how to set this all up...that I am still trying to figure out. I was at work when I posted that code. Im at home now.
Okay no problem - just remember that you have constantly be interchanging the variables from your php / database into the flash file - with xp updates etc. So you really need to design a solid server - client system.
Let me know how things go. I will be curious to see.
I got it all to show, but now my map is all over the place...it places the map down on the far left, not centered...
what size should the map be? The map is centered to the ship, on its right border.
EDIT: When I press the down key and left or right, it quits moving...only up seems to work. I aim down, the map scrolls right. Aim right, map goes up, aim up, map goes left, aim left map goes down.
Any ideas on how i can fix this?
If whats happened is what i think has then first when you make the map make sure its at 2000x2000, thats what my ones set to. The second problem i think would be the direction your ship is facing when you made the symbol, make sure it is facing towards the left and that should make it move properly, the problem with reversing is that my one didnt have that so Il go see if i can get it to do that for you just now
I tried re-doing it, and when it I face North, it acts as if I'm going W. I am attaching my file that I am working on. Maybe you can see what I'm doing wrong? Though the reverse worked, thanks for that. Now if I can only get the rest too work...lol
You might have to right click > save target as: Ship_Problem.fla <--this is the file
Agent wrote:Okay no problem - just remember that you have constantly be interchanging the variables from your php / database into the flash file - with xp updates etc. So you really need to design a solid server - client system.
Let me know how things go. I will be curious to see.
Thats the thing, its going to be ALL browser based...so I dont understand the server/client part. I hear server/client - server runs game, client connects showing the game.
SpiritWebb wrote:
I tried re-doing it, and when it I face North, it acts as if I'm going W. I am attaching my file that I am working on. Maybe you can see what I'm doing wrong? Though the reverse worked, thanks for that. Now if I can only get the rest too work...lol
You might have to right click > save target as: Ship_Problem.fla <--this is the file
Ive had a look and I honestly see nothing wrong with it, Il have a look and see if I can fix it though, could take a minute, I might have to go install Flash MX 2004 and make it for you
This isnt just a gimp mask...This is an S&M gimp mask...
SpiritWebb wrote:
I tried re-doing it, and when it I face North, it acts as if I'm going W. I am attaching my file that I am working on. Maybe you can see what I'm doing wrong? Though the reverse worked, thanks for that. Now if I can only get the rest too work...lol
You might have to right click > save target as: Ship_Problem.fla <--this is the file
Ive had a look and I honestly see nothing wrong with it, Il have a look and see if I can fix it though, could take a minute, I might have to go install Flash MX 2004 and make it for you
Thats cool, I really appreciate it...in the meantime though, I did figure out how to use the mouse. Click and ship moves. Now if only the background moved with the mouse click rather then the keyboard, then I would have to go to the bathroom, haha!!