Another boring flash Q
- Started
- Last post
- 12 Responses
- majman
I have a flash movie with MC's that react to the mouse when it is near. when the mouse rolls out the movie area on an html page, the MC's just stop where they are until the mouse rolls back into the movie area. Is there an easy way to have the movie know when the mouse is and is not over the movie area, so that i can have the MC's go back to their original state instead of freezing at an in-between state.
let me know if you have a clue.
thanks!
- mrming0
Make the whole page in flash?
- tparsons0
Put a trigger movie clip or transparent button framed around your swf. When the mouse exits it needs to roll over the trigger and this will tell it to go back to the original state.
- mrming0
tParsons:
Is that going to work? I'm sure it's easy enough for a user to pull the mouse out of a flash movie without going near the sides.
- unknown0
There is a JavaScript for forcing focus on a flash film....you could use a reset function for the objects which is called when the film is not in focus, you should be able to detect this with a JavaScript as well...
- motivdesign0
You might want to leave a few pixels of space around that invisible button in order to be sure that Flash captures the mouseOut event.
- tparsons0
It's easier than you think.
Tell me how a user would exit a swf without going over one of the edges of the swf?
- majman0
i tried the inv button around the movie, but when you move your mouse out fast enough, it skips right over the button.
and unfortunately, the whole page in flash isn't an option.
any more info about the javascript?
somewhere on http://www.nytimes.com there is a GE ad that does this really well. it looks like there is a button the size of the movie though.
thanks for the help so far everybody. keep it coming!
- mrming0
I'm sure you're right - I think I had problems with this because I was trying to do it based on _mouse and _ymouse and flash didn't pick up the changes quickly enough. A button state should work OK though.
- motivdesign0
Are you talking to me?
The only reason I said what I said is that depending on things like processor load and OS hiccups, sometimes mouse input is suspended and/or ignored. This has been an issue since the first rollovers were created in Javascript, and it carries through to flash, especially on Macs.
Can't even count how many peoples' navigation I've busted just by moving the mouse too fast.
- motivdesign0
(my comment was to tparsons, fyi)
- unknown0
onLoad=document.small.focus(); onMouseup=document.small.focus...
this was the script I used but you'll need to adapt it.....
- tparsons0
Motiv
I was talking to the guy that posted this thread.
It is true that if the mouse is moved quickly enough it could miss the mark.