Ok, I put a stop(); command on frames 1 and 2, and to get rid of the onClipEvent statement I changed the code to this:
this.onEnterFrame = function(){
if(root.wall.hitTest(root.red)){
gotoAndStop(2);
}
}
But I’m getting this error:
Error Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on/onClipEvent handler
this.onEnterFrame = function() {
Total ActionScript Errors: 1 Reported Errors: 1
And when I move the character into the wall nothing happens. Do you know what I’m doing wrong?
|