Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

restore alpha after fade out

Status
Not open for further replies.

styleBunny

Technical User
Jun 20, 2002
133
AU
hi,

im using this code to fade my symbol (slider2), when a button is realsed using action script...

fadeOut = setInterval(fade, 100);
function fade() {
slider2._alpha -= x;
x = x+3;
if (Slider2._alpha<=0) {
clearnInterval(fadeOut);
}
}

when users roll over the next button, i want the alpha to be restored...
_root.slider2._alpha = 20;

i have that for the on roll over state, tho the symbol changes to this alpha for a second then disapears again...

helps ?
p.


 
to your rollover

clearInterval(fadeOut)
_root.slider2._alpha = 20;
 
swiz-eet.

thanks bill, again.
can u point me to a good tutorial on understanding functions in mx?

have a good weekend.
p.
 
Yeah! Big fishing tournament in Prospect this weekend! [bigcheeks]

Regards,

cubalibre2.gif
 
ok so i put that clear interval into my on roll over, and its all good. it behaves itself, so long as the user does what they are told and only does a single click.

if a user double clicks on the button, it still fades out, but when they roll onto the next button, the fade out happens automatically.

this i have no idea on.
p.
 
make the first line of code in the on release function for the button

clearInterval(fadeOut);

that should clear up the double click thing.

functions in mx. have a look at the mx tutorial section at
ultrashock are strong on code.

Dont know how much time I would spend on actionscript now though. MX will still be in use a while yet but with the release of actionscript 2 we now have a proper programming language to work with, with quite different commands and ways of constructing statements.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top