Flash Menu Help
- Started
- Last post
- 30 Responses
- murmer
I am trying to create a replica of the nav thats used in the site RICHARDSON MAG.
http://www.richardsonmag.com/
The fadeing white.. i got the basics down but it dosen't work perfectly like in the site.. Any suggestions?
Here is the code.. On each of the Movie Clips.onClipEvent (load) {
div = 50;
speed = 3;
}
onClipEvent (enterFrame) {
_alpha += (div-_alpha)/speed;
}
on (rollOver) {
div = 200;
}
on (rollOut) {
div = 50;
}
- murmer0
stump
- jkosoy0
i suggest tracing what the alpha is. i have a feeling you're getting a REALLY REALLY long decimal place, which may slow processor performance and also goof with your alpha settings.
if this is the problem, i suggest rounding the alpha off to the nearest tenth. the user will never be able to see the difference* and it might help things along.
* unless the user is superman.
- murmer0
I shoulda cleared the problem up..
It works properly but it skips buttons occasionalyLike i have a row of 10 that are spaced 5 pixels apart and waving the mouse around every few of the buttons get skipped.
- jkosoy0
hmmmmm. are you using a font or outlines? try breaking apart your text, sometimes it reads outlines slow.
try spacing a little further?
maybe this is a good place to use setInterval instead of onEnterFrame? you might want to give that a shot too.
- jkosoy0
can you post what you've got so I can take a look?
- murmer0
Check it out at
http://www.unidentifiedmedia.com…
- Nematoth0
might even work if you change the framerate to 30 or 60 fps...
I got one here that does a similar kinda thing..
- murmer0
Ok.... Ignorant question but here goes...
Is the standard 12fps pretty much a waste of time? Should I be using flash at 30fps by standard??
- Nematoth0
I usually use 25fps if I use Flash video... or 30- 60 if I'm using any other type of flash stuff..
Prob best to use 25fps as a minimum for all projects.. most computers nowadays won't have a problem displaying that...
- jpea0
12 fps is horrible.
move to something higher. 21, 31, 61, something other than 12.no flash movie should be at the default 12, unless it's a static page, in which case, it was probably better executed in something other than flash then.
- Nematoth0
the movie in my link is 25fps for your info.. and all I'm doing is telling a movie clip to gotoAndPlay() on rollover and on rollout go to a diff frame to and play..
- Nematoth0
just out of interest jpea... why 21, 31 or 61 - what's the one for?
- murmer0
Bumping up to 30 fps does help the problem, but im still getting a missed button ever time i wipe the mouse over them quickly.
That webiste i linked too earlier works flawlessly, Its killing me trying to understand how they managed to take it up a leve and have the Nave work flawlessly.
- jpea0
the theory goes...
there's a supposed bug in flash player for the mac that won't let it play at certain frame rates. The only bypass i've heard of is making it a factor of 10+1. In theory, the PC player will try to play it at say, 31, while the mac one will play it at 30, only 1 frame behind. Other frame rates in between won't play up to speed i guess...
i only use this theory through second-hand knowledge, but it seems to keep things in check cross-platform.on the other note, maybe making it a movie clip that you mouse over instead of a button would work better (that's how the example does it).
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
gotoAndPlay("something");
}
}
something like that
- Nematoth0
cheers for the info jpea..
Will keep that in mind..
- murmer0
cool. i was wondering how to do a proper hit test.. Thanks.
- murmer0
... although using a hit test in my code makes it signifiganly worse :/
- jpea0
k, maybe scratch the hittest idea and use a button. They might be using a button with a useHandCursor = false; action in the movie.
if that's the case, instead of having an alpha action of sorts on each movie clip, have each one be a movie clip with a section that fades in, fades out, etc...
when you do a on (rollOver) just do a gotoAndPlay('fadein') and such.. it might work quicker than an actual alpha.
- murmer0
Definatly no hidden hand cursor, it just feels scripty. or maby thats just the mode im in right now.. Oh well..
On the other hand.. if i put the frame rate to 120 it works 99% of the time....
Gonna try the movie clipped button idea and then go to bed..
- jpea0
i whipped this up if you wanna look at it:
http://www.containedenvironment.…the fla is http://www.containedenvironment.…
it's just a simple implementation, but has no timing problems like you seem to describe.. see if it helps with some insight.