
What secret message is that, over the door? There are 2 red buttons...
OK; it's very easy. The message: to open the door, 2 clicks in the first button and 1 click in the second button (only do the click when the pointer symbol changes to a hand).
Many things are similar to the previous lesson. The buttons are movie-clips. The first have the program:
onClipEvent(enterFrame){
this.onPress=function(){
_root.total = _root.total + 47
}
}
We have a general variable: total.
The program of the second button is:
onClipEvent(enterFrame{
this.onPress = function () {
_root.total = _root.total - 4
}
}
Like the previous lesson: the door is an animated movie-clip. He has a program glued to it:
onClipEvent(load){
this.stop();
}
onClipEvent (enterFrame) {
//to run the clip only one time
if(this._currentframe == this._totalframes){
this.stop();
}
if(_root.total==90){
this.play();
_root.dooropen = 1; //another flag
}
}
PREVIOUS LESSON NEXT LESSON T. CONTENTS HOMEPAGE
