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.
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).
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.
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:
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]};
- </pre>
- This code defines the 3-beam light.
- [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>
- [/kml_flashembed]
- 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>.
- 12. Light in the fog.
- Change the Shine width value of 300 and the Glow blur value of 100.
- Open the ActionScript panel (WINDOW>ACTIONS or F9).
- Type the following lines:
- <pre lang="actionscript">shiner.extender = {extraSpace:30, alphas:[0,1,1,0], ratios:[0,100,155,255], update:update};
- function update(t:Number, src:Sprite, eff:Bitmap):void {
- eff.y = 40 - 80*t*(1+t);
- eff.scaleY = 1+t*t;
- }
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:
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};
- function initShiner(src:Sprite, eff:Bitmap):void {
- var p:Object = {iR:30, iG:-200, iB:-200, glBlrX:8, glBlrY:32, glC:[0x660000, 0xFF6600, 0xFFAA00, 0xFFFFCC]};
- var colorTrans:ColorTransform = new ColorTransform();
- colorTrans.redMultiplier = 1 + (colorTrans.redOffset = p.iR / 100);
- colorTrans.greenMultiplier = 1 + (colorTrans.greenOffset = p.iG / 100);
- colorTrans.blueMultiplier = 1 + (colorTrans.blueOffset = p.iB / 100);
- eff.transform.colorTransform = colorTrans;
- var glBlr:Number = p.glBlr;
- var filter:GradientGlowFilter = new GradientGlowFilter(
- 0,
- 45,
- p.glC,
- [0, 1, 1, 1],
- [0, 64, 128, 255],
- p.glBlrX,
- p.glBlrY,
- 1,
- 15,
- "outer"
- );
- eff.filters = [filter];
- }
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:
Open the ActionScript panel (WINDOW>ACTIONS or F9).
Enter the following lines:
function initShiner(src:Sprite, eff:Bitmap):void {
- var matrix:Array = [
- -1, 0, 0, 0, 235,
- 0, -1, 0, 0, 180,
- 0, 0, -1, 0, 170,
- 0, 0, 0, 1, 0
- ];
- eff.filters = [new ColorMatrixFilter(matrix)];
- }
- 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.
No comments:
Post a Comment