Flash cs6 as2 drag and drop game help
im trying create reset button drag , drop game how this? (as2)
at game's start, assign each draggable object starting position. eg,
function initf(){
for(var i:number=0;i<draggable_objectsa.length;i++){
draggable_objectsa[i].startx=draggable_objectsa[i]._x;
draggable_objectsa[i].starty=draggable_objectsa[i]._y;
}
}
then whenever want reset:
function resetf():void{
for(var i:number=0;i<draggable_objectsa.length;i++){
draggable_objectsa[i]._x=draggable_objectsa[i].startx;
draggable_objectsa[i]._y=draggable_objectsa[i].starty;
}
}
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment