How to. Variable that only valid within a movie clip

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?