Help on initializing variables

Hi Everyone,

I need to initialize variables to a movieclip. so i am doing this with putting this script on the movieclip

{
i = 50;
}

but it giving me error [COLOR=red]"Statement must appear within on/onClipEvent handler{ " [/COLOR]
[COLOR=black][/COLOR]
I have seen this code working on some other examples. i know that if i put

onClipEvent (load) {
i=50;
}

then it works fine. but why the first code creating problem.

PlZ help