Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Roll Over Button (easy For Experts)



hi
here's the code i wrote:


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();
}
}
}


Now, when i roll on and off my movieclips, they play from frame 1 to 40, and stops at frame 1 again,
when i roll over it again, while this is happening, i want it to replay from frame 1.

check my movie to see the problem
http://users.pandora.be/thomasd/curr...ects/home.html

(ps; i hope you could understand my problem, my english isn't good)



FlashKit > Flash Help > Flash ActionScript
Posted on: 11-08-2003, 07:39 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Can Someone Help Me? Easy For Experts
I am a new user of Swish and created a web movie navigation page. I have actions set for on press for my differnt locations on the page etc. When you hit back, the movie plays over again. My question is, how do you only view the movie once? For instance, you open my page and you see a 15 sec movie and it lists all the links you can visit. If you hit back the movie starts again and you have to wait until finishes playing to hit something again. This cycle repeats every time you come back to the page and it starts again. I know there is a way to do this, so hopefully one of you experts and help me out. Thanks guys/gals!


JP

Easy Question For You Experts
Calling all Flash-Gurus,

I have an object (movieclip) following my mouse. I would like to have the object go to a specific frame when the mouse pointer is to the left of the object, and a different frame when the mouse pointer is to the right of the object. So the object is always facing the pointer as it follows it. The object only needs to face right or left, not up or down. I'm sure this is an easy one for you.

Could someone help me with the actionscript for this?
Thanks for your time!


PrickleyPete

An Easy Question For The Experts
Ok, I'm not very good at scripting and programming-stuff of that sort so please bare with me with this simple problem.

I have a button (news), a roll over (newsOver), and a roll out (newsOut) movie clip. I have the roll over clip scripted like this:

on(rollOver)
{
news.gotoAndStop("blank");
newsOver.gotoAndPlay("start");
}

Now what I want to do is when the mouse rolls out of the button, the newsOut MC will play, and goes back to a stop blank frame when its done. And once the newsOut MC ends, the news button will go back from blank to showing the button.

Help ne1?

Thanks

Easy For The Real Experts PLEASE HELP
this should be an easy one...not for me though

- the main page has an entry button, and when the mouse rolls over it you get two options: 1000x500 or 600x400. you then choose which size best suits your screen resolution.

- i would like to have at the bottom "your screen resolution is x by x"

- then when the window pops up, obviously centered, i want it to have a name and no scrollbars or resizing or absolutely anything.

i now it's a lot to ask, but any help would be GREATLY appreciated...THANKS

i'm using flash 5 on a mac.

Easy For The Real Experts PLEASE HELP
this should be an easy one...not for me though

- the main page has an entry button, and when the mouse rolls over it you get two options: 1000x500 or 600x400. you then choose which size best suits your screen resolution.

- i would like to have at the bottom "your screen resolution is x by x"

- then when the window pops up, obviously centered, i want it to have a name and no scrollbars or resizing or absolutely anything.

i now it's a lot to ask, but any help would be GREATLY appreciated...THANKS

i'm using flash 5 on a mac.

Easy For The Real Experts PLEASE HELP
this should be an easy one...not for me though

- the main page has an entry button, and when the mouse rolls over it you get two options: 1000x500 or 600x400. you then choose which size best suits your screen resolution.

- i would like to have at the bottom "your screen resolution is x by x"

- then when the window pops up, obviously centered, i want it to have a name and no scrollbars or resizing or absolutely anything.

i now it's a lot to ask, but any help would be GREATLY appreciated...THANKS

i'm using flash 5 on a mac.

Easy Question For You Experts
Flash MX

Is there a piece of code to unload all movies on certain levels i.e. 'unloadmovie 1-10' rather than having to write seperate unload commands for each level?

Easy Sound Question For The Experts
Fixing up my preload and i've added an on/off switch for the music. I can make it turn off easily enough but i can't turn it back on. I've tried targeting it and embedding it in an empty movieclip and such and i still can't figure it out. Any help on this would be great.

Easy Loader Question For Experts
Hi there!

Simple loader question:

I am using this script at the begining of my movie:

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}


