PDA

View Full Version : SetProperty Needs


DeadCell
05-23-2002, 08:11 PM
ok... so i have a button and movie clip on main stage... the button simple moves the movie clip from frame 1 to frame 2...

on frame two is a box...

actionscript for frame 2 is:

count = 1;
while (count<100) {
setProperty(menu, _alpha, 10);
count += 1;
}

frame 3:

GotoandPlay (2);

what i want is to be able to use setproperty to add 10% to transparency everytime the frame is hit... how do i do this? i have tried various things, thank you!

tg
05-23-2002, 09:35 PM
//frame 1
count=1;
menu._alpha=0;

//frame 2
menu._alpha+=10;
count++;

//frame 3
if(count<100){
gotoAndPlay(2);
}


you can also do this using onClipEvent(enterFrame)
but actually you only need to check :

if(count<=10) since your incrementing by the alpha by 10.

DeadCell
05-23-2002, 09:48 PM
ooooooohhh, ok, that makes good sense... thanx muchly, i appreciate it!


EDIT: i found that the end result of the fade left the object slightly transparent... so i added a bit of script to frame 3 incase any reads this and is actually interested, lol, anyways!

if (count<100){
gotoAndPlay(3);
}
else{
menu._alpha = 100;
gotoAndStop(5);
}