View Full Version : [FMX] some code using _alpha
nipp2002
October 29th, 2002, 10:16 PM
ok so this code.....
onClipEvent( enterFrame) {
if (this._alpha > 0 ) {
this._alpha -= 5;
} else if (this._alpha < 100 ) {
this._alpha += 100;
}
}
How would I make this code increase the alpha back to 100 instead of just "changing" it to 100 in one frame ?
I'm confused. :-\
lostinbeta
October 29th, 2002, 10:24 PM
What are you trying to do exactly? Have it fade back and forth in and out?
To do the code snippets you need to put [ CODE ] in front of the code and [ /CODE ] at the end of the code.
Remove the spaces, I didn't want the board to convert that text....haha.
nipp2002
October 29th, 2002, 10:30 PM
yep i want it to fade in and out. :-)
nipp2002
October 29th, 2002, 10:34 PM
YAY!!!!!!!!!!!!!!!!! )@#(*$)(@#*)$*(@#$(# I"M HAPPY!!!! :nerd:
I got it all bymyself !!
onClipEvent(load) {
alpha = 5;
}
onClipEvent(enterFrame) {
this._alpha -= alpha;
if (this._alpha >= 100 ) {
alpha = -alpha;
} else if ( this._alpha <=0 ) {
alpha = -alpha;
}
}
lostinbeta
October 29th, 2002, 10:39 PM
Very good :)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.