The main principle used here of achieving the blur effect is to create a number of movieclips containing copies of the object to blur. These clips have a alpha value much less than 100 to be transparent. Further the x values of the clips are all different by a small number.
Use of the component
IMPORTANT: Setting up the component on the stage choose only one as true and others false. onLoad is designed to execute only once when the frame loads. For more details how to execute certain functions see the end of this tutorial.
INSTRUCTIONS:
PARAMETERS:
This newer version of the component allows you to dynamically upload and blur pictures as well as create your own drawings or text or toggle between both options. To upload dynamically leave the piclip1 and piclip2 and enter the name and folder of the pics you want to blur, where it says name of the pic, which is set default to pic1.jpg and pic2.jpg. If you want your own text or drawings use textclip1 and 2.
- press button: true or false, use as a button and blur upon onPress.
- rollover button: true or false, use as a button and blur upon rollover.
- on Load: true or false, to blur only once automatically when frame is opened.
- autotoggle: true or false, change between objects to blur indefinitely.
- dynamic loading: true or false, when set true allows to blur a jpg object loaded dynamically.
- dyn pic1: enter name of jpg object to blur.
- dyn pic2: enter name of second jpg object to blur.
- or textclip1: create your own pic or text, either directly in the movieclip or have the movieclip to blur in the library and add linkage.
- or textclip2: same as textclip1. You can also toggle between dynamically loaded and textclip.
- no of pic copies: enter number. The higher the more there will be a blur effect.
- alpha value: enter number.
- toggle intervall: in milliseconds, will determine in which frequemcy toggling occurs.
There are several ways to use this components.
1. as a button: If you use this as a button and want to have a rollover
effect write this actionscript in the actions frame on the main stage.
compName.onRollOver=function(){
this.onRollOver();
}
compName.onRelease=function(){
FUNCTION here
}
2. to carry out autotoggle between two pics: This is the default function, which is already set.
The first rule is to give the component on the stage a unique name and to enter the action for the component (ONLY ONE TRUE!) in the property inspector.
3. If you want the component to get evoked only once when the frame is entered, check onLoad true in the property inspector and put this script in the actionframe:
ComponentName.Button.onLoad();
Conclusion
Increasing the size of the component on stage will also increase the picture. The only problem with this type of blurring is that depending on the size of the picture the flashplayer becomes slow especially on older computers. With DSL I noticed it is still pretty fast. When you use the component for smaller buttons, there is no problem. Questions address to this e-mail.
|