Button Force Rollover
I really dont know what to google so I decided to ask it here. I was looking for Button classes but it seems like there's none? So how do I control buttons? like if I mouse over Button A, it will make Button B on rollover state. I tried "gotoAndStop(2)" since the rollover is the 2nd frame but it doesnt work with buttons I guess..
Any ideas?
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 07-11-2006, 10:37 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Force Rollover On A Button
Hi,
I am trying to force a rollover on a button. I know I would usually do it by defining button as a movie clip and using gotoAndPlay() on it to go to rollOver state, but I already have a whole thing designed, and I just need this small modification. Is there any way I can tell a button to go to its Over frame?
Thanks
Force A SimpleButton Rollover
I have a menu system which, when you roll over a button you want it to highlight, butyou also want it to make another button roll over (one on the map)
in as2 it was possible to do:
button1.onRollOver = function(){
button2.gotoAndStop(2);
}
and then revert it to frame 1 on the roll off. i COULD do this if my buttons were movieclips in as3. I want to use buttons tho. Any way to force an event to happen.
I tried having the button dispatch a mouse event. I tried having the stage dispatch a mouse event at the x/y of the button. hmmm. It seems you can set useCapture on mouse events... bubbling is set to true- but i want the event to bubble UP the tree (capture phase not bubble) hmm. Ideas?
Using A Button To Force A Certain Layer To The Top
I have a horizontal navigation bar with a series of six buttons. When someone hovers over a button, that button needs to be at the very top of it's group for it to display properly. Is there a way to make a button tell an mc that it should display on top of all the others?
telltarget maybe?
on (rollover, dragover){
{telltarget("/mc-name"){
swithtothehighestdepth;
}
You get the idea I'm sure.
Force Downstate Of A Button?
Is there a way to tell the button to show the downstate while keypress is down?
Im using this code on the button:
Code:
on (release,keyPress "6") {
getStartTime.gotoAndPlay("stop");
addPoints = 6;
}
It listens to the keypress and executes but it doesn't press the button visually, is there a way to do that? I've tried to name the downstate with a label but that didn't work for me. Any ideas?
Using A Button To Force A Certain Layer To The Top
I have a horizontal navigation bar with a series of six buttons. When someone hovers over a button, that button needs to be at the very top of it's group for it to display properly. Is there a way to make a button tell an mc that it should display on top of all the others?
telltarget maybe?
on (rollover, dragover){
{telltarget("/mc-name"){
swithtothehighestdepth;
}
You get the idea I'm sure.
Can You Force The Bg Of A Button To A Spicific Layer?
Ok, shot in the dark here? I am trying to get a button to always show the bottom layer as its background. For example:
lets say I have 4 layers
0: photo
1: blue
2: green
3: yellow
each layer is stacked on top of the next and each takes up 1/4 of the frame.
[ 0 ][ 1 ][ 2 ][ 3 ]
I have a button on each layer.
I want the background of each button to show the section of the photo( on layer 0 ) it resides over.... so as the button moves you see the image under all the layers.
Thanks
Edited: 02/05/2007 at 05:17:05 PM by bliesveld
Can Flash Force-Click A Button For You?
I have a button that has an OnClick event attached to it. Is there a way for Flash to click the button for you once the user presses "Enter" (for example)?
Force A Button To Show The Over-state...
hi everybody.
here's a simple question:
in my animation there is a button.
the button is red in the up-state and blue in the over-state.
can I - using actionscript - force my button to only show the over-state / go to the
over-state and stay there?
...so that my button remains blue?
thanks in advance
felisan
Force A Button To Show The Over-state...
hi everybody.
here's a simple question:
in my animation there is a button.
the button is red in the up-state and blue in the over-state.
can I - using actionscript - force my button to only show the over-state / go to the
over-state and stay there?
...so that my button remains blue?
thanks in advance
felisan
Using Actionscript To Force A Button State
I 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);
}
else {
buttonName.gotoAndStop(0);
}
That's not working for me, though... Thanks for any help.
Trying To Make A Button Rollover, Wait And Recheck Rollover
hi. i'm mostly comfortable with the graphical elements of using flash and there a gaps in my knowledge when i want to polish things up.
i have a bunch of buttons which, when rolled over, trigger some text to sweep accross in an area above the buttons and sweep away when rolled out.
this works nicely but if the viewer sweeps the mouse over a few buttons quickly all the MCs with text in play and it gets very messy.
the only way i can think to tidy this up is to make the button delay when rolled over and recheck about half a second later. if it's still rolled over then it plays the MC. i tried this the obvious way (triggering a small MC with onRollover > play MC at the end) but it needs the actual act of rolling over to trigger so i had to roll out and over again which defies the point >.<
i realise this is a really specific problem and it's very cheeky to ask others to solve my problems but if any of you have come accross similar problems and can point me in a better direction i'd really appreciate it.
Button RollOver/RollOut Effects WITH Looping On RollOver
I'm planning to use this tutorial, below to make a button:
http://www.kirupa.com/developer/mx2004/button_effect.htm
My question is how can I make it so that only on the rollover, the effect will keep looping?
Example: http://jump5.com/
On the right side, the navigation has this nice hover animation with the pointing arrow that continues to twitch on rollover.
[f8] Button RollOver Show's Movie. How To Unshow Movie On RollOver Other Button
I've made a productoverview in flash.
There are 4 productphoto's (buttons with just a rollOver-function, no clicks).
Behind every productphoto there is a detailed product-specification (movie) that shows up when rollOver on the productphoto's.
So I want the product-specification movie to appear when theres a rollOver on the productphoto. The movie has to show on rollOver and has to stay visible on rollOut. But when u move to the next productphoto (rollOver) the previous product-specification movie has to disappear and the new one has to show.
I don't know what to do. so far i have this:
on (rollOver) {
tellTarget ("sony-1-1") {
gotoAndPlay (2);
}
Background Rollover With Button Rollover
I'd like for my background behind my buttons to rollover, but remain rolled while I touch the buttons and make those rollover. Here's an example:
http://www.zymocreations.com/index_f.htm
I can get both of my rollovers going, but I can't get the background to stay rolled when I move to the buttons.
Any suggestions? Thanks ahead of time!
Button Rollover Disabled Due To MC Rollover
i have used this nifty code from this .fla (http://www.actionscript.org/forums/a...chmentid=12251, 6.4kb) and it works perfectly. it's a rollover effect that plays or reverses an MC on rollover, i have just one extra thing i'd like to ask that maybe someone could help me with.
in my example, i have a curtain that goes up and down when rolled over and out. this works fine, but what i want is to have my menu behind the curtain, so when the user rolls over the curtain, it goes up, revealing the menu. i've done this, but for some reason my basic menu's rollover actions are disabled. can't anyone help me to get them to work?
here's the code from devonair's example:code: stop();
curtain.onRollOver = function() {
this.onEnterFrame = function() {
this._currentframe == this._totalframes ? delete this.onEnterFrame : this.nextFrame();
};
};
curtain.onRollOut = curtain.onDragOut = function () {
this.onEnterFrame = function() {
this._currentframe == 1 ? delete this.onEnterFrame : this.prevFrame();
};
};and here are the actions on my basic menu that is within the 'curtain' MCcode: on (rollOver) {MC1.gotoAndPlay("over");}
on (rollOut) {MC1.gotoAndPlay("out");}
on (release) {getURL("home.htm", "iframe");}many thanx in advance for any help given...
Rollover/off Anim Control Button, Problem Adding Button Functionality
Hi, I'm really new to flash, so forgive me for sounding like an simpleton.
I'm trying to create a button that when you roll over, it grows in size and some text animates onto it. When you roll off, the anim is supposed to reverse and go back to the rest state. I've managed to get the animation to work okay, so it grows and shrinks accordinly. My problem now is, I want to make this into a functional button, ie to add a mailto: link, or a link to another frame.
Whats the best way to achieve this? I've tried to convert to a button and have the anim in all button states, but this didn't work. And a get an error when trying to add the mailto action script to the button, saying 'on release' should only be used on instanced buttons. I tried making an invisible button behind the animated on, but I loose the animation playback when rolling over the invisible button. It seems I can't do both for some reason.
I'm using this script on the first frame to control the playback of the movie. And stop on the last frame.
stop();
this.onRollOver = function() {
rewind = false;
this.play();
};
this.onRollOut = function() {
rewind = true;
};
this.onEnterFrame = function() {
if (rewind == true) {
prevFrame();
}
};
Any help would be appreciated, I've tried so many times with different approaches to no avail.
Mute Button Not Working For Button Rollover Sounds
I got my code for a mute button from the flashkit FAQ on sound,
and it seems to be muting everything but my rollovers. Anyone have any ideas?
it mutes the sound in all levels except for the buttons in _level0
and the button itself is in _level0 ?
code: // on main timeline
globalvolume = new Sound(); // no associated movie clip.
//button to mute sound and change toggle mc frames
on(release){
if(_root.globalvolume.getVolume() > 0){
_root.globalvolume.setVolume(0); // mutes all sound
play(); //switch to mute frame
} else {
_root.globalvolume.setVolume(100); // unmutes all sound
play(); //switch to unmute frame
}
}
thanks in advance for any input
Button States - How To Keep Button On Rollover State When Clicked.
on (rollOver) {
this.btn_about.gotoAndPlay("mouseover");
setProperty(this.btn_about, _x, 25);
setProperty(this.btn_about, _y, 29);
}
on (rollOut) {
this.btn_about.gotoAndPlay("mouseout");
}
on(release){
_parent.gotoAndStop("about");
}
There's my button code. Now a rundown on my delima.
I have a movie "company.swf" that is loaded into an empty MC "content" that is located within my main movie "main.swf". My buttons are all located inside an MC "subnav" inside of company.swf. I have seperate MC's for each button with an actual button with just a "hit" area. I would like each button to stay in the rollover state when clicked so a user knows where they are in each section. I hope I'm being clear here. My rollover and rollout works fine.
Please help!! Thanks
Rollover Button To Be Triggered By Area Smaller Than Button
I'm pretty new at Flash. I am creating a flash file to insert into a PowerPoint, since PP has no way to really use mouseovers. This is my first project, but I'm going to want to do a lot with this technique in the future.
I have an image of the toolbar of our software and images (transparent pngs) of the tooltips with arrows that will point to the icon.
I can make a roll-over button that only appears when the user rolls over the icon, but the tooltip text is wider than the icon that triggers it, so the buttons I'm creating overlap.
So I want the area that triggers the roll-over effect to be smaller than the button. Or is there a better way to accomplish this task?
Thanks for any advice!
Navigation Trouble, Using Button Rollover, Rollout And Button Down
Hello all
Take a look at the following sites; and notice their menus. Both have a rollover and rollout on their buttons, and when the button is hit the button stays down until another button is pressed. In the scissor sisters site, the neon bar still fades out after another has been pressed.
Franz Ferdinand
Scissor Sisters
I am trying to achieve this myself with my own site, which you can view in progess here:
My Site
I have mastered the button rollOver and rollOut effect, in which i gathered the code from a kirupa tutorial. My problem is, getting the neon bar to stay underneath teh last button that has been pressed.
The main movie is located on the main timeline in frame 2, because frame 1 contains the pre loader.
The actions for frame 2 of the main timeline are:
Code:
stop();
movieLoader.loadMovie("news.swf");
total = movieLoader.getBytesTotal();
loads = movieLoader.getBytesLoaded();
percent1 = Math.round(loads/total*100);
movieLoadText.text = "Loading news "+percent1+"%";
if (loads != total) {
} else {
movieLoadText._visible = false;
}
Now the buttons are not buttons, they are movieclips, which are located on the stage, and have instance names of b1 for news, b2 for biography etc etc
Inside the movieclip, the animation of the neon bar fading in takes 25 frames, and this has a stop action on the end.
This code is placed on the first frame:
Code:
stop();
news.onEnterFrame = function(){
if(rewind == true)
{
prevFrame();
}
}
news.onRollOver = function(){
rewind = false;
gotoAndPlay(25);
}
news.onRollOut = function(){
rewind = true;
}
news.onRelease = function(){
_root.logo.gotoAndPlay("buzz");
_root.movieLoader.loadMovie("news.swf");
}
As you have probably noticed this is the same as the kirupa tutorial.
So now my problem is to make sure that the last button clicked leaves the underline bar down until the next button is pressed.
Whoever can solve this for me is a life saviour!
Thanks
Williby
Button Inside Complex Button RollOut/RollOver
I created a movieclip from the tutorial "Complex Button RollOut/RollOver Effects" which I want to use as a menu. Is it possible to add buttons inside this movieclip??? I try and try but the buttons are never recognized, only the movieclip can be pressed.
Rollover Button To Be Triggered By Area Smaller Than Button
Newbie. Trying to simulate tool tips on roll-over toolbar
I'm pretty new at Flash. I am creating a flash file to insert into a PowerPoint, since PP has no way to really use mouseovers. This is my first project, but I'm going to want to do a lot with this technique in the future.
I have an image of the toolbar of our software and images (transparent pngs) of the tooltips with arrows that will point to the icon.
I can make a roll-over button that only appears when the user rolls over the icon, but the tooltip text is wider than the icon that triggers it, so the buttons I'm creating overlap.
So I want the area that triggers the roll-over effect to be smaller than the button. Or is there a better way to accomplish this task?
Thanks for any advice!
Rollerover Button Ontop Of Rollover Button
Hi, Im trying to create a flash file that has 2 layers of rollover buttons ontop of each other. one layer consist of lets say 10 horizontal rect buttons that control volume lvl, the layer ontop of that consists of 10 vertical rect buttons that control the pan, at the moment only the top layer is working, dose anyone know of a way to have both layers active? in other words have 2 layers of buttons on top of each other working at the same time.
sorry about the confusing post, my mind has melted trying to figure out how to use AS3.
PS: i found an old post from 2005 that stated IMS had an answer,
and i quote.
"I made this for someone else, not sure if it is what you are looking for
but take a look. its rollovers with buttons on buttons.. you might be able to tweek it... It's in 2004MXPRO
IMS"
thats all the message said, and i couldn't find anything attached.
thanking you in advance, Buklen
Help ROllOVer On Button Activated Another MC, But Only With Every OTHER Button....
Hi, just as it says in the topic title, I have a menu and it only activated every other button in the middle movie clip. I dont know anything about actionscript or how to set up a flash but Im trying very hard
if anyone can help me I'll really appreciate it.
why is it not doing it for every button?
does anyone know actionscript to fix this?
i have the file attatched below for the swf just so you get an idea
might take a second to load and no preloader...
http://www.artic.edu/~sdodso1/fightplay2.swf
http://www.artic.edu/~sdodso1/fightplay2.fla
RollOver On A Button Causes Another Button To RollOut
I started working on a little page of mine, and I already ran into some trouble hehe. I'm kind of learning as I go along. Heres the script I'm having some trouble with:
ActionScript Code:
this.qmbacking.onRollOver = function() {
//tweens rolling in the menu
}
this.qmbacking.onRollOut = function() {
//tweens rolling out the menu
}
this.introb.onRelease = function(){
trace("intro pressed")
}
this.aboutb.onRelease = function(){
trace("about pressed")
}
this.portfoliob.onRelease = function(){
trace("portfolio pressed")
}
this.contactb.onRelease = function(){
trace("contact pressed")
}
The problem is is that when I rollover the menu buttons, it will cause the qmbacking to run the script under rollOut. Heres the swf:
http://hundsteg.se/Erik/portfolio.swf
Is there any way to "override" this? Or does anyone know of an alternative way of making this type of menu? Only thing I can think of is making an invisible button on the rest of the stage but that will cause a lot of other trouble :/.
Thanks!
Help With Button Rollover
could you tell me what is wrong with these buttons. the rollover image doesnt work
heres my site
http://www.angelfire.com/tv2/tv220/site.swf
___________________
thats for your time
Button Rollover Help
I'm new to flash. Have so much idea's in my head that is dying to get out . Please, can someone tell me how to make a button motion on a mouse roll over?
http://members.rogers.com/tmtk
Rollover Button
I am trying to make a rollover button in flash mx. I want the button to rollover and goto a certain scene and frame. How do I do this? I am stumped. Thanks.
Rollover Button
is there anyway to have like on the rollover of one button and it set value of month="a" and on the roll over of the second button to day="a", actually stupid question i know the answer to this, but is there anyway to have it to where these buttons overlap. that way basically if the mouse is over the button that sets month and the button that sets day. then month=a and day=a, and obviously if the mouse is just over one, it only sets that value. OVERALL, I want to know if i can have two buttons, on top of another and both buttons activated by th press of a click(roll over in my case, but thas something i can change). THanks guys
Button And RollOver
Hi all!
I have a little problem with my button.
I have a MC with 2 layers and 2 images in each layer.
On the first layer I have in each images, one invisible button.
On the second layer I have in each images a graphic.
The code on the first button is:
on (rollOver){
gotoAndStop(2);
}
The code on the second button is:
on (releaseOutside, rollOut, dragOver, dragOut) {
gotoAndStop(1);
}
A simple rollOver button!
But the problem is that if pass very quikly over the button, it still stay on the rollOver position! Wath can I do?
Rollover Button
I made a simple button with an mc in the over state. plays perfect but would whant if the use does a rollout the mc play in reverse.
How do that?
Button Rollover
Ok, I have seen this done but how? I want to rollover a button and in another part of the screen have a picture show up in a box. I somewhat tried naming the button "home" and making a movie clip and telling the button
onRollOver=funtion(????????)
or should I do something different?
thanks
Button Rollover
Hey there. I'm having a (probably) stupid problem. I want a clip to play on a rollover and keep playing after you roll off it, but at the same time have an image appear ONLY when the mouse is on the button.
How do you make one thing keep playing out after a rollout, but another thing stop at the same time?
check out the attachment, it might help explain. And please don't judge me on it, it's just to show a point.
Any help??
Button Rollover
hi, i'm gonna keep it short here
i got a movieclip that fades in and out. here's my timeline:
-frame 1 = 50% (stop()
[shape tween]
-frame 20 = 100%
[shape tween]
-frame 40 = 50%
here's the code iv wrote on it:
Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
play();
} else if (this._currentframe ==20){
stop();
}
} else {
if (this._currentframe != 1) {
play();
}
}
}
the buttons now fades in and out when i go on and off them with my mouse, but when i go over them while they are playing they don't work
what can i do?
also, maybe there's a simpeler script for this action. Can someone type it down please?
ps: sorry for my bad english
Button Rollover Help?
hi, i'm gonna keep it short here
i got a movieclip that fades in and out. here's my timeline:
-frame 1 = 50% (stop()
[shape tween]
-frame 20 = 100%
[shape tween]
-frame 40 = 50%
here's the code iv wrote on it:
Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
play();
} else if (this._currentframe ==20){
stop();
}
} else {
if (this._currentframe != 1) {
play();
}
}
}
the buttons now fades in and out when i go on and off them with my mouse, but when i go over them while they are playing they don't work
what can i do?
also, maybe there's a simpeler script for this action. Can someone type it down please?
ps: sorry for my bad english
Button Rollover Help?
hi, i'm gonna keep it short here
i got a movieclip that fades in and out. here's my timeline:
-frame 1 = 50% (stop()
[shape tween]
-frame 20 = 100%
[shape tween]
-frame 40 = 50%
here's the code iv wrote on it:
Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe == 1) {
play();
} else if (this._currentframe ==20){
stop();
}
} else {
if (this._currentframe != 1) {
play();
}
}
}
the buttons now fades in and out when i go on and off them with my mouse, but when i go over them while they are playing they don't work
what can i do?
also, maybe there's a simpeler script for this action. Can someone type it down please?
ps: sorry for my bad english
Rollover Button
I have made a movie. In side created a new movie. gave it a instance name content. made a button with this for A,S
button.onRelease = function() {
_root.content.loadMovie("gall.swf");
};
Now that works fine,
My question is, I made a button with rollover
to display dynamic text, But keep getting errors. Can someone please
tell me how I can get around this problem.
I want too use rollover button effect.
Many thanks.
Regards Barry_UK
Button Rollover Help....
hey
i have created a button so on mouse over a panel slides up to reveal some links. now when u move away from the button completely it just resets to its normal up state. how can u make it so when u leave the button the panel slides back down instead of just resetting to the up frame? i have looked for some tuts but found nothing. any help would be very much appreciated.
thanks to anyone who can offer some suggestions,
james
Button Rollover
Have a quick question about a button animation rollover. In the past I have created a roll over and roll out animation for a button, but the problem was if you rolled over it too quick it would jump to the roll out portion of the animation before it had completed the roll over animation. How can I let the roll over animation complete even if you have rolled out? Thanks for any help.
RollOver Button
Hello, I need a script that allows a small image onRollOver to grow bigger, but with ease, not just BAM! it's big, for example I have a image thumbnail that is 60 x 44 onRollOver I wan't it to grow to 70 x 54, but with motion, I wan't it also to Shrink back onRollOut, can anybody show me a basic script for this?
If you can it be a big help, thanks.
Button - Rollover
I am trying to make a simple movie player in flash, with three buttons: PLAY, PAUSE and STOP. The three buttons are Symbols, NO text.
The problem is, that I need the words: play, pause and stop to apear to the right side of the buttons, so the person knows what the symbols are. But:
If I write them down in the "play" Button for example, they would only be visible on the "OVER" section.
And the real problem now is that my mouse touches the "invisible" space where my text play should apear, AND ACTIVATES the button without having to touch the symbol!
Ex: (SYMB) --- Normal view
(SYMB) PLAY --- When Mouse over Symbol
(SYMB) PLAY --- When Mouse over "Play"space
PLEASE HELP, i hope i described my problem good enough, so you can help me.
THX/
Ovi
Button MC Rollover
Hi all,
I am attempting to create buttons as found on this site: http://www.flashation.com/stardust.html
I have a static up state, a MC rollover (for the color change and fade out). It all is working except when I remove my mouse from the rollover the colors do not fade out they just go back to the static state.
How is this done?
thanks,Laurel
Button Rollover Help
Hi,
I am making a flash website with mx2004 and am having problems with rollovers. When I rollsover a button on the left side of the screen, I want text to appear on the right side of the screen explaining what the button will launch. The problem is, when I rollover on the right side of the screen where the text appears, it comes up. I want the text to appear only when the buttons of the left side of the screen triggers it.
Right now I have the text on the over, down, and hit state of the button. I think I may need to add actionscripting to get it to trigger only when the button on the left rollovers. Any ideas? Thanks.
Rollover Button Help
Hi there,
I went through some of the threads but didn't quiet find what i'm looking for.
I want a menu (in the form of a movie clip - i have that part covered) to open up when the mouse moves over some text.
I know there's a method of converting the text into a movie and then a button or something like that. But I cant seem to remember exactly what to do. I tried different things but I keep gettin the message that says i cant assign scripts to movie clips or something like that.
Could someone help?
thanks a load.
+aravinda
Rollover Button
has anyone got a button effect i just want it so it has the links in just text and when hovered a bar pops out of the side.???
Sorry if im not making sense...
Rollover Button Help
hello all,
i am trying to do a simple rollover button with a text button i have
to changing color from blue to purple in the up - over state
i am putting in the hit stage a rectangle but still no luck
can anyone give me an example ?
Rollover Button
Can the star coming out from the button created by Actionscipt in that web? Or it is created by users manupulately?
http://www.disney.fr/disneyenfrance/
Any help is appreciate
Help With Button Rollover
I have a button within an MC , when I test it , the button rollOver don't seem to work.
//I have this code on the first frame
service.onRollOver = function() {
service.gotoAndStop("drop");
};
service.onRollOut = function() {
service.gotoAndStop("start");
};
//I have a button on the frame labelled "drop", and when I test the movie
//the button rollOver doesn't work, any idea ?
|