# How to. Variable that only valid within a movie clip

**URL:** https://forum.kirupa.com/t/how-to-variable-that-only-valid-within-a-movie-clip/107109
**Category:** Uncategorized
**Created:** [April 12, 2004, 12:44pm UTC](https://forum.kirupa.com/t/how-to-variable-that-only-valid-within-a-movie-clip/107109 "2004-04-12T12:44:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![freeman](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/freeman/32/508_2.png) [@freeman](https://forum.kirupa.com/u/freeman)
#### Post date: [April 12, 2004, 12:44pm UTC](https://forum.kirupa.com/t/how-to-variable-that-only-valid-within-a-movie-clip/107109/1 "2004-04-12T12:44:06Z")

</div>

hi, me again ^\_^|||

i’m wondering if i can create a variable, say on the first frame of movie clip “mov1” and assign a value 10 to it. and during the movie clip, it is applied to a function that subtracts the variable by 1 each frame.

if the same code is copied and pasted on to the first frame of another movie clip “mov2”, which is present 5 frames later on the main scene timeline (“mov1” is in the first frame of main scene timeline), if the name of the variable is unchaged, how can i keep the function working in mov1 and not have the value of the variable updated back to 10?
