mobile game (flash lite 1.1) - character not moving correctly
Hi, the game Im working on right now is modify from a tutorial game found on web - http://www.republicofcode.com/tutorials/flash/litegame/
this is the original code:
//Essential Variables
score = 0;
lives = 3;
//Positions the player on the stage.
new_player._x=0;
new_player._y=260;
new_player.myPosition=1;
I try to load variables from external file, and change player character everytime I change the value of variable 'player', so I modify the code to:
external file: &player=1&score=0&lives=3
//Essential Variables
score = Number(score);
lives = Number(lives);
switch(player){
case "1":
loadMovie("player1.swf","new_player");
break;
case "2":
loadMovie("player2.swf","new_player");
break;
case "3":
loadMovie("player3.swf","new_player");
break;
case "4":
loadMovie("player4.swf","new_player");
break;
}
//Positions the player on the stage.
new_player._x=0;
new_player._y=260;
new_player.myPosition=1;
the button code:
on (keyPress "4"){
if (new_player.myPosition != 1){
new_player.myPosition--;
new_player._x-=80;
}
}
on (keyPress "6"){
if (new_player.myPosition != 3){
new_player.myPosition++;
new_player._x+=80;
}
}
variables are loaded successfully but the player is not moving correctly after modified the code. anyone knows wht's the problem?
p/s: loadVariables() is not working in imode phone.. :( how to load external data in a imode phone?