how do you do rollovers llike
- Started
- Last post
- 72 Responses
- JazX0
Whoaaaaaaa! Shellie, you are a goddess! Thanks for this. Sorry about the goofy remarks before. Your rock!
- piperboytoy0
Hey Jaz, I tried what KPL said but it didn't work. I must be a retard or something. :-(
- shellie0
mail, piper. i zipped it up.. but when i click on the pathway on my server it downloads fine for me. weird.
that should solve all your problemsemsems
- shant0
honestly there's no need to start scripting with _alpha for this. shellie's got it. simple frame labels with some in and outs will simply let you make the fade as long as you want, maybe even change the fade to other colors, and add other elements. its a simple on rollover go to this frame, on roll off, go the off label.
i used it a variation for the colored lines on http://www.withstupid.com
use her fla.
- piperboytoy0
thanks Shellie, I fell asleep earlier. I love you this much
thanks for the file.
- JazX0
I got it fine, it rocks. Wow, I'm actually surprised you didn't know that though Piperboy. Your other Flash work is mind blowing! So nice! Rocks! Rocks! Rocks!
- piperboytoy0
thanks Jaz. I'm not that good with flash. i can get around things that I want to do.
- smartK0
using labels doesn't sound appropriate to me ... what if sb rollsover the button for a 100/second - rolling out will go to the "out" label though the animation "in" hasn't played ...
well maybe I'm missing sth here
- shellie0
click on this and see labels work and all their glory.
http://www.designcola.com/nt/ove…like i said if you wanted to be fansy you could just have labels on and idle and have a movieclip play the other movie clip backwards so that it begins to play "off" when you rollout seamlessly, if you roll out before the animation on rollover has completed. bleh. you have a better way... explain to piperboy.
but there's no need to get all complicated for something so simple.
btw... i use labels and lots of controller movie clips for eeeeeverything and it works well for me. :)
- hollowcube0
"honestly there's no need to start scripting with _alpha for this. shellie's got it. simple frame labels with some in and outs will simply let you make the fade as long as you want, maybe even change the fade to other colors ... "
shant, true -- this will work.
but if you are at all concerned about seperating the code from the timeline (which is something that I strive for as a flash developer), then I would really recommend using _alpha.
of course, if you are not at all interested in creating centralized, easily updatable, 'closer to OOP' code... well, then just ignore the way I recommend.
i try to avoid the timeline (and frame labels) as much as possible, unless it is impossible to do something without them (ie: animations and such).
whatever.
- hollowcube0
oh yea, and you can change the duration of the fade out by simply changing this value:
this.fader._alpha -= 10;
it's really easy to have it change colors as well. it would just be another couple lines of code.
- shellie0
piperboy.. youre so popular everyone wants to write code for you.
- shant0
yeah dude, i can change color using the color object, change alphas using math, etc etc, but this is such a simple effect that he's going for in the original link that it'd be silly to get so technical.
yeah, if he wanted a long fade in this wouldnt be the way to go because things might get interrupted, but all he wanted was a nice little fade out.
- jevad0
y'all jsut need to do what smartk said:
http://flashtothecore.praystatio…
click on '8' and download the fla - it's perfect for what you all want to do
- hollowcube0
"but this is such a simple effect that he's going for in the original link that it'd be silly to get so technical."
i respectfully disagree.
but then again, i take pride in the structure of my flash movie as much as i do the visual design.
not everyone does -- or cares to take the time.
but don't let me stop you ;-)
- shellie0
i could have suggested doing it with math. i often do things with math that even the programmers at work look at me sideways for not using simple tweens instead.
piperboy he knows enough flash to get by. why complicate things? he can use the same structure to do many things/effects. its a neat little trick to learn when youre starting out. sheesh.
- shellie0
typoes. sorry. i just lost all my cred.
- piperboytoy0
I never imagined that my rollover thread could stir such lively debate.
A wise flasher told me that in Flash, there isn't a right or wrong way of doing things just as long as the desired results is achieved. Who cares.
Anyway, thanks everyone especially shellie for showing me the light.
Cheers.
- kpl0
if anyone is still messing around with the code I posted... change
this._alpha -= 1;
to
this._alpha += 1;
another bug...sorry.
i'm not claiming this to be the best way, but for my purposes (getting it done in 30 secs and avoiding timelines) it works.
- paulrand0
I don't know, but I like that site