This content has been marked as final.
Show 4 replies
-
1. Re: Menu Problem
abeall Mar 31, 2007 3:16 PM (in response to Bart Cross)I've seen this so often over the years and honestly still don't quite know why this is, except that it only seems to happen with gotoAndPlay(). Somehow the playhead gets stopped, although the goto works. If you stick a trace command inside rollOver and rollOut you'll see that they both always get triggered, it's just that multiple calls to gotoAndPlay, gotoAndStop, play, and stop, can often get tripped up over each other. You might think that it's simply a matter of what gets called last, but I don't think that's the case.
So in short, see if you can restructure the menu in one of the following ways:
1) Use onEnterFrame to manually advance/rewind the playhead instead of using play/stop, like this:
onRollOver = function(){
onEnterFrame = function(){
nextFrame(); // or prevFrame() to rewind
}
}
This is the method I often use, and it always works.
2) Divide your animations up into MovieClips, place them on single frames, and simply call gotoAndStop to those frames on rollOver/Out, and let the nested MovieClip handle the animation
3) Put play() commands on the timeline where goto actions will occur and should play. This will sometimes override any stops that interfere with a gotoAndPlay, usually. -
2. Re: Menu Problem
Bart Cross Mar 31, 2007 5:05 PM (in response to abeall)beally: Thank you for the reply, I was thinking that my mouse was sick or that it had something to do with the flash detector on the page.
The strange thing is that it works fine in the swf preview in Flash, but screws up when you launch the HTML page in a browser.
I will work on your suggestions tomorrow to see if this clears it up. Will get back with an answer or more questions with a posted .fla link. -
3. Re: Menu Problem
abeall Mar 31, 2007 5:20 PM (in response to Bart Cross)> The strange thing is that it works fine in the swf preview in Flash, but screws up
> when you launch the HTML page in a browser.
Interesting, in that case it might be an issue of of the mouse leaving the SWF? Flash does not track the mouse as it it is outside of the SWF. This means that it thinks the mouse never leaves but rather has stopped somewhere in your movie. If you move fast enough, the last place your mouse was in your movie might be over the button, so it thinks it's still over the button. If you are using a small SWF this can particularly be a problem.
There are some awkward workarounds using JavaScript that let you track this, but I don't know any off hand, do a search for "Flash detect mouse leave stage" or similar.
Additionally, Flash 9 and AS3 finally solved this problem by providing the event "mouseLeave" dispatched when the user's mouse leaves the SWF:
http://livedocs.adobe.com/flex/2/langref/flash/display/Stage.html#event:mouseLeave
HTH -
4. Menu Problem
Bart Cross Mar 31, 2007 6:12 PM (in response to abeall)beally: Thank you for your continued interest, even though the flash movie resizes to the full size of the browser window using Stage.scaleMode = "noScale" & a sizeListener to resize certain elements properly, it could possibly be that I need a full background or not use the 'transparent windowless' code.
Hmmmmmm, I'll throw that around tomorrow first, if that is not it, then I'll work with your suggestions.