Help with code to change alpha

I want to have a movie with a movie clip that’s just a rectangle (later to be an image). Say it’s instance is called “square_mc”. I’d like the movieclip to behave as a button with a url.

In the main movie, I want the alpha to start out 50% for that movieclip and when the mouse rolls over it to increase to 100%. Then back to 50% when the mouse rolls out.

I was trying to avoid doing a tween and was hoping to learn how to use the terminology for actionScript.

I’ve been reading and trying different tutorials till I’m totally mixed up now. I think this may be simple, but being a newbie is not. GEtting the timelines and references right are a big challenge for me now. Any help will be appreciated but please remember I am struggling with ALL the terminology. Thanks

_root.square_mc.onLoad = function() {
_root.ball._alpha = 50;
_root.square_mc.onRollOver = function() {
_root.ball._alpha = 100;
_root.square_mc.onRollOut = function() {
_root.ball._alpha = 50;
This should help you, put this code on the first frame of your movie.

If you have any questions post again. Hope this helps.


i GOT IT… with your help. Thanks iceman. It took me a while of head scratching. but i got it…

(there was reference to .ball there but soon as i changed it to match my own instance it was fine)

Well… i think i can sleep now :slight_smile: no really… i was STUCK on this… and now back to more learning.

It’s very much like listening to a foreign language and understanding most, but being unable to speak it. that’s what I feel like.

Yeah that was my fault I should have explained that to you about the instance names, I don’t always know how much you know about actionscript so I didn’t want to seem presumtuous. E-mail me if you need help on anything else.
[email protected]

Hope this helps


lmao … i think the ball instance was from the object control movie i posted for help.

you stole my code!

hehe … j/k

fun stuff fun stuff. :slight_smile: