views:

77

answers:

1

I found this reflection class:

http://www.adobe.com/devnet/flash/articles/reflect_class_as3.html

However, I have some questions about it.

Let´s say I have a moviclip named “ref_mc”, to add a reflection I use:

import com.pixelfumes.reflect.*;

var r1:Reflect = new Reflect({mc:ref_mc, alpha:50, ratio:50, distance:0, updateTime:0, reflectionDropoff:1});

Now, the questions:

1) How do I update the parameters for the reflection r1 after it is created?

2) Is there a way to check whether the movieclip “ref_mc” already has a reflection?

3) Anyone has the .fla for the example with bars adjustments and code sample shown on the page (it is not on the download .zip)?

Thanks in advance.

A: 

1/ you can't. You need to reinstantiate it.

r1.destroy();
r1 = new Reflect({mc:ref_mc, alpha:50, ratio:50, distance:0, updateTime:0, reflectionDropoff:1});

2/ you can check whether it contains a movieclip instance with instance name 'reflectionBMP'.

Creynders