works fine! But the movie contains a section with some sample photos on it that are rather large. so I just want the movie to load to, let's say, frame 20. And then from there, when the user clicks on a link to a photo, there can be another little loader just for that photo.

does that make sense?

Do I need to make my photos load from an external source?

Array Problem (easy For Experts)
I have created a huge array called 'colors' which contains a long list of hex colors, such as "0x0066FF","0xFFCC00" with a total of 2296 entries.

I would like to create a script which will automatically draw 2296 tiny 5 by 5 squares, each colored with the corresponding colors in the array.

That's pretty much it, I just need to end up with a long line of tiny colored squares.

-------

Here's my array, shortened to save space.

colors = new Array ("0x555273","0xE0644F","0x942B25","0xA7421C","0x62 2BCD","0xB863AF","0x536A92","0x587D5C","0x206ECC", "0xFF2B3A","0x006454","0xA66DE1","0xAC7F81","0xC46 E6A","0x5B652C");
trace (colors);

Thanks

Help WIth FLASH EASY QUESTION TO ANSWER FOR EXPERTS
hey guys, i made this flash movie that loops a banner over and over goin left to right, what i want to do is that when someone puts their mouse over the flash, it slows down the speed. how do i do that? if u need to see the file im me on xPillzboyx. i need help asap cuz im doing this for a site thx alot

Easy Roll Over / Out
Hey, i have a menu, that if you roll over a button, the menu slides down, then when you roll off the menu the menu slides back up. I cant remember how to do this without making the menu into one big button first. How do i say, if the movie clip of the menu is rolled off to then goto and play (w/o showing the button cursor)....

Controlling Movies W/ Button Roll Over/roll Off
I have a button that when rolled over sets a movie to play. The movie plays until a stop point. (some text fades up) Then when the button is rolled off of the it triggers the second half of the movie (text fades away).

However, when the button is rolled over and rolled off too quickly (before the movie reaches stop point?) the movie becomes stuck at that first stop point even though the mouse is off the button. (text remains stuck)

Maybe I can set the "stop" action in the movie to check whether the button has already been rolled off of already before stopping???

Please help!!!

navi.

Button Inside Mc With Roll Over Roll Out Action
hi,

i have a button inside a movieclip. this movie clip has a roll over roll out action. the button is not working. what can i do?

Roll Over & Roll Out Button Advice
I'm trying to do something which I imagined would be very simple... I was wrong! (I'm using MX)

I want to make a button which, when you roll over it, has a background fill that fades in, and when you roll out, the background fill fades out. The up state needs to be just text ("contact" for example) and I obviously don't want the button to reset on release. Can anyone give me advise?

I've tried doing this with and without AS and it never seems to work for me. I can get the fade-in and fade-out to work without AS, but then the button action doesn't work. I've seen this done on multiple websites and I can't figure it out for the life of me. Any help would be greatly appreciated. Thanks all.

Roll On Roll Of Button Blues
Hi can any one help? I have made a button that when rolled over 'shrinks' and when rolled off 'grows' all nice and smooth. I have done this with the following code:

on(rollOver){
_root.mc1.gotoAndPlay("grow");
}
on(rollOut){
_root.mc1.gotoAndPlay("shrink");
}

Now, I need this button when pressed to go to a certain frame number on the main stage, or another scene, I thought the code:

on(release){
gotoAndPlay(35);
}

would do the trick but it doesn't seem to work. I have made the button by converting the button to a movie and then placing that movie on the main stage. Any ideas would be greatlt appreciated.

Many thanks

How Do I A Roll On/roll Off Animation For This Button?
I have a MC thats contains my buttons (nav) called Buttons_MC. In it I have a button called About.

When someone rolls on the About button I want it to play an animation from movieclip Back_MC. And when person takes mouse off the button I want it to play Back_MC but start on frame 26.

thanks guys

Roll In - Roll Out Button
I have some script that is for a roll in - roll out button.
The problem is that it rolls in, but will not roll out.

I'm placing it on a MC rollover button (if that makes sense)
but I have have it placed in the middle of the main timeline, on a frame
that has script for disabling other buttons.

I am just curious wheather it is right for this.

O.K. here it is:
startFrame = 0;
movieclip.prototype.back = function() {
this.onEnterFrame = function() {
this.prevFrame();
// DELETES THE ENTERFRAME IF THE CLIP IS AT FRAME 1
if (this._currentframe == 1 | startFrame == 1) {
delete this.onEnterFrame;
CLIP.play();
}
}
}
button_mc.onRollOver = function() {
startFrame = 1;
CLIP.play();
}
button_mc.onRollOut = function() {
startFrame = 0;
CLIP.back();
}

Question For Button Experts
Is there a way to make button labels align to the left in button component?

I've tried everything but the label always centers. I've removed the skin and created buttons in actionscript. The labels appear fine.

BUTTON ROLL OVER STATE TO STAY.. But Not A Button
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}

this is what i have to animate a button/movie clip - kinda like what www.newstoday.com has for their buttons.....
but when i press the button and go to a different section i want the over state to stay over...ive tried to add this but not sure where i going wrong...

onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();

}

or do i need to go with a on script?
like this

Button Roll Off..
Hi, how do you make a movie clip play (not in the main timeline), when you roll off of a button? I want some animation to play after i roll off a button + not just end suddenly.

Can anyone help?

Thanks
zerodonor

Roll Over Button
This is probably well easy... and i have tried looking for a few links to help me but its getting confusing now.

OK... i want a button that when u rollover it, some text flies in gradually, i.e like a small movie. I can make movies fine with tweens etc... but how do i get it to be triggered by a simple roll over button?

Please can some help an idiot - so i can finish my online CV!!
Thanks
Ade.

Roll Off Button
I have a button that will be tinted slightly white when the mouse is over it.. is there a way to have the tinted button change back by detecting that the mouse is not over the button anymore? I dont want to have to have a button that covers the whole site which is there to disable the glow when the mouse touches it (meaning the mouse has left the tinted button).

I guess what I'm asking is: is there a way to tell a button to check for mouse presence... and if non is present (like an else case or something) to play .. say frame 5 for example.

Roll On/Off Button Help
Hi folks, this should be too much of a problem, happened me before but cant remember what the problem was to begin. Basically im using this code below for a roll on/off button. Now the code is from a tutorial file and works fine when you use the getURL command. However I wanted to use gotoAndplay instead, and it doesnt work.

can somebody explain to me what the problem is?

The code is contained in a frame within a movieclip and is directing it to frame 'home' on the main timeline. does the function command not work with gotoaandplay? Thanks



this.onEnterFrame = function(){
if(rewind == true){ //if rewind switch is set to true play backwards
prevFrame(); // play backwards
}
}

this.onRollOver = function(){
rewind = false; //set variable (or switch) that decides wether ot not to play backwards...
play(); // play this movie clip.. (grow the button(tween));
}

this.onRollOut = function(){
rewind = true; //set or rewind switch to true so it will play backwards...
}

this.onRelease = function(){
gotoAndPlay(home);
}

Button Roll Over
Hi,
I am new to AS3 and Flash CS3.

I would like to know how I can simply get the play, pause and rewind button to have 2 different roll overs each,

example: I have 3 play buttons overall,

1. PlayButtonNormal
2. PlayButtonOver
3. PlayButtonDown

what action script do I need to make the roll over possible and where do I have to insert the AS in the file?

Hope I'm not asking for too much, sorry I'm still a amateur rookie >

Button Roll Over
hey all how u make button effect when roll over button in flash. i got it all linked but im not sure of the code needed to change colour of button background?


-kip

Button Roll Over
Hello,

How can i make this:
I have a square. It is a photo. When i want to roll over the square i want it to become black. But if you roll out it has to stay black for 2 seconds. It has to stay there for two seconds also when you only roll over quickly, like one 10th of a second it has to stay there for 2 seconds. I cant get this right. I think it is very simple And when you hit the button it has to play a other scene. thanks

Button Roll Over
hey all how u make button effect when roll over button in flash. i got it all linked but im not sure of the code needed to change colour of button background?


-kip

