how do you do rollovers llike
- Started
- Last post
- 72 Responses
- hollowcube0
hey, i'm working on something similar: http://www.vfs.com/~adamk/flasht…
i'll try to post a quick little explanation after i get home tonight...
- piperboytoy0
please do Hollowcube, thanks in advance
- shellie0
movie clips with invisible buttons has hot spots. its how youd do any tween but with on and off states in the movie clip. throw in a few stops and some labels and youre done.
- kpl0
if you're talking about the fade out when you roll out of a button:
put an invisible button over a movie clip.
movie clip consists of one frame, #000000 black square
button script:
on (rollOver) {
movieclip.hold = 1;
}on (rollOut) {
movieclip.gold = 0;
}movie clip script:
onClipEvent (enterFrame) {
if (hold) {
this._alpha = 20;
} else if (this._alpha < 80) {
this._alpha -= 1;
}}
movie clip is named "movieclip" of course. let me know if this script makes no sense.
- kpl0
crap... bug... :)
change
if (hold) {
to
if (this.hold) {
- shellie0
omg kpl theres a way easier way to write that.
- kpl0
well, it's easier for me to type than think right now.
- piperboytoy0
thanks kpl I'll try that
- shellie0
hope this helps
http://www.designcola.com/nt/ove…download the fla here:
http://www.designcola.com/nt/ove…enjoy yourself in rollover heaven
love,
- shellie0
you better not have stopped looking at this post either!!! :x kidding.
i even made you an example cos im horrible at explaining.
everybody say awww,look how sweet shellie is. okay i have completely lost it. im all loopy from meds ive been taking for my headache all day.
- shellie0
NOLOVE
- shellie0
bedtime piperboy.... you have mail.
- smartK0
http://flashtothecore.praystatio…
click on example 8 and download the fla ...
Joshua Davis just tells a mc to go to nextFrame if a variable is true, and to the prevFrame if the variable is false
- smartK0
I'm using this technique here http://www.mollback.at/forward_l…
(site not finished)
- hollowcube0
okay, this is how i do it:
i have the following code on the timeline of a movieclip containing the button (this movieclip is placed multiple times on the stage with attachMovieClip). Oh yea, i also have a gray box called 'fader' contained within this movie clip.
// start of code //
this.mybutton.onRollOver = function() {
this.fader._alpha = 100;
this.goAway = 0;
}this.mybutton.onRollOut = function() {
this.goAway = 1;
}this.mybutton.onEnterFrame = function () {
if (this.goAway) {
this.fader._alpha -= 10;
if (this.fader._alpha <=0){
this.goAway = 0;
}
}
}
// end of code //There's more to it than this, but you should get the basic idea.
hope this helps.
- piperboytoy0
thank shellie, but I can't download the fla file :-(
- piperboytoy0
thanks Shellie! I didnn't know you spent so much time on taht. Really appreciate it. I am 3 hours ahead of you, so I must have been in bed by that time.
Also thanks for all the great response. Lots of LOVE from me.
thanks again
- shellie0
i dint spend any time. you still cant download that FLA? just right click on the url. i that should work fine for you. its the easiest way possible so you wont get confused. and that techique is used with many different kinds of buttons. you can get fansy and have a movie clip tell the other movie to play backwards on rollout but... its not neccessary for what you want to do.
- piperboytoy0
no shellie, I get a text file. Do you think you can zip the fla file for me? thanks so much
- JazX0
hey, wow I was asking this same question last week and KPL, that helped.