If statement help please

I know this is possible, but I dont know how.

can some one please show me how to write an if statement so that if the character is in the top quater of the screen then something happens, I can write the then something happens part.

If possible would like it writen on a movie clip, so not in function form.

any help would be great.

uhh yeah rather easy actually…

 onClipEvent(enterFrame){
if(this._y <= oneHalfOfScreen){ /* Replace oneHalfOfScreen with whatever half the height of the screen is...*/
Action Go here
}
}

That’s for the top half the screen, the code goes in the movieclip. For one quarter of the screen just change the number to whatever.

thankyou, I think there is a code ‘function’ thing that is designed for this job, I never thought of doing it like this, thank you very much. Do you want to be listed in the credits?

uhh, go ahead and add my name :player: I hope the game works out for you.