say i have this code:
var mons001hp:Number=500;
var mons001str:Number=10;
var mons002hp:Number=100;
var mons002str:Number=20;
var currentmons:String=“mons001”;
function currentmonsterrule(){
currentmons1hp=currentmons(which is mons001)+hp;//so that it will be read as mons001hp as variable not word like “mons001hp”
currentmons1str=currentmons+str;
}
//so i want it that if currentmons is mons001 the currentmons1hp will be mons001hp and same for str and if i change the currentmons to “mons002” the value of currentmons1hp and str will be mons002hp and str, and same for mons003,004,005~
but how do i write it?
i using adobe flash cs4 action script 2.0