I would like to know how to save and load the X and Y position of all the children of a MovieClip.
I have a project with a save and load button.
They save and load the X and Y position of the MovieClip's child.
save.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler3);
function fl_MouseClickHandler3(event:MouseEvent):void
{
var mySo:SharedObject = SharedObject.getLocal("SaveData");
mySo.data.my_x = mc2.x;
mySo.data.my_y = mc2.y;
mySo.flush();
}
loader.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);
function fl_MouseClickHandler_2(event:MouseEvent):void
{
var mySo:SharedObject = SharedObject.getLocal("SaveData");
mc2.x = mySo.data.my_x;
mc2.y = mySo.data.my_y;
}
This however only saves and loads the last clicked MovieClip child.
How can I change it from only saving and loading the last clicked MovieClip child,
to saving and loading all the MovieClip children?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…