As3 tween - how do I keep with images with drop shadows going straight to black?

I'm using AS3 to create a twin impact between multiple images that have a shadow around them - works great except after 3+ the shadow shadow starts getting darker and darker - it makes sense but doesn't really want to happen.

Ideally I would like to dispense between 2 images, on the 3rd box is this or something else? I'm relatively new to AS3, so I'm pretty sure this is a bug :-)

Steps are taken: 1.) Loading images from xml document int xml class in AS3 2.) In the timer event, load a new image and call the following animation method:

tweener = new Tween(mcSlideHolder1, "alpha", None.easeNone,0,1,2,true);

      

Please let me know if this is unclear, I am trying to describe, but its a bit rough, since im not an AS3 expert :-)

UPDATE: I can get the previous one to clear and stop the stacking effect by adding:

while( nameOfContainer.numChildren > 0 )
       nameOfContainer.removeChildAt( 0 );

      

... but if I do that, then I kill the cool transition effect from one image to another.

0


source to share


3 answers


You haven't listed all your code, so it's hard to tell what's going on. But if it keeps getting darker and darker then I am convinced that the images are loading over and over again. Please make more of your code, especially the full XML handler function, and add it to the display list. We'll just need to adjust your code to only add these items at the start time and then rotate them through the display list, or permanently remove the last viewed one so it can be repeated next time without additional black / bleeding.



If you have a function that loads into those images, that function is called again, it loads the assets again on top of the first one, causing fading / bleeding.

0


source


You can try this: instead of applying a sample filter to each image separately, take all the images contained in a movie clip and apply a dropshadow filter to that movie clip (remove any fractions in the images).



0


source


Not sure if this is related or not, but it could be that your shadow gradient is one large object that is darker in the center and then diffuses around the edges, and then the shadow is the mask for that gradient. Therefore, if your shadows get closer to the center, they will get darker, because they allow you to show the darker part of the gradient.

0


source







All Articles