Bodom78
July 12th, 2002, 05:05 AM
Hey all, Im still new to actionscript and I'm trying to understand it but with no luck.
What I want to do is set the alpha of a movieclip to rise and then lower at a set amount. I can do it so it set it at random but not the way I want it, eg clip starts at 20%alpah, and rised by 1 untill it at 50% and then reduces by 1 untill back to 20% over and over.
If you can be bothed explaining the script to me as well that would be great cos I want to understan why it works as well rather then just copy and pasting the script.
Thankyou.
(EDIT here what I tried, way off I know, but I'm still learning :))
second frame :
i = i+1;
setProperty ("/grid", _alpha, +i);
result = getProperty("/grid", _alpha);
if (result = 50) {
setProperty ("/grid", _alpha, 50-i);
}
third frame.
gotoAndPlay (2);
What I want to do is set the alpha of a movieclip to rise and then lower at a set amount. I can do it so it set it at random but not the way I want it, eg clip starts at 20%alpah, and rised by 1 untill it at 50% and then reduces by 1 untill back to 20% over and over.
If you can be bothed explaining the script to me as well that would be great cos I want to understan why it works as well rather then just copy and pasting the script.
Thankyou.
(EDIT here what I tried, way off I know, but I'm still learning :))
second frame :
i = i+1;
setProperty ("/grid", _alpha, +i);
result = getProperty("/grid", _alpha);
if (result = 50) {
setProperty ("/grid", _alpha, 50-i);
}
third frame.
gotoAndPlay (2);