Variables Help

Well its not only about variables - i would need help on a bit more too :slight_smile:

I made a button that contains a picture. When the mouse is over the button i want it to grow larger (corresponding to the center). This can be achieved by creating different movies for UP DOWN OVER etc.

But the problem is i’ll have to create 30+ of theese buttons, so i would have to make the same animation for each resulting in over 90 small sizing movies. If i cant find a better way to do it i suppose thats the only way :frowning:

I thought that i could use AS to resize the button on OVER and resize it back when the pointer has lost focus on the button. I had used an AS for another item in my flash work file, so i thought i could probably alter the code.


onClipEvent (enterFrame) {
   yMC = getProperty(_root.MC, _y);
   moveMC = _root.yTargetMC - yMC;
   setProperty(_root.MC, _y, yMC + (moveMC/2));
}

Now, the problem is i cant figure out which variable there is my own naming and which is a flash built in ?! The MC confuses me, i had used yTargetMC as my variable name for moving that object.

After looking at the code for some time i figured out i suck, simple :smiley: So was wondering if someone could tell me the very basics of the variable things, especialy what this MC stands for and whats going on?

As of now i’m thinking that i would have to place the button inside another movie for it to be controlled as all the tutorials i’ve seen online want movies to control - not buttons :frowning:

If anyone could show me some way of doing this or point out some simple variables and codes that i could figure out i’d be really gratefull.

Thanks in advance :slight_smile: