Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Fading Buttons
Index -> Graphics and Design, Web Design -> Flash MX Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
TheZsterBunny




PostPosted: Thu Feb 26, 2004 7:13 pm   Post subject: Fading Buttons

Hi,

I've been using flash for years (started with flash 3) but I've never been very good at it.

I am trying to make some buttons with fading borders, in the manner of you roll over the buttons, the border fades in, you roll off of the buttons the border fades out. So far, this is simple, however I need to know how to do the following. If someone rolls off of the button while the glow is still appearing, remove the glow from that point.

I'm not sure if I've made that clear or not, but any help would be appreciated (flash mx 2004)

-bunny
Sponsor
Sponsor
Sponsor
sponsor
Delta




PostPosted: Fri Feb 27, 2004 11:08 pm   Post subject: (No subject)

well maybe you should show us that you can fade the borders like you wanted... then maybe we can help you with the rest... otherwise.. its pretty much us doing all the work for you Confused which is just stupid
zylum




PostPosted: Sat Feb 28, 2004 2:03 am   Post subject: (No subject)

is this what youre looking for???
TheZsterBunny




PostPosted: Sun Feb 29, 2004 8:42 pm   Post subject: Re: Fade

Zylum, thank you. This is exactly what I was trying to do. It's pretty difficult to explain what I meant.

Quote:
its pretty much us doing all the work for you


Delta, I guarantee you that this one button is not all the work being done. I plan on putting together a nice movie, and these buttons are a bonus.

-bunny
TheZsterBunny




PostPosted: Sun Feb 29, 2004 9:03 pm   Post subject: (No subject)

Smile This one year in turing has helped me to understand actionscript. I can understand what you did there (which is a great accomplishment for me).

Thanks, and I hope that this didn't take too much time from you.

-bunny
TheZsterBunny




PostPosted: Mon Mar 01, 2004 5:00 pm   Post subject: Thanks, but

I have been fiddling with the file for the last day, but I have been unable to figure out a way in which to assign other actions to the buttons (i.e. do something). I have dropped an invisible button into the movie clips and have tried assigning them actions from there. no go. What do you recommend?

-bunny
zylum




PostPosted: Mon Mar 01, 2004 5:10 pm   Post subject: (No subject)

what do you mean by "other actions"

if you mean if the button is clicked goto the next frame then this will work:

code:

stop();
MovieClip.prototype.buttonActions = function(hSpd, fSpd) {
        this.high._alpha = 0;
        this.onEnterFrame = function() {
                if (this.hitTest(_xmouse, _ymouse, true)) {
                        this.onMouseDown = function() {
                                gotoAndPlay(2);
                        };
                        this.high._alpha -= (this.high._alpha-100)/hSpd;
                } else {
                        this.high._alpha -= (this.high._alpha-0)/fSpd;
                }
        };
};
button.buttonActions(10, 7);


-zylum
TheZsterBunny




PostPosted: Mon Mar 01, 2004 7:01 pm   Post subject: (No subject)

Nice, I can use that, but would changing frames within the button movie clip be possible? (i.e. change color when clicked)

Sorry for being a nuisance

-bunny
Sponsor
Sponsor
Sponsor
sponsor
Homer_simpson




PostPosted: Mon Mar 01, 2004 9:04 pm   Post subject: (No subject)

i dunno why he's used all that action script forsomething as simple as that... here's how i did it...


button.zip
 Description:

Download
 Filename:  button.zip
 Filesize:  2.88 KB
 Downloaded:  388 Time(s)

zylum




PostPosted: Mon Mar 01, 2004 9:37 pm   Post subject: (No subject)

maybe i shouldnt have given him that actionscript... it's a bit advanced, but it's really usefull for more advanced effects and the prototype can make it really easy to add extra buttons with the same actions... i guess for someone new to flash should stick with simple buttons....
TheZsterBunny




PostPosted: Mon Mar 01, 2004 9:46 pm   Post subject: (No subject)

Yeah, its annoying, but next (school) year, i'm taking a class.

Homer, this actionscript allows the fade to change direction in mid animation. If you take a look at the one you submitted, and rollover and off the button very quickly, a black border will suddenly appear.

This one, and the actionscript found here does not.
zylum




PostPosted: Mon Mar 01, 2004 9:50 pm   Post subject: (No subject)

what exactly is it that you are looking for? maybe i can help
TheZsterBunny




PostPosted: Wed Mar 03, 2004 12:26 pm   Post subject: Buttons

The ultimate goal of these buttons is the following:

all buttons : fading mouseover, change color on click.

button 1: loading bar until movie complete, fades out after released, moves to second scene and starts playing music and the rest of the film.

button 2: fades out when released, follows a link 5 seconds later.

*sigh* i've been trying it, and it should be alot easier than it is.
The_Triangle




PostPosted: Mon Nov 28, 2005 4:09 pm   Post subject: (No subject)

that looks terrible.
Display posts from previous:   
   Index -> Graphics and Design, Web Design -> Flash MX Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 14 Posts ]
Jump to:   


Style:  
Search: