|When clicking button.it flashes up state|
When I click my button it flashes the up state of the button.
I'm using CS4 with AS3.
I have my text link set as a button.
UP text is white
OVER,DOWN,HIT text is red
Everytime I click the button it flashes white for 1/4 second, then it goes back to red.
It seems like it goes back to the UP state for a bit then goes back to DOWN. This happens everytime I try clicking on the button. All my other buttons are exactly the same. The font is all aligned and position correctly.
Try changing your over and down states to something else, at least temporarily, you will see what's happening. My guess is when you release from your click, you are still over the button, so it's showing the over state of the button, which is? Red. It's immediately going from up (white) to over (red.)
It happens as I click. When I release it stays red.
|It happens as I click. When I release it stays red. |
When you click, this is three actions: down, hit, and up, when you release.
|UP text is white |
OVER,DOWN,HIT text is red
white, red, red, red. So mouse-over red, down of the click red, hit of the click red, release gives you up which is white, you are still moused over on release, so it goes back to red.
I could be wrong . . . but this is how it sounds.
My fault in explaining. I meant that when I click without releasing I see a flash of white then it goes back to red.
UP, OVER, DOWN, HIT are all exactly how I set it.
I just can't figure why when I click and hold on to my left mouse button it flashes white which is UP for a quick second.
Ahh that's very different and I don't have an answer. When I find time I'll try to duplicate it.
Step by step:
- New document (AS 2.0, you can use 3.0 for this)
- Insert -> New symbol -> select button symbol
- UP: Create blue 60 X 60 square, positioned at 0, 0 (I used blue because I can't see the white, sub this for your "white")
- Move to Over frame, right-click frame in timeline, select insert keyframe, color the box red.
- Move to down frame, insert keyframe, select square, color it green; repeat for hit, color it black.
- Check each button frame, blue, red, green, black, ok.
- Return to scene 1 stage, put instance of button on stage.
- Run project.
I get blue square, red on mouseover, green on click and hold down, no white flash (pun not intended.) So you have something else going on, you should probably isolate the button in a project all by itself to see what's up.
I made an inaccurate statement about "hit." From the help files:
|The fourth frame is the Hit state, defining the area that responds to the mouse click. This area is invisible in the SWF file. |
|The Hit frame is not visible on the Stage, but it defines the area of the button that responds when clicked. The graphic for the Hit frame must be a solid area large enough to encompass all the graphic elements of the Up, Down, and Over frames. It can also be larger than the visible button. If you do not specify a Hit frame, the image for the Up state is used as the Hit frame. |
The hit frame has no visual effect at all, but is for the hit area of the button which can be different than the over, down, up frames. I'd completely forgotten about this, sorry.
I isolated the buttons and found out what the issue was. I had a beep sound when it is in the over state. For some reason it quickly flash white when I clicked. I just took the sound out and it stopped.
Thanks for the pointers.