PDA

View Full Version : search field inside button



.dreamsRmatrix.
February 1st, 2004, 03:10 PM
Hi Everyone.

Finally I've been compelled to post a question.. The last time I did was two years ago (but I was a guest, so I'm a re-virgin). :sen:

I realize that this may be posted somewhere, so if it is, please send me the link. I've been pulling my hair out!! :hr:

Is it possible to create a search button inside of a "button" symbol? aaaaaaand have it only appear on the "over" state of the button?

What I want to do is have an image and then when the mouse hovers over it, it reveals (over the image) a search field where you can then enter information and search.

I don't want the search box to be revealed when the mouse isn't hovering over it. I've tried alpha, everything.

Please tell me there's a way to do this. I'm losing my mind!! I know it's probably simple, but :puzzle:

Thanks for your help.

ScriptFlipper
February 1st, 2004, 04:17 PM
what you could do is that you create a movieclip with two frames in it, the first frame empty and the second with the search button. then you add this code to the main timeline:
(assuming that the mc (holding the button or whatever) is called myClip_mc.

myClip_mc.onRollOver = function () {
this.gotoAndStop(2);
};
myClip_mc.onRollOut = function () {
this.gotoAndStop(1);
};


don't forget to add stop(); in the actions for the two frames inside the mc.

am I unclear, or do you understand?

.dreamsRmatrix.
February 2nd, 2004, 07:39 PM
Thanks For Your Reply!

It makes a lot of sense. I'm gonna try that now! :beam:

.dreamsRmatrix.
February 3rd, 2004, 09:23 AM
It's not working.

I think I'm doing something wrong!!

Can you look at this attached .fla and tell me what's wrong?

ScriptFlipper
February 3rd, 2004, 05:09 PM
Here ya go
I created an "invisible movieclip" with a shape filled with 0% alpha. (check inside the invisible mc).
also the code is changed so that when the mouse is over the invisible movieclip, the searchfield is shown.

good night!
kalliban

.dreamsRmatrix.
February 3rd, 2004, 10:48 PM
Thank You SOOOOOO MUCH!! I can't thank you enough! It's working so well! :thumb:

ScriptFlipper
February 4th, 2004, 02:47 AM
Glad I could help :)
BTW, welcome to the forums! ;)