Roll Over Button
I have been told to make a button using a movieclip in FlashMX and to put in certain code to make the button have a roll out effect, but I can't make it rollover and roll out. The best I have done is have it play the whole thing and not go back to the start.

Can someone plz, attach a .fla or something to tell me how to make a button (movie clip) have a rollover and rollout effect.
I would be very greatful.

Roll-up Button
Hi,

Quick question I hope..

Does anyone know how to create rollover effects such as those exhibited in the nav at the following:
http://struckcreative.com/

I've seen this effect or similar all over the place, bigspaceship for one..
and have tried a few different things but none are as smooth and reliable as those exhibited at struckcreative.

All ideas are more than welcome,

Thanks.

Roll Over Scroll Button
Hi ! Here's my case. I am creating a catalog with 54 items. So each item is a button. Each item has its own long description that will not fit on a page. So i have to make scroll buttons to move the description up and down. The description will have to show up when the one of the button release. I am following the tutorial at

http://virtual-fx.net/vfx/tutorial/t...0_20020107.php

on how to make a roll over scrollbars. By using that tutorial, i will have to create 54 separate up and down roll buttons, text movies and assign different action or target for each of them...or at least, this is what i know.. I was wondering whether there is a way(perhaps in coding part) to make this more simple? Is there a way i can just use one scrollbar to control every single item desciptions. Help please...thanks !

Button Roll Overs.
I set a button to play at a specific frame when the mouse goes over it.
My problem is that when the movie starts the roll over animation starts right away too. Once I bring my mouse over it once and then take it off, the movie starts playing like it should.
Therefore, my question is: Do I have to add a certain script so that the frames that should be played upon roll over do not play right away when the movie starts?

Button Roll-Over That Won't Behave
This is an easy one but I've not been using Flash for a while and cannot for the life of me remember how to do this..

I want my button to play a movie clip when rolled over. I want the entire clip to play even when the mouse has moved away.
On mouse release the button will be attached to a URL
HELP

WOODY

Another Button & Roll-Over Question.
I have run into a button hovering problem. My problem is the hovering over area where the second image is to appear. It appears even when you don't hover over your button. If you hover over the area where the second image is to appear, it shows up. How does one prevent that from happening? How can I get it to appear only when hovering over the button?

Getting A Button To Play On Roll Out
i have a button where on the "over" frame ther is an mc with a little animation on it. When u roll off the button i want the MC thats played on roll over to play (but frames reversed). i have copied the animation, pasted them after the Stop action and choose Reverse frames. Now all i need 2 do is put an action on the button that tells it to play again on roll out. How would i do this as this doesnt work (Target not found: Target="home button slider" Base="_level0"):

on (rollOut) {
tellTarget ("home button slider") {
play();
}
}

please help
cheers
jh

The Button/roll Over Thing.
Using flash 4 and swift3D, I have created a button which spins when you roll over it. However when you roll off it the spin stops. What scripting do you use to allow the spinning to finish playing even though you have rolled off the button? The spin is a short mov which is in a key frame under the rollover title in the button menu.

Any help would be most appreciated.

cheers.

Fade Out On Button Roll Off
I know how to brigten a button gradually when you roll the mouse over it, but I was wondering how to make the button fade back to it's original colour after moving the mouse off the button.

Thank you

Button Roll-over Problem
When I roll-over my buttons it seems as if the button is only activated on the down frame of the button. Meaning there is blank space in the down stage compared to the up and over stages... here is my site if you don't understand me : www.buffaloman.com/seratone-n/main.cfm

thanks guys!

-Mike

Roll Out Effect On A Button...
Basically I am creating a button. When you go over the hit area i have placed a movie clip in the "on" frame. The movie clip will simulate an effect of a cube being made from many smaller cubes. Thats all good.

However, I want to create an effect whereby if the user doesnt click on the button and simply hovers off it then the larger cube explodes (in a seperate movie clip) - a kind of roll out effect.

How would I go about achieving this?

Thanks in anticipation

Roll Over Button Animation Help....
I am beating my brains over this, can someone please help me?
trying to create a more advanced roll over button, to interact with the scene better, i made a link to the swf where it is being explained, in more detail swf file
if anyone can help me out or even point me in the right direction would be most awesome. thank you

