Thursday, March 10, 2011

Shine Effect Examples

Shine Effect Examples





Please download and install the Shine Effect component before proceeding.
Click here to download the trial edition of the Shine Effect.
To install the Shine Effect component double-click the file downloaded and follow instructions.
1. Open a new Flash document. Set the size value of 500 x 200 px and the Stage color value of #003300.
2. Add a Static Text to the Stage. Set the text size value of 128 and the text color value of #339966. Enter the text "Hello world". Select this Text object.
3. Open the Commands menu and click the LFEBox item.

4. Check the Shine Effect
5. The selected Text object will be converted to a new Symbol item.
6. It is a simplest Shine Effect. Let's try it. Press Ctrl-Enter or CONTROL>TEST MOVIE

You can get the source FLA-file here.
7. Let's play with options. Double-click the symbol on the Stage to open it.
Select the ShineEffectParameters object on the "effect" layer and open the Component Inspector panel (WINDOW>COMPONENT INSPECTOR or Shift-F7).
8. Let's change the Brightness value of 130 and the Direction value of "Up-down".

You can get the source FLA-file here.
9. Let's change the Glow color value of #ffcc99 and the Glow blur value of 16.

You can get the source FLA-file here.
10. There is another way to change the properties of the effect. We can use
the extender object to override the internals of the Shine Effect. Let's see a few examples below.
11. Multi-beam light.
Change the Shine width value of 20 and the Direction value of "Left to right".
Open the Main Stage, select the Shine Efeect instance on the Stage.
Type "shiner" in the Instance Name. Open the ActionScript panel (WINDOW>ACTIONS or F9).
Type the following line:
shiner.extender = {alphas:[0,1,1,0,0,1,1,0,0,1,1,0], ratios:[0,1,51,52,102,103,152,153,203,204,254,255]};
  1. </pre>
  2. This code defines the 3-beam light.
  3. [kml_flashembed publishmethod="dynamic" fversion="9.0.0" movie="http://www.lfebox.com/files/shine-effect-demo4.swf" width="500" height="200" targetclass="flashmovie"]<a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a>
  4. [/kml_flashembed]
  5. You can get the source FLA-file <a title="Download the source of the demo4" href="http://www.lfebox.com/files/shine-effect-demo4.fla" target="_blank">here</a>.
  6. 12Light in the fog.
  7. Change the Shine width value of 300 and the Glow blur value of 100.
  8. Open the ActionScript panel (WINDOW&gt;ACTIONS or F9).
  9. Type the following lines:
  10. <pre lang="actionscript">shiner.extender = {extraSpace:30, alphas:[0,1,1,0], ratios:[0,100,155,255], update:update};
  11. function update(t:Number, src:Sprite, eff:Bitmap):void {
  12.   eff.y = 40 - 80*t*(1+t);
  13.   eff.scaleY = 1+t*t;
  14. }
This code defines the light in the fog effect.

You can get the source FLA-file here.
13. Fire light.
Open the ActionScript panel (WINDOW>ACTIONS or F9).
Type the following lines:
shiner.extender = {extraSpace:10, alphas:[0,0.6,1,0], ratios:[0,199,215,255], init:initShiner};
  1. function initShiner(src:Sprite, eff:Bitmap):void {
  2.   var p:Object = {iR:30, iG:-200, iB:-200, glBlrX:8, glBlrY:32, glC:[0x660000, 0xFF6600, 0xFFAA00, 0xFFFFCC]};
  3.   var colorTrans:ColorTransform = new ColorTransform();
  4.   colorTrans.redMultiplier = 1 + (colorTrans.redOffset = p.iR / 100);
  5.   colorTrans.greenMultiplier = 1 + (colorTrans.greenOffset = p.iG / 100);
  6.   colorTrans.blueMultiplier = 1 + (colorTrans.blueOffset = p.iB / 100);
  7.   eff.transform.colorTransform = colorTrans;
  8.   var glBlr:Number = p.glBlr;
  9.   var filter:GradientGlowFilter = new GradientGlowFilter(
  10.       0,
  11.       45,
  12.       p.glC,
  13.       [0111],
  14.       [064128255],
  15.       p.glBlrX,
  16.       p.glBlrY,
  17.       1,
  18.       15,
  19.       "outer"
  20.   );
  21.   eff.filters = [filter];
  22. }
This code defines the fire light effect.

You can get the source FLA-file here.
14. Inverted light
Open the ActionScript panel (WINDOW>ACTIONS or F9).
Enter the following lines:
function initShiner(src:Sprite, eff:Bitmap):void {
  1.   var matrix:Array = [
  2.     -10,    0,    0,    235,
  3.     0,     -1,    0,    0,    180,
  4.     0,    0,    -1,    0,    170,
  5.     0,    0,    0,    1,    0
  6.   ];
  7.   eff.filters = [new ColorMatrixFilter(matrix)];
  8. }
  9. shiner.extender = {init:initShiner, alphas:[0,0.96,0.96,0], ratios:[0,50,204,255]};
This code defines the inverted light effect.

You can get the source FLA-file here.

Source : tutorialized




No comments:

Post a Comment