我正在尝试使用actionscript 2.0制作一个隐藏的对象游戏。
当找到所有列出的项目时,我需要帮助移动到另一个框架。任何帮助家伙。我真的不知道从哪里开始。
答案 0 :(得分:0)
stop();
_root.onEnterFrame = function() {
if (objectcount == 5) { //or however many hidden objects you have
play(); //goes to next frame... add the "stop();" code on the next frame to stop it from continuing to move onto the next frames... additionally you could use _root.goToAndStop(2);
}
}
object1.onPress = function() {
trace("object1found");
objectcount ++; //adds "1" to the number of objects found
object1._visible = false; //hides the object this was just found
}
object2.onPress = function() {
trace("object1found");
objectcount ++; //adds "1" to the number of objects found
object2._visible = false; //hides the object this was just found
}
object3.onPress = function() {
trace("object1found");
objectcount ++; //adds "1" to the number of objects found
object3._visible = false; //hides the object this was just found
}
object4.onPress = function() {
trace("object1found");
objectcount ++; //adds "1" to the number of objects found
object4._visible = false; //hides the object this was just found
}
object5.onPress = function() {
trace("object1found");
objectcount ++; //adds "1" to the number of objects found
object5._visible = false; //hides the object this was just found
}
//and so on...