[Help] Noob question...manipulate variables from different instances

Hello~!I’m new here and I am self-learning flash…
I don’t know if I can describe this situation very clearly because I’m poor at English…

Here’s the problem:
I suppose this action is on the frame:

var money1:Number = 5000
and this is on the button’s action:

on(release){
[COLOR=Red]money1-=100[/COLOR]
}
What i want to do is when i click the button, the variable money1 (frame’s action) will decrease by 100. Since these actions are on different platform, how do i change the variable money1 from the button’s action?
The highlighted statement is absolutely wrong, but still i have to show this problem i faced.

oh btw, I know that these can be solved by using button.onRelease on frame’s action, but I wanna learn how to manipulate variables from different symbol or instance…so, can anyone help me? I’ll be very grateful…

not a problem here all you have to do is declare your variable like this:
_global.money1 = 500;
that will allow you to use that variable anywhere in your project but you have to call it the same way.
_global.money1 -= 100;
that should solve your problem there good luck.:party:

[quote=cooldude88;2333199]not a problem here all you have to do is declare your variable like this:
_global.money1 = 500;
that will allow you to use that variable anywhere in your project but you have to call it the same way.
_global.money1 -= 100;
that should solve your problem there good luck.:party:[/quote]
Omg, Thanks a lot~~I did it!