ActionScript 2.0 :: How To Get MC Button To Stay In Pressed Position
Jan 24, 2009
Trying o make a moiveclip button (which works fine ) But I'm trying to get the MC to stay in the pressed position when on that page. So basically it stays red when on the page and when another button is clicked it go away. Here is the action script code I'm using that is not working. (as a normal buttons works great)
ActionScript Code:
on(release){
trace("yobutton")
_root.bottomLeft.gotoAndPlay("about");
_root.leftText.gotoAndPlay("about");
this.gotoAndStop("pressed");
[Code] .....
View 2 Replies
Similar Posts:
Jun 1, 2006
I have a rollout effect on the button. But its not doing what i want it to do [code] URL...Its starts off like i want it to. But if you play around with it for a while i stops working. When you rollover the button, its supposed to change color right away. And when you rollout its supposed to fade back to its orignal color.Whats the code for a button to change color after its been pressed and stay that way? f.eks. Blue at first then press it it turns purple.
View 4 Replies
Nov 6, 2010
button to reset position (action-script 3) how do you make a button that when pressed it resets/changes the position of a object yes i am new to action script 3 but not to flash i want button to change the x y coordinates back to the original but dont know how?
View 1 Replies
Jun 27, 2006
using the following jumpTo script as a guide how do I write an if statement for a function that will basically ask "if the movieclip is at position 3 stay there, otherwise jumpTo position 2"?
Code:
var bg1x = new Array(0, -1280, -1014, 0);
function jumpTobg1X(number) {
gradientNav_mc.newX = bg1x[number];
}
I have tried a bunch of if/else statements but I can't get it working. I can't figure out how to write it properly. I tried something like this:
[Code]...
View 2 Replies
Nov 16, 2004
I have a function on root:
_root.fadeBox_mc.onEnterFrame = function (){
if (fade){
this.nextFrame();[code]....
This causes a mc to fade in and out on rollover/rollout. But what I wanna make is a box that fades in when pressed on the button and fade out when pressed for the second time. But if I say
on (press){
_root.fade = true;
}
the mc fades in, but I cant do another on (press) to fade out. Is this too confusing?
View 2 Replies
Jul 21, 2010
I am making a widget in AS3, looks like a equalizer.
I'm having the problem when swf reloads, everything will reset. Is there a way to keep this from happening. I was thinking maybe XML.
I am thinking as the user scrubs it is writing the XY coordinate to the xml doc but i dont think that can work because the xml doc would then haft to be saved.
Any thoughts on what key words I need to search for in the net.
View 5 Replies
Dec 17, 2004
I 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]...
View 2 Replies
Feb 23, 2006
how to keep a Movieclip Btn 'Over State' to stay in the over position until another button is clicked?
View 1 Replies
Feb 6, 2009
How do I get the vibrating images to stay in the same position while vibrating when the Flash loads everytime. Right now, They change position randomly.
[Code]...
View 4 Replies
Jan 21, 2011
How do I get a down button to stay down after it is clicked.
View 7 Replies
May 26, 2005
I'm trying to create a set of 4 vertically arranged buttons that 'split' apart when those buttons are pressed. For example, if you click the topmost (1st) button, the bottom three buttons will drop down so submenus (for the 1st button) can now be revealed beneath. Again, when you click the 2nd button from the top, the bottom two buttons drop down, revealing submenus, and so on.
Now, is there a way that I can use actionscripting to tween the buttons to not only motion tween a drop down when a button is first pressed, but also to motion tween the button to return up to its original spot when another button is then pressed? Right now, I have two keyframes, side-by-side which each containing a different y-scale value for an object. Can I do some actionscripting to get the object to motion tween upward to its original spot instead of "clicking," or snapping back to is original spot when another button is pressed?
View 1 Replies
Jan 12, 2009
I want the press button to detect the last button pressed and if the shapes match, make them do something...obviously. I think I'm going at it the wrong way. I need to stick a "triange" id into the button/mc then if compares that and then if there is a match works then... right?
[Code]...
View 1 Replies
Aug 4, 2009
What button event should I use to make the program understands to DO SOMETHING only when the button is pressed/dragged. In my sample code below, I want something to happens only if the button is dragged beyond 200 in y axis. I tried onRelease, onRollOver and onDragOver but still not working
[Code]....
View 6 Replies
May 18, 2007
I 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 Replies
May 15, 2009
I'm creating my first website. I've managed to create a homepage. On the homepage is a enter site button, which once it is pressed starts thetimeline... I have an actions/labels layer which I am writing my code in. On frame number 'one' is my code below.
stop ();
enter_site_btn.addEventListener (MouseEvent.CLICK, buttonClicked)
function buttonClicked (event:MouseEvent): void
[code].....
View 5 Replies
Sep 26, 2009
I have a function that executes when a button is pressed:
btnRandomAll.addEventListener(MouseEvent.CLICK, clickHandlerBtnRandomAll);
function clickHandlerBtnRandomAll(e:Event)
{
...but, I need it to also execute once, upon the file loading.
View 7 Replies
May 15, 2009
I have two buttons assigned like this:
buttonprev.addEventListener(MouseEvent.CLICK, image_previous);
buttonnext.addEventListener(MouseEvent.CLICK, image_next);
These events fire a function which looks like this: loader.load(new URLRequest(getPath()));
My other code is:
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT,initHandler);
[code]....
If my picture takes up the area where the buttons are, the buttons slip underneath the image. How can I make the buttons stay on top all the time? My movie works fine as long as the picture that I load from a nearby directory does not cover the buttons..
View 5 Replies
Sep 19, 2011
I 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 Replies
May 24, 2011
I'm doing a simple 2 button menu. Each button is a movie clip with 3 labels for the states "none" "selected" and "hover". smartBtn needs to be set to "selected" on enter frame. When cinemaBtn gets clicked, smartBtn should go to its "none" state. But I'm not sure why smartBtn keeps on being selected.
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.MouseEvent;[code].............
View 1 Replies
Aug 5, 2006
i have been using gotoandlearn for about 2 months now and would like to know if anyone can elaborate on one of lee's tutorials...I ve been trying my self to figure it out (you know, learn) but i can seem to get it right.im trying to have the button (mc) stay in the over state once it is pressed.[code]the reason i went with the gotoandstop at frame 10 is bc i have a stop action on it..
View 7 Replies
Jul 12, 2007
how to get my magic buttons to stay 'selected' or highlighted until the next button is clicked. The highlighted state is 'released' (weird - but that's the case)
I've done an all-nighter & and am having a mind-blank.
Code:
myButton.onRelease = onClick;
myButton.onRollOver = overOut;
myButton.onRollOut = overOut;
[Code].....
View 1 Replies
Feb 9, 2011
i want to take btn1 position half wwidth of own x position on stage
View 1 Replies
Mar 15, 2011
This is hard to explain. Basically the user needs to choose their sex and type in their name then press the continue button. The gender selection is a bathroom identificationesque picture of a girl and boy. The boy is blue and the girl is pink. When you roll over the boy, it becomes a lighter blue and when you roll over the girl it becomes a lighter boy.
What I don't know how to do is that when you click on the boy, it stays a lighter blue, and lighter pink for the girl. That way they can see what selection they made. Also, when you click the boy then click the girl, the girl will become highlighted and the boy no longer will be (so you can only choose one gender). How do I do this? And how do I tell the program to store the info for later use? (when gender is important). I know that this type of action is used often in games so hopefully someone can help me.
View 2 Replies
Jan 13, 2010
I have a menu with five items in it. Every menu item is two words, both grey, and is a button. When the button is rolled over the second word goes red. So far, so easy. However, when the button is clicked and sends the timeline to the correct frame label, I want that button to stay in its grey/red state, in other words its rollover state. Is it possible to label a frame inside a button timeline, in the same way as one would in a movie clip, and then send the play head to that?
Or maybe there are some really easy and obvious solutions that I haven't seen that I would be grateful to hear about.
View 8 Replies
Aug 5, 2011
I have a script from a template I purchased that I need to edit.I have buttons that I want to stay active (ie, they still link back to the same page) once it's selected.Right now, when that button is the main button, it has no link attached to it.The portion of the script that I'm referring to is
onClipEvent (load) {
num = 2;
}[code]..............
View 3 Replies
May 21, 2007
Ok, I've search through the forums but none of the posts seem to work for me. I've got 4 buttons that each have an onRollOver, onRollOut, and onRelease function on them. I would like the onRollOver state to stay in place after the user clicks the button they're over. Then, when the user clicks on a different button, that buttons down state sticks, and the previous button's state unsticks and goes to the rollout function. I've read through and tried this thread:[URL]
View 5 Replies
Mar 27, 2005
how to make the button stay in different color after it view the image on the stage? I know how to create a button but it just only change the color when I move my mouse over but after I move out then it will change back into the previous color...
View 4 Replies
Jul 7, 2009
Someone has created a map where there are little colored buttons over building locationsThe buttons were made so that when you hover your cursor over them, they will bring up a little chat bubble (like the ones you see in comics) with the appropriate street address text. What I cannot figure out is how to, after removing the cursor from over a button, make the text bubble stay put so that those who see the map can highlight then copy and paste the street address from it.
View 4 Replies
May 11, 2010
How to make a button stay down state after been clicked?
stop();
var ldr:Loader = new Loader();
ldr.x = 300;
[Code].....
View 3 Replies
Mar 14, 2012
I'm trying to create a flash animation similar to this one and I want my text box to appear when the mouse is Down. I've created Whitebox and Text Layer but the problem is that they only appear when I make the click then dissapear immediately. How do I make the text box stay on the screen until another button is clicked?
View 1 Replies