Need Help With Alpha Fade Technique!

Hey Everyone,

Back again with another problem. I hope there’s someone out there who can help me. Here’s what’s happening. I am trying to create an effect where the user rolls his mouse over a pencil drawing. When he does this the pencil drawing fades out to reveal the same color image underneath.

I have the actionscript in place but it doesn’t fade out gradually as I’d like. There really is not fade, it just goes from pencil to color in a FLASH - pun intended! He, he, he… and that’s not what I want.

Anyway, the script looks like the following:

on(rollover){
AgassiPencil._alpha = 0;
)
on(rollout){
AgassiPencil._alpha = 100;
}

I know I’m missing something, so if there is anything you can do to help me I’d appreciate it.

Thanks,

Kelly =)

er…correct me if I’m wrong…

but if appears as though your AS is doing just what you told it to do…go from 0 to 100 in 1 msec :stuck_out_tongue:

You’ll have to stick in a function that gradually shows the image…maybe this’d work:


alpha_pencil = AgassiPencil._alpha;
on(rollover){
alpha_pencil = 0;
while (alpha_pencil < 100)
{
alpha_pencil += 20;
}
)
on(rollout){
alpha_pencil = 0;
while (alpha_pencil < 0)
{
alpha_pencil -= 20;
}
}

I’m assuming that’d work, haven’t tested it…

you might have to use a setProperty command…but I hoesntly don’t know, but that’s what I’d start with and work off of…

(I only know some php and c++…and I’m a n00b in AS)
}

Hey Pewter,

Thanks for the help. I will give your script a try and see what happens. I’ll ket you know. Thanks again.

Sincerely,

Kelly:+)

I wrote a prototype for this… maybe this thread will help…

http://www.kirupaforum.com/showthread.php?s=&threadid=13239

(note: my help to read whole thread there, there is a corrected script as well)