Roll Over Play Button
I have a online seminar I am putting together and I want the PLAY button to change to a pause when I click to stop the slideshow, and then change back when they click it again to play the movie. I created a movie that I would place inside the button with 2 frames. The 1st frame is the pause symbol on the keyframe I added the script

onclick gotoAndStop(2);

2nd keyframe is the play. It has the script

onClick gotoAndStop(1);

Now how could I get this to work in the button? I have tried a couple things but no go. I hope someone can help me .

Thanks

JCF

Roll Off Button Animation.
OK, I tried many combinations of things but I can't seem to get this simple one down.

Now I have always animated buttons by using the "over" frame in the button states windows.

I drop a animated version of the button into that frame and when ever I roll over the button...viola.... it plays the animation.

Now I have been trying to get that to happen when I roll off the button.

I want the button to, of course, get to the end of the animation while your rolled over it and stop at the end staying there until you roll off. done. got that down.

now when I roll off the button I want the animation to in essence play backwards after I have moved away from the button.

There is no "roll off" frame for me to drop a clip into so I am supposing it is done by other means.

I tried using the "on roll out" in the menus but cant seem to get it right.

the button fills up with fluid when I roll over, animation finished an all. Now I want it to play the part of the animation where the fluid empties after I roll out of the button.

Thanks for help.

Roll On Button Animation
Someone before was asking how to display an animation when you roll off a button, and now I'm wondering how to display an animation when you roll *on* a button. I made a movie clip for the animation and tried to drop the movie clip into the "over" state in a button, but the movie clip doesn't play when I roll the mouse over the button in my main movie. I am probably doing it wrong, so if anyone could explain to me how to do this, I would really appreciate it!

Button Roll Over Problem
I have a button that when I roll over I want a graphic to appear to the right side. I created a movie with the graphic. What script would I use to make the rollover event happen?

Thanks

Button Roll Over Question...
In my button movie roll over, I have the button fading from one color to the other and then back again. My problem is that I can't figure out how to make it the last segment of the button movie (fading back to the original color) after the cursor leaves the button.

Is this an action script?

Thanks for your help!

Help: Roll Out Button Animations?
Hi all. I've herd this is probably the best place to ask...

I'm currently in the process of putting my site together. It's html with a Flash menu.

At the moment I have some pretty funky rollover animations; these were just done using movie clips inside the button symbol. The thing is, I've seen quite a few sites now that have an animation AFTER the mouse leaves the button. This is something I really would like to have, but am not sure how to go about it. The normal button symbol doesn't seem to have an option for it, only the 'up, over, down and hit' states.

Does anyone know how to do this? Is it straight forward? I'm pretty new to flash and only use the preset action scripts...

Perhaps it's done in a plug-in?

Any help would be great. thanks.

Button Roll-off Question
I'm trying to create a stanard button that when you roll over it, it changes color. But I also want the button to have a roll-off effect. Basically I want the button to change color when you roll over it, and when the user rolls off the button, I want the button to go back to the orgin color of the button. I know you can do this easily, using a standard button. But I don't want the button to just jump back to the original state. I want to create a movie clip that will fade the button back to the original normal button option. I have done this before, but I can't figure out how to do it again. If there are any tutorials or sample files out there, please let me know.


thanks,


Scott

Button Roll Outs
I am just starting to get the hang of using MC's.
My question is, I have a rollover effect that I created when the user rolls the mouse over the button. Its kinda corny, but Im still learning, so its cool to me What I did was, create the effect in a MC, then dragged it to the button stage when the over state is selected. When the mouse rolls off the button though, the effect stops cold. How can I get the MC to finish even if the mouse rolls off?

Thanks for your help.
Josh

Button Roll Over Problems
Im having problems with rollover.

1. When I roll over a button an animation plays. If I roll over it again before the animation is over it restarts. How can I get it to finish the animation before it restarts?

2. Same scenario but it's with two buttons. I would like both animations to play at the same time.

Copyright © 2005-08 www.BigResource.com, All rights reserved