all groups > flash actionscript > july 2006 >
You're in the

flash actionscript

group:

Flash Button or Actionscript


Flash Button or Actionscript Freek75
7/30/2006 5:05:15 PM
flash actionscript:
I am trying to create a similar text box area as per the site
http://www.dieselmarketing.com/main.htm
In that when someone rolls the mouse over an area down the side it expands out
to reveal the necessary text. However when they move off of the area I have set
as Hit under Flash's standard button method, the text box doesn't disappear,
they are free to move around the newly expanded text box to perhaps click on
any links within the now revealed text box. Do I need to find some way of
increasing the Hit area or do I need to create a custom movie clip utlising the
onRollOver and onRollOut commands in Actionscript?

please help

iAN
Re: Flash Button or Actionscript kglad
7/30/2006 5:52:57 PM
you can use a button, but you can't control the appearence of the button on
rollOut. you can control the appearence if you use a movieclip button.

with both you may want to trigger (on rollOut) a loop that checks the mouse
position or executes a hitTest. if it stays in the required region or
continues to hit your dropdown do whatever and if not, do something else.
Re: Flash Button or Actionscript butcho
7/30/2006 6:25:38 PM
Hi,

mmm DIESEL website, nice hey! I know them for a while. In fact i work in
front of their office in Montreal. Ok back to the subject, as Kglad suggest, i
think its better to use a loop that do a hitTest. That way you will avoid a lot
of problem that onRollOver/onRollOut (on movieclip) will give.
Re: Flash Button or Actionscript Freek75
7/31/2006 2:19:29 PM
Ok guys, thanks for the responses, i've never used hitTest before so it would
be most helpful if you could suggest some script. i'm not sure how to specify
the region that the mouse needs to be hovering over for the text box to stay
open.
Is it best to add the script on a layer within the movie clip button or by
scripting the actual button itself?



Re: Flash Button or Actionscript kglad
8/1/2006 12:00:00 AM
if the region of your "...expanded text box..." is between xMin, xMax and yMin
and yMax you could use:



yourBtn.onRollOut=function(){
clearInterval(checkI);
checkI=setInterval(checkF,50);
}
function checkF(){
if(this._xmouse<xMin||this._xmouse>xMax||this._ymouse<yMin||this._ymouse>yMax){
clearInterval(checkI);
// do whatever your previous rollout did. ie, expanded text box rolls back.
}
}
Re: Flash Button or Actionscript Freek75
12/7/2006 9:08:23 PM
Thanks for the script, I have only just checked back to see that reply you gave
me in August. I did get a certain way without using Hittest. Check out my post
from yesterday RE: Rollout Button Problems. If you are willing to help i'll
send you the flash file i have which has the basic working button, and my
intended designed one.
Re: Flash Button or Actionscript kglad
12/8/2006 4:21:25 AM
Re: Flash Button or Actionscript Freek75
12/10/2006 4:16:39 PM
thanks.
i think i've figured out why its doing what its doing. In my movie clip I have
input text, so when the cursor hovers over that it is thinking that the cursor
has left the hit area of the button. How can I tell it that the input text that
is within the hit area of the button should be ignored when it comes to
deciding whether the cursor has rolloed out from it.
hope that makes sense.
AddThis Social Bookmark Button