flarex navigation main use flarex create flares create alphamods download goodies submit stuff reference



lensflare creation process

Author: Michael Hopkins / digital thought

Email: dthought@virtual-fx.net
Please post support requests on the flare[x] message board!
I am not able to answer direct email questions.

Website: http://www.neoskopos.com/~dthought

SKILL LEVEL: VARIABLE


• Creating a lensFlare varies in skill level depending on what you are trying to achieve. Whilst not necessarily reliant on actionScript, lensFlares are more to do with drawing.

Creating your first lensFlare


Creating lensFlares is not all that scary - but there are a few things of which you should be aware. This is more of a reference guide than an actual tutorial, but that should not cause any problems.

The frist thing with creating lensFlares is to have an idea of what you want your flare to look like. You don't need to plan every single little inkling detail out, but if you have a general idea of the visual you are aiming for, your life will be easier. If you are making your first few lensFlares, it may perhaps be an idea to find an image which contains a flare you want to recreate and then work from there.

Step I - Creating and laying out elements
Start with the "f-base.fla" file, included in the flare[x] download. As you draw each element, they should be contained within their own unique movieClip. The actual naming of the objects in the Library palette may be whatever you wish. However, each element is required to have its own unique instance name, in the form of element followed by a number. An example of this is element42. Each of your elements must be layed out inside a parent movieClip, which has an instance name of flarex. Your first element should be named element1.

When flare[x] first loads a lensFlare, it creates a positional matrix based on where your flare elements are located, based on a width of 512 pixels. Any elements centred on 0, 0 will be positioned where the flareDrag object is located in your main project. Elements may be based beyond 0 or 512 pixels and they will be positioned accordingly. Place elements to the left of (0, 0) in the main lensFlare stage to achieve effects such as secondary occlusions behind a flare source. When positioning elements, I recommend you use the Info palette so as to be pixel perfect.
  


You may reuse elements as many times as you wish in a flare, as long as each has a unique instance name. Elements may contain animation, scripting, bitmaps, vectors, text... anything you wish.

Step II - Adjust the scripting
The second and final step, once you have completed drawing, naming and laying out your flare, is to set some variables. flare[x] looks for these variables to tell how many elements it needs to look after, as well as define rotators. Rotators are elements that rotate in relation to the centre of your movie.

In the main timeline, on frame one, is a keyframe labelled 'Edit these variables'. Bring up the Actions window, and you will see three lines of code, and some commenting. However, you only need to change two of these lines. The first, noElements, should be set to the total number of elements in your lensFlare, minus one. This is because when flare[x] creates the positional matrix, the first entry is referenced as '0'.

The second line to edit is the rotArray, or the Rotational Array if you will. If you do not have any elements you wish to rotate, you still need to have this line. However, inside the array do not put any information. An array with no entries will read _parent:rotArray = new Array();
If you have elements you wish to have rotated, put the instance name's associated number inside quotation marks. Separate your entries with a comma. For example, if you wanted element2, element13 and element16 to rotate, you would have __parent:rotArray = new Array("2", "13", "16");

The third line automatically calculates the amount of entries in the rotation array. It does not need to be changed.

Name your completed file as you like, but it must begin with "f-". For example, "f-sample-1.swf".

Congratulations! All you need to do now is publish your FLA file and you should be ready to use it with flare[x]!


© Copyright 1999-2001/ USA America Inc.All rights reserved. Last updated --  Read our Privacy Policy

  
Webmaster & Submissions:
Contact Administration

Site Advertising:
Rates and Information


» Get tutorial template
» Virtual-FX Team




 

Download the buttons
Join our mailing list!
Enter your Email address below, then click the 'Join List' button: 

Subscribe Unsubscribe
Powered by ListBot