How to use with ActionScript

In this tutorial we're going to apply Creative Movie FX by writing some Action Script code; actually, we're going to instantiate and configure the effect directly from Action Script.


Click here to download the source file and the required files for solving this tutorial.


1. First thing's first... In order for this tutorial to work, the Creative Movie FX extension must be installed. If you didn't install it yet, please do it now; if you encounter any problems, visit „How to install an extension” tutorial.

2. Create a new Flash file and set-up the frame rate to 35 (from the document properties window).

Create file

Create file

3. Create a rectangle and convert it to a symbol (I drawn mine blue without any color for the stroke).

Create rectangle

Create rectangle and convert it to a symbol

4. Drag from Components an instance of Creative Movie FX to the library of your Flash file. If the Library panel isn't already open, you can open it by pressing CTRL+L or Window>Library.

Drag and drop component

Drag and drop component to the library

5. Now paste the following code into the Actions panel of the first (and unique) frame of the timeline:

_global["BlurEffect"] = xtd.effects.movieclip.BlurEffect;
var initObj = new Object();  
initObj.targetMC = _root.MyMC; 
initObj._effect = "Blur";  
initObj.effectParams = new Object();
initObj.effectParams.blur=15;
initObj._duration=50;    
this.attachMovie("Creative MovieFX DEMO","me",10,initObj);  
me.initEffect();

6. The result, after you compile, should look like this:

Preview your file

Preview your file

Thank you for your time and I hope this tutorial was useful to you. I invite you to read the rest of our tutorials and check out our other products on www.extendstudio.com. If you have any questions please contact us at support@extendstudio.com.