buttons that react differently based on their position to the stage
Hi,
I'm a flash newbie and would post in the newbie forums (i've already got some other stuff going in there) but i'm pretty sure this is a complicated AS question!
I've made 4 different versions of a button. The button 'grows' a box with a small bit of info (like an ALT tag or tooltip). The 4 different versions grow in different directions (NE, SE, SW, NW).
They will be placed on a map to draw attention to it's landmarks. The map will be movable which means that the buttons will grow in the correct direction at first, but if the map is moved...
I'm hoping someone can show me a way to have the button load a different MovieClip for it's OVER state based on it's position.
TIA for any help!
PS. Currently i can only get the buttons to a) move with the map but not work, or b) work but not move with the map. I think i've got someone trying to help me sort that out though so don't worry about that unless you want to!
if(mymovieclip_mc._x == some numbered x axis cordinate ){
place what you want it to do here....
}esle(
ect.
}
You will probally want to use >= or <= more than ==. The same is true for your y coordinates too. and you can use a box effect
i.e.
if (mymovieclip_mc._x >= 100 or mymovieclip_mc._x <= 200 and mymovieclip_mc._y >= 100 or mymovieclip_mc._y <= 200){....
I'm not a 100% sureof the syntax, but I know you can sting this stuff out like this. Check your help icon in the actions pannel to find out what the syntax is if I'm wrong on that.
Is there any chance you could apply that to one of the buttons in the .fla i posted? I kind of understand the AS you posted but it would be alot easier if i can see an example.
Thanks for your time but i'm a newbie, and while i can see how the example you posted works, i can't see how to apply the other example to it.
If i can't make some progress on this today then my boss says i have to move on. I'd really like to be able to continue with it!
I especially don't understand how i would put the AS on the button to tell it what direction to move in. I can see the instruction in the AS but where does it go?
I'm not just being lazy, i don't understand and i'm hoping i can learn more from a working example.
PS. I went to look at the stuff you suggested on the macromedia site but it was far beyond me. Thanks for pointing me there anyway.