?¨ Flash ?©
- Started
- Last post
- 9 Responses
- bug1
hey people.
will someone tell me the onEnterFrame action i need in order to check whether my mouse is still over a certain area?
And once it's off that area, i want to send it to the next frame...thanks in advance.
- bug10
heh, nice title...wasn't supposed to look like that ^_^
- seventhHope0
onEnterFrame(mouseOver)
- cphunk0
better to not use an enter frame action for this and just return if your hitTest is true for your mouse. if it is do whatever. if it isn't don't do whatever.
- bug10
cphunk, how exactly would i do that?
- kpl0
well...
1. it's onClipEvent (enterFrame), not onEnterFrame.
Unless you are talking about event properties in MX which I will not go into for the sake of the children.
2. It's probably better to make a button within that movie clip with actions that goon (rollOver)
and
on (rollOut)
- cphunk0
try something like this:. only use the onClipEvent(enterFrame) if your variable is tested as true.
onClipEvent (load) {
function CheckMouseOver () {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
return (true);
} else {
return (false);
}
}
function moveNavDown() {
example of some called function
} function moveNavUp() {
another called function
}}
onClipEvent (enterFrame) {
var MouseIsOver = CheckMouseOver();
if (!MouseIsOver) {
moveNavUp();
}
else if(MouseIsOver) {
moveNavDown();
}
}the window's too small. hehe. sorry.
- bug10
thx kpl...
anyone else?
cphunk...
- bug10
thx cphunk...
i'll see what happens ^_^
- kpl0
cphunk looks like he's onto something.
except... i'm not so sure you should declare functions within an onClipEvent (load)...I've always declared them outside of that block, but the effect is probably the same.
and the code is easier for this kind of thing in MX. but i'm too lazy to look it up right now...