# Help on initializing variables

**URL:** https://forum.kirupa.com/t/help-on-initializing-variables/191550
**Category:** Uncategorized
**Created:** [June 21, 2006, 7:50am UTC](https://forum.kirupa.com/t/help-on-initializing-variables/191550 "2006-06-21T07:50:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pavanshinde](https://avatars.discourse-cdn.com/v4/letter/p/7ba0ec/32.png) [@pavanshinde](https://forum.kirupa.com/u/pavanshinde)
#### Post date: [June 21, 2006, 7:50am UTC](https://forum.kirupa.com/t/help-on-initializing-variables/191550/1 "2006-06-21T07:50:36Z")

</div>

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
