|
-
Owner of the ™ thread
-
Owner of the ™ thread
bump ..... anyone ??
-
Senior Member
Hi,
maybe you could try this...
on the movie clip as a clipevent set the initial alpha value to be the same as your high value;
onClipEvent(load) {
this._alpha = _root.high;
}
then frame 1 (of main time line)
direction = -1; // we start by decreasing the alpha value
high = 95;
alpha = high;
low = 5;
frame 2...
alpha += 5 * direction;
_root.m._alpha = alpha;
if (alpha == high || alpha == low) {
direction *= -1; // if it reaches maximum or minimum alpha change direction
}
frame 3...
gotoAndPlay(2);
-
Try this prototype and clip code. I just tested it and it works fine. I think it may be what you want.
Movieclip.prototype.fade=function(){
var maxAlpha=100;
var minAlpha=0;
if(_alpha<maxAlpha&&up==0){
_alpha+=5;
}else{
up=1;
}
if(up){
if(_alpha>minAlpha){
_alpha-=5;
}else{
up=0;
_alpha+=5;
}
}
}
onClipEvent(load){
up=0;
}
onClipEvent(enterFrame){
fade();
}
[Edited by dzlpwr on 05-23-2002 at 10:32 PM]
-
easier way, possibly?
Okay this might be even easier than that.
set a variable someone, a, to be 1 (1 or 0);
if (a==1){
mymovie._alpha -=5;
if(myovie._alpha == 5){
a=0;}
}
if (a==0){
mymovie._alpha +=5;
if(myovie._alpha == 100){
a=1;}
}
so, it just alternates between the functions depending on whether or not a is true or false, or 1 or 0, whatever.
lemme know if that works
-
Owner of the ™ thread
thanx guys .. will post back , if it works
-
gravy
okay, ignore the myovie, and replace with mymovie...cheese and rice
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|