Groups | Blog | Home
all groups > flash actionscript > april 2007 >

flash actionscript : Odd Change in Movie Clip Alpha


ewon15
4/16/2007 9:28:06 PM
A site I am developing (http://www.rainnetworks.com/betasites/vm/) is built in
flash. After you click on a category (say, the Gear) and wait for several
minutes, it disappears. Any idea why? I have nothing in the code telling it to
do so... the only thing i have is when the movie clip enters the frame it fades
in...so the alpha is set at zero, then onClipEvent(enterFrame){ this._alpha
+=5; }

...is that my problem?
B
4/16/2007 11:05:55 PM
I tested your code with the alpha fade in plus a onPress event on the movie
clip and it works fine.

The only thing I can think of is that perhaps because the alpha continues to
run per the enterFrame event, the actual alpha value continues on and on and on
and maybe it gets so high that it makes things faulty? Maybe that's a long
shot but without seeing your actual code I don't know what else to say.

Try this:

onClipEvent(enterFrame) {
if( this._alpha <99) {
this._alpha +=5;
}
else {
this._alpha==100;
}
}

This insures that the alpha doesn't keep running to infinity. Maybe that
will fix the problem.

Brenda
B
4/16/2007 11:10:53 PM
By the way, I went to your website and clicked on The Gear button. I waited several minutes but the button doesn't disappear. The button looks fine on my end.

ewon15
4/16/2007 11:12:39 PM
ewon15
4/16/2007 11:16:48 PM
gotta love clients who don't get stuff...

anyway, try the site again and see if it craps out... it hasn't crapped out on
me yet but it always helps to have someone else test it too...

http://www.rainnetworks.com/betasites/vm


ewon15
4/16/2007 11:32:14 PM
B
4/16/2007 11:38:45 PM
I went over and tested it and The Gear button was still alive and well even 10
minutes after clicking on it.

However, I never did see anything fade in (according to what you said
regarding your script) so I was wondering if perhaps the new one wasn't sent
over yet?

I did clear my Temporary Internet Files to make sure I have the newest one.
ewon15
4/16/2007 11:41:03 PM
B
4/16/2007 11:49:58 PM
I cleared my cache again. The only thing that fades in is the main content
that loads when one of the buttons is clicked.

I don't see any buttons fading in. However, at least there are no
disappearing buttons so that's a good thing!!
ewon15
4/16/2007 11:51:39 PM
oh, i think you misunderstood... the stuff that was disappearing was the content... and now it fades in just like it should :0)

B
4/16/2007 11:54:10 PM
AddThis Social Bookmark Button