# Init a number of variables

**URL:** <https://forum.kirupa.com/t/init-a-number-of-variables/230792>\
**Category:** Uncategorized\
**Created:** [June 28, 2007, 11:26pm UTC](https://forum.kirupa.com/t/init-a-number-of-variables/230792 "2007-06-28T23:26:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrickjv](https://avatars.discourse-cdn.com/v4/letter/p/ce7236/32.png) [@patrickjv](https://forum.kirupa.com/u/patrickjv)\
**Post date:** [June 28, 2007, 11:26pm UTC](https://forum.kirupa.com/t/init-a-number-of-variables/230792/1 "2007-06-28T23:26:00Z")

</div>

1. What`s the best way to init a number of variables in AS3. Can`t stick a onClipEvent (load) on the MC itself anymore (no script on MC`s themselves), so any sugestion?

2. Also, I noticed and remember reading that one can`t define (or actually...`override`) one variable in multiple frames of a MC timeline, e.g. in keyframe 1  
var aaa:int;  
Copy-pasting it to keyframe 2 gives an error message.

But it seems that if you define it once and only in first frame (and the MC loops at end of its timeline ) then it`s ok and flash doesn`t give any error when replaying from frame 1 and encountering the statement again.

So this is ok? I won`t encounter any problems if I assume above correct and continue working?

P
