ActionScript 2.0 :: Button Staying In Its Over State?
Apr 1, 2005how to make a button stay in its over state when it's clicked, and then go back to it's up state when another button is clicked?
i can't remember how to do this.
how to make a button stay in its over state when it's clicked, and then go back to it's up state when another button is clicked?
i can't remember how to do this.
I have an image that will double as a button to make it larger if you click it. on the rollovers I have a plus and minus sign depending on which size the image is currently.if you click the image and it gets larger the cursor will probably still be on the image. Therefore the minus_mc won't play until you move your cursor off then back on the image. How can I have the rollover refresh without having the cursor move off of the image?
View 1 RepliesI am trying to simulate adjusting an LCD screen's contrast using two buttons.
The LCD is one graphic on ONE key frame that runs the entire length of the timeline.
Not sure how to start with the action scripting for this... i would like to use hex values if possible, but had no luck so far with my AS2.
The hard part is that i have a text box on top of the LCD on many different keyframes and the color / brightness of the this will have to change accordingly with the LCD screen.
I need to add a rollover effect to the disabled state of a Spark button. This way, users can rollover the button and know why the button is disabled.I think I would have to override ButtonBase's getCurrentSkinState. Is there anyway to test if a mouse cursor is over a disabled button?
View 1 RepliesI have a menu with five nav buttons (atcually MovieClips). Each has three frame labels: "on", "stay", and "off". The rollover and rollout animations play flawlessly, but I'm at a loss as to how to give each button a sticky "active" state. I'd like the button to stay in it's active state until another button is clicked, then I would like it to play it's "off" animation. Each MC has this code:
[Code]...
how to keep a Movieclip Btn 'Over State' to stay in the over position until another button is clicked?
View 1 RepliesI have a series of buttons inside an array. I am trying to get the buttons so that once they are pressed, they remain in the over state. Which is a darker color than the up state. So that people know which button they have pressed. Is there an easy way to do this for buttons?
View 1 RepliesI have two buttons that are movie clips in Flash CS4 and when button 1 is on Over stage, I want the button 2 stop movie clip at the certain frame.
View 8 RepliesIs there a way of telling a MC button to have a hit state like a normal button? I have some text popping up away from my MC button that is included in the hit state. When I roll over the main button the text pops up. But also, when I roll over where the text pops up it also triggers the pop up animation.
View 2 RepliesI'm trying to make buttons that involve a character pointing to indicate interaction.When a button is interacted with (mouse over or down) the character's arm points to that particular button. I separated his body, so that it remains constant on the main stage, no matter which button is being interacted with.The problem is, when the user is not mousing over or clicking down on any button, the character has no arms (since only his body remains constant)!How do I resolve this?The only thing I thought of so far is if there's any way to create an up button state that includes the arm (right now I have nothing for mouse up) THAT ENDS when the next button is interacted with. Is that possible? If I put the arm in the up state (in addition to mouse over and down) it stays when the interaction is over, which poses a problem when the user interacts with the next button (the character ends up with double the arms since each button introduces a different set of arms pointing towards that particular button).
View 1 RepliesI have a sub menu with two movie clip buttons, let's call them mc1 and mc2. They both have a MOUSE_OVER event and a MOUSE_OUT event. What I would like is that when mc1 is clicked it will stay in the over state and then if mc2 is clicked mc1 will go back to the out state while mc2 stays in the over state.What seems to be happening in my code is that the MOUSE_OUT event is overriding the MOUSE_DOWN event. So when I take the mouse off after I've clicked mc1 the over state goes away.
Here's my code thus far:
import flash.events.MouseEvent;
import flash.display.*
addEventListener(MouseEvent.MOUSE_OVER, mc1_over);
[code]....
how to make a button stay in its down state when it's clicked, and then go back to its up state when another button is clicked? I'm using buttons, not movie clips.
View 4 RepliesI have a rectangular shaped button. When someone rolls over it, I want a text bubble to appear to the side of that button. The problem is, the mouse thinks it's over the button even if it's over the side bubble which does not exist in the "Up" state. How can I get the cursor to only detect a button ONLY if it's over any part of the "Up" state and not the "Over" state (which because of the side bubble is larger than the original "Up" state.)
Here is a screenshot of the two button states.[URL]... Even if the cursor rolls over the "Over" bubble (and not the Up state), the Over state still shows up.
I have an interface that uses buttons to play videos. I would like it if, after you press a button, it stays in the 'down' state until the next button is pressed.
View 1 RepliesI've done the complex rollover tute where the animation plays and rewind when the mouse rolls on and off the button.What I'm trying to do is get button 1 to stay in the down state or clicked state until button 2 is clicked. Once button 2 is clicked, button 1 will play its rewind =true function.I can get the button to go to the down state when I click on it but the rollout function is overwriting the on release function as soon as I roll of the image.
View 5 Repliesi realize this probably a fairly simple question and also that i should have used movieclips for my buttons but i got lazy and used buttons for some of them
is there an easy way to make my button stay "on" after its clicked? i need something fairly easy that i can then go apply to a bunch of buttons. obviously it need it to turn off once another button is clicked as well.
Got a button with a gotoAndStop.When it gets to that frame I want to have a little bit o' script there to tell it to remain in that buttons over state.Should be simple, but I never did it with a button. I normally use MCs. Anyone know the syntax for it?
View 1 RepliesCurrently, when a button is in it's down-state, the AS disables the button. But since it needs to be active, i have to find a way to make the current 'down' button remain down during onRollOver and onRollOut.
button.onRollOver = function() {
this.over_holder._alpha = 100;
this.down_holder._alpha = 0;
[code]....
I created a button in flash. I gave it a different state for 'over' and 'down' - changing the color and scale respectively, so it looks depressed when you hit it.I then assigned an action to the button so that when it is 'hit' you are taken to another scene. However when you hit the button it goes to the scene but you lose out on the 'hit/depressed' part of the buttons state!? Why?
How do you keep the hit state intact with the button whilst simultaneously assign an action?I understant 'the action' is to go to another scene first, but can it not also show the 'hit state too?[URL]
I am trying to use buttons to jump to frame labels. They jump to the label just fine, but they won't stop when pressed again. Below is the code I am using to have the button rest when pressed again.
getting_btn.addEventListener(MouseEvent.CLICK, gettingStarted);
function gettingStarted(evt:MouseEvent):void {
gotoAndPlay("ipad_in");
[code].....
All of the variables that i define in frame one appear to no longer be defined in frame 2.
Here is a snippet of the actual code from frame 1 and frame 2 in case I'm missing something.
Frame 1:
ActionScript Code:
function init() {
var markedFrom = myVariables_xml.firstChild.childNodes[0].firstChild.nodeValue;
//trace("Marked From: " + markedFrom);
[Code].....
My flash document that has multiple frames that the user can navigate by clicking buttons. Each frame has unique symbols that will zoom to full screen when the user mouses over the thumbnails. The problem I am having is that the LAST picture that is "rolled over" stays on the page, no matter the frame.
For simpicity's sake let's say one frame has pictures of dogs that go fullscreen on rollover. The second frame has pictures of cats that go fullscreen on rollover. So when you go to the cat page, you will still have a symbol of the last dog picture you moused over from the previous frame sitting there on the cat page.The way the rollover effect is being done is a movie clip symbol. The actionscript is as follows:
stop();
this.onEnterFrame = function(){
if(zoom == true){
prevFrame();
}
[code]...
I think it has something to do with the "this.swapDepths(100)" command. keep the symbols from "following" the user around multiple frames and, instead, just stay to their propper frame?
I've made a nav bar using buttons, and have them working just fine for Up, Over, Down, and Hit. (okay, so hit isn't a state, but I'll count it is as the fourth one)Problem is, once clicked on and produces a change in the flash, I want the button to not return to the Up state, but to visually be different so you can tell you are in that section.First problem is I can't for the life of me think of what that state is called. (Makes it hard to search for, and my poor little brain is fried right now.)Second problem is, can I force a button to not go back to up state? (either the over or down state would work fine).Or do I have to detect the click and then make a call to swap out the button file for the relevant section?
View 1 RepliesOkay so basically I have two buttons that go to the same destination, what I want to do is if one is ROLL_OVER'd then I want the other one to go to the roll over state as well. I figured out that part, what I cant figure out is why it's not going back to the upState, the regular state, I mean it works if I do gotoAndStop with movie clips, it's just with these darn buttons.
[Code]...
I have a mc button that has two key frames inside the mc, one "on" and one "off" state. What I need it to do is toggle between on and off when clicked. Right now it toggles between on and off when I hover even though I didn't specify it to hover.I am using actionscript 2 and here is what I have on the MC button:
[code]...
So when you click on this button an image gets hidden and when clicked again it appears. I just need the button to toggle between on and off correctly.
Using the Button Class, how would one keep it in its Highlighted, down state after clicking it? Not using SimpleButton or creating a movieclip button but using the provided Button that comes with Flash.
View 11 RepliesI made a few buttons for my .fla and all the states are working but the hit state. So just to see what the problem was I made a new button, which is only text at each stage, so for up i wrote up, down down etc, all the states work but hit, what gives??? hit is after someone clicks it it should be at the hit state correct?
View 2 RepliesI am a beginner, using flash cs4. I am trying to work with my elder brother in his project, he is developing a website. Actually I want to make a button that stays in down state when released.
View 5 RepliesI would like to use actionscript to force a button to go to a specific state and stay there. Here's what I wish would work:
Quote:
if (variable eq "blahblah") {
buttonName.gotoAndStop(1);
}
[code]....
That's not working for me,
I would like to change the state of a flex button component with actionscript (on the fly) to present it as mouse-down/mouse-over/mouse-up, in order to use the css skining with out the existence of the mouse cursor. I tried to do this with button.currentState but this doesn't work.
View 1 Replies