Question
Movieclip - Button - Location on stage
Fellow Gurus!
I am using Flash 8.
I rendered some boxes on the stage. One is for a menu and another is for graphics. The idea is to have a picture pop-up in the graphic box whenever one passes a mouse over a button in the menu (which is in the menu box).
I have added movie clips to each button’s mouse-over. The movie clips contain a picture (at least for now). Thus when you pass a mouse over the button, a picture pops up. That is the easy part.
Now, I could simply reposition the movie clip until it appears within the graphic box. My problem is – I have a bunch of buttons and they may or may not be placed in the menu in exact positions. If I were to change a button’s position, the movie clip’s position is relative to the button and not the stage thus it would have to be repositioned as well.
Therefore, the pop-up pictures within the movie clips which are within the buttons must all pop-up in the graphic box regardless of where I place or reposition the buttons.
Let’s say I have the graphic box located at x=500 and y = 120.
Let’s say the button’s name is First_btn.
Let’s say the movie clip’s name is OneTest_mc.
And, I can bring it on stage in order to add an instance name of perhaps TestOne.
Now, I have looked at localToGlobal and globalToLocal. I am not sure which one work for my situation.
I am assuming that I can add AS2 to the movie clip’s (OneTest_mc) timeline – if that is not where it goes - let me know.
I have looked at the various scripts on the Internet and all they do is confuse me, namely because they are rotating graphics, etc. In another words, they complicate the examples. What I need is a script to add to each button/movie clip to make them all place the pop-up graphic in the box regardless of where the button is located.
However, I do not just want a piece of script. I would appreciate some explanation of the code so I can learn from it – not just giving me a fish but teaching me how to fish.
Thanks in advance,
Bill