FORUMS: list search recent posts

mouseX problems Actionscript 3.0

COW Forums : Adobe Flash

Respond to this post   •   Return to posts index   •   Read entire thread

Liam King
mouseX problems Actionscript 3.0
on Jun 18, 2011 at 9:37:22 pm

Hi all, I am quite new to actionscript 3.0 - I can do enough to get by on my work, but there are certain things that I'm not sure how to go about doing.

I am creating an interactive timeline that consists of a set of squares on the stage going up the X and Y axis.
The opacity of these squares will increase as you roll over them.

What I want to do is to have the opacity rise fully when you are rolling over them, but if say you are 100px away from a square, then it would rise half way etc.

So what I'm assuming I would need to do is to tell Flash that:
if mouseX > 100px away from movieclip_mc - Opacity is 50%
if mouse < 100px away from movieclip_mc - opacity is 100%

I hope this isn't too vague, sorry if it's jibberish.

Would really appreciate some input on how i might structure the code of this one.

Thanks all,


Posts IndexRead Thread 

Current Message Thread:

© 2018 All Rights Reserved