When button pushed, Alpha 0 --> 100, when released it has to fade back till zero

Ï’m making a flash movie, and got a little problem.
my flash ain’t really good, so its kind of hard to find the right solution.

Beta Version Of Digital Portfolio

i made a button, of my own face :-s ( please don’t laugh… :blush: )

when you move the mouse over it will fade in,
but when I release it, it falls back till 0 procent.

so my problem is, i need the button to fade back, to zero procent.
in a couple of sec… ( just as fast as it fades in.)

i heard there is a technique that you can make the movie play back, ? “backward” .

hope you guys understand what I’m meaning, otherways i will try to explain again.

thnx :slight_smile: allready

just reverse the script that you have it fading in.

here is what the fade in and out script should look like:
this should be on the button:


on(rollOver){
flag = true;
}

This should be on the movieclip:


on(enterFrame){
     if(flag){
          if(_alpha < 100){
                _alpha += 10
          }
     }else{
          if(_alpha > 0){
                _alpha -= 10
          }
      }
}

if that doesn’t work, try to put _root.flag instead of just flag and if that doens’t work try _parent.flag

its hard to really tell if I don’t know the set up of your movie.

aaaah, its kind of simpel.

if you have checked the site,

if you go over my face ( that picture is a button,)

on the “over” status, i put a movie clip. that has my
face fade in to 100% alpha.

thats all :slight_smile:

wait i saw something that kind of looks like it:

on (rollOver) {
tellTarget ("/controller") {
gotoAndPlay(“forward”);
}
}
on (rollOut) {
tellTarget ("/controller") {
gotoAndPlay(“backward”);
}
}

this is from a flash movie, when you go over the button, a flash movie starts playing. (then the picture becomes bigger… )

but i don’t understand how i’m gonna give these commands to my main button,… man programming is so hard :hangover:

ok, because you have your MC (movieclip) in the OVER state then you can’t do what you want to do. take the MC out of the button and just place the button on top of the MC on the main stage.

but, how did the guy get the controler in there?,
can you add controlers or something?
or do they come from somewhere else?

or do you maby know a tutorial that cna tell me more about them.

thnx in advance

dont use that tutorial, or whereever you got that code from. Its old outdated syntax. That is from Flash 4. I’ll make you a file… hold on a few seconds.

Here is the file. Make the button invisible by placing everying in the “HIT” frame only and then just copy what I did here.

■■■■ you’re good :slight_smile:

one day i’ll be just as smart as you :slight_smile:
oke i’m going to try it now.

(another maby dumb question)

is it possible to have the name of a day posted in flash,
(so then i mean, like getSeconds, getMonth <— you will get a number, but can it also be the name of a month? like january?)

or do you have to programm it like:

if 1 then january.
if 2 the february.

I know i’m a noob :)… but i’m kind of intressted if its possible.

but much thnx, for your help allready :slight_smile:

Here is a tutorial I wrote a while ago:

http://www.kirupa.com/developer/actionscript/digital_clock.asp

great thnx alot :slight_smile:

(may i ask what kind of study you have done, or did you all learn it yourself?)

:geek: C:-)

Voila Update With the good Fading

thnx alot, it works (alto i still not really know how you did it,)
i have swapt the movie you used with mine,
this way i got it to work.

if you ever able to write a short tutorial,
how you exactly did it.

i think alot of people would like it :slight_smile: ( I would giggle giggle :wink: )

(also if you make a SWF file of the thing you made, and put it in a other movie it won’t work, you have to put in the 2 layers u used.) can you explain why?

(… sorry for taking alot of your time, so no prob if you don’t want to.)

oh wait, now i get it :slight_smile: dumbie dumb dumb.

ooooh ■■■■, how can someone become so stupid!!

doooh… its so simple,

(not the programming stuff, but i didn’t understand where you did all the functions)

foolish me :crazy: