FlashEff Methods
General | Patterns | Properties | Methods | Events | XML
FlashEff Methods
Method | Description |
addCommand |
Adds a new command pattern to the target object. The new command will be executed on the event specified as argument.
Parameters command:IFlashEffCommand - The reference to the command pattern created by code. eventType:String - The event on which the selected command will be executed. Possible values are rollOver, rollOut, press and release. Returns IFlashEffCommand - A reference to the newly created command pattern. Example This example lists all the commands applied to the target object, in this case, a single navigateToURL command (FECNavigateToURL). Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FECNavigateToURL pattern into the Library. Bring up the Actions panel and paste the following code into it:
import com.jumpeye.flashEff.command.navigateToURL. FECNavigateToURL;
|
addCommandByName |
Adds a new command pattern to the target object. The new command will be executed on the event specified as argument.
Parameters commandName:String - The full path of the command pattern class added to the target object. eventType:String - The event on which the selected command will be executed. Possible values are rollOver, rollOut, press and release. initObj:Object (default = null) - An object used to initialize the command pattern. Returns IFlashEffCommand - A reference to the newly created command pattern. Example This example lists all the commands applied to the target object, in this case, a single navigateToURL command (FECNavigateToURL). Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FECNavigateToURL pattern into the Library. Bring up the Actions panel and paste the following code into it:
var myEffect:FlashEff = new FlashEff();
|
addFilter |
Adds a new filter pattern to target symbol or text field.
Parameters filter:IFlashEffFilter - The reference to the filter pattern, created separately by code. Example This example lists all the filters applied to the target object, in this case, a single reflection filter (FEFReflection). Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FEFReflection pattern into the Library. Bring up the Actions panel and paste the following code into it: import com.jumpeye.flashEff.filter.reflection. FEFReflection;
var myPattern:FEFReflection = new FEFReflection();
|
addFilterByName |
Adds a new Filter pattern to target symbol or text.
Parameters filterName:String - The full package and class name of the filter that will be applied. initObject:Object (default = null) - [optional] An object used to set up the new filter. Returns IFlashEffFilter - A reference to the newly created filter pattern. Example This example lists all the filters applied to the target object, in this case, a single reflection filter (FEFReflection). Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FEFReflection pattern into the Library. Bring up the Actions panel and paste the following code into it:
var myEffect:FlashEff = new FlashEff();
|
applyButtonEffect | Reapplies the ButtonEffect pattern to the target object, after it has been removed with the removeButtonEffect() method. |
buttonPress | Manually applies the mouse press state to the target object, without the mouse press action, and dispatches the FLASHEFFEvents.MOUSE_DOWN event. This is useful when the component should visually change the state of the target object but not as a result of mouse interaction. |
buttonRelease | Manually applies the mouse release state to the target object, without the mouse release action, and dispatches the FLASHEFFEvents.MOUSE_UP event. This is useful when the component should visually change the state of the target object but not as a result of mouse interaction. |
buttonRollOut | Manually applies the roll out state to the target object, without the mouse moving out of it, and dispatches the FLASHEFFEvents.ROLL_OUT event. This is useful when the component should visually change the state of the target object but not as a result of mouse interaction. |
buttonRollOver | Manually applies the roll over state to the target object, without the mouse getting over it, and dispatches the FLASHEFFEvents.ROLL_OVER event. This is useful when the component should visually change the state of the target object but not as a result of mouse interaction. |
changeTarget |
Changes the target of the FlashEff by applying a hide first on the last visible target, then it shows the newTarget object with the selected show pattern. The method does suppress autoPlay and will count the delays. Parameters newTarget:DisplayObject The object to be used instead the current target. Example
myEffect.changeTarget(myNewTarget);
|
dispatchEvent |
Dispatches a FLASHEFFEvent type of event. Parameters ev:Event - The event object dispatched as parameter. This object has a type which usually is one of the types described in the FLASHEFFEvent class and additional information about the event that is being dispatched. Returns Boolean - A value of true if the event was successfully dispatched. A value of false indicates failure or that preventDefault() was called on the event. |
getFilter |
Returns a reference to the filter pattern specified in the argument.
Parameters filterName:String - The full package and class name of the filter pattern that should be returned. Returns IFlashEffFilter - A reference to the desired filter pattern or the value null if it was not found among the filter patterns applied to the target object. Example This example adds a filter to a clip (symbol) called myClip and lists the filter by using the apropriate methods. Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FEFReflection pattern into the Library. Bring up the Actions panel and paste the following code into it:
var myEffect:FlashEff = new FlashEff();
|
getFilterAt |
Returns the filter pattern that exists at the specified index.
Parameters index:uint - The index which the target filter pattern has in the list of filters applied to the target symbol or text. Returns IFlashEffFilter - The filter pattern that is located at the specified index. Example This example adds a filter to a clip (symbol) called myClip and lists the filter by using the apropriate methods. Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FEFReflection pattern into the Library. Bring up the Actions panel and paste the following code into it:
var myEffect:FlashEff = new FlashEff();
|
hide |
Hides the target object using the pattern currently applied to the target object (symbol or text field). If the FlashEff instance does not have a symbol or text pattern applied, it will not execute anything.
Example The next example applies a hide transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip. The hide transition will not execute automatically since the hideAutoPlay property is set to false, but it will execute on mouse click over the target clip. Create a movie clip on the stage, give it an instance name of myClip and also place a button on the stage and name it buttonInstance. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:
import com.jumpeye.flashEff.symbol.alpha. FESAlpha;
|
removeAll | Removes all the show/hide effects, filters, commands and button effects added through the FlashEff object, to the target object (symbol or text field), canceling any functionality provided by them. This method will not remove the FlashEff object. To remove the FlashEff object too, you'll need to remove it from the display list. |
removeAllCommands |
Removes all the command patterns applied to the target object.
Example This example adds the navigateToURL command to a clip, on both, the mouse press and mouse release actions and displays the list of commands. When a button is pressed, the commands are removed. Create a movie clip on the stage, give it an instance name of myClip and also place a button on the stage and name it buttonInstance. Next, from the Components panel drag the FlashEff component and the FECNavigateToURL pattern into the Library. Bring up the Actions panel and paste the following code into it:
import com.jumpeye.flashEff.command.navigateToURL. FECNavigateToURL;
|
removeAllCommandsByEventType |
Removes all the command patterns from the target object, that are executed on a specified event.
Parameters eventType:String - The type of event for which all the command patterns will be removed. Possible values are rollOver, rollOut, press and release. Example This example adds the navigateToURL command to a clip, on both, the mouse press and mouse release actions and displays the list of commands. When a button is pressed, the command added for the mouse press event is removed. Create a movie clip on the stage, give it an instance name of myClip and also place a button on the stage and name it buttonInstance. Next, from the Components panel drag the FlashEff component and the FECNavigateToURL pattern into the Library. Bring up the Actions panel and paste the following code into it:
import com.jumpeye.flashEff.command.navigateToURL. FECNavigateToURL;
|
removeAllFilters | Removes all the filter patterns applied on the current FlashEff component instance, visually removing them from the target symbol or text, but leaving all the other types of patterns. |
removeButtonEffect | Removes the current ButtonEffect pattern applied to the target object. |
removeCommand |
Removes the specified command pattern instance from the target object.
Parameters command:IFlashEffCommand - The pattern instance that should be removed. Example This example adds a navigateToURL and a goToFrame command to a clip, on the mouse press action and displays the list of commands. When a button is pressed, the goToFrame command is removed. Create a movie clip on the stage, give it an instance name of myClip and also place a button on the stage and name it buttonInstance. Next, from the Components panel drag the FlashEff component, the FECNavigateToURL and the FECGoToFrame patterns into the Library. Bring up the Actions panel and paste the following code into it:
import com.jumpeye.flashEff.command.navigateToURL. FECNavigateToURL;
|
removeCommandByName |
Removes from the target object the command pattern identified by its full path and class name.
Parameters commandName:String - The full path and class name of the command pattern to be removed. Example This example adds a navigateToURL and a goToFrame command to a clip, on the mouse press action and displays the list of commands. When a button is pressed, the goToFrame command is removed. Create a movie clip on the stage, give it an instance name of myClip and also place a button on the stage and name it buttonInstance. Next, from the Components panel drag the FlashEff component, the FECNavigateToURL and the FECGoToFrame patterns into the Library. Bring up the Actions panel and paste the following code into it:
import com.jumpeye.flashEff.command.navigateToURL. FECNavigateToURL;
|
removeEffect |
Stops and removes an effect applied to the target object, while that effect is still playing. This function will not have any effect if it's applied before the effect starts or after the effect has finished (except when isTargetVisibleAtEnd is set to true and the transition type was hide). Depending on the value of the internalCall argument, it can trigger a FLASHEFFEvents.TRANSITION_END event or not. If the method was called from within an internal class or a pattern object, this parameter should be true and the event will not trigger. If the method was called from outside the FlashEff class or outside the patterns, then the parameter's value should be false (the default value) and the FLASHEFFEvents.TRANSITION_END event will be triggered.
This also has the possibility to remove a specific symbol or text pattern from the target object, by specifying a second argument. If that pattern argument is not specified, the method removes the current symbol or text pattern that is being applied (while the transition is going on). In the case of a hide transition, either on a symbol or a text object, the target object will be rendered invisible in the end, by the transition. If removeEffect() is called after the transition has finished, the target object will be displayed only if the isTargetVisibleAtEnd is set to true, otherwise the target object will remain hidden (the method has no effect). Parameters internalCall:Boolean (default = false) - [optional] Instructs the method to dispatch a FLASHEFFEvents.TRANSITION_END event, if the value is false, that is if the method is not called from inside a pattern object. pattern:IFlashEffSymbolText (default = null) - The symbol or text pattern that should be removed from the list of patterns applied to the target object. That type of pattern is a show/hide pattern, meaning that it can only apply show or hide transitions on symbols or text fields. Example The next example applies a hide transition based on the Alpha pattern (FETAlpha), on a text field called myTextField. The hide transition will be executed automatically, with a delay of a second. By pressing the button on the stage, the removeEffect() method will be called. In both cases (button pressed during and after the transition), a FLASHEFFEvents.TRANSITION_END event will be dispatched. Place a dynamic text field on the stage, enter the text "The quick brown fox jumps over the lazy dog" into it and give it an instance name of myTextField. Set the anti-alias setting to "Anti-alias for animation", enable the "Render text as HTML" option and embed the characters using the Auto Fill option in the Embed characters dialog box. Also place a Button on the stage and give it an instance name of buttonInstance. Next, from the Components panel drag the FlashEff component and the FETAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:
import com.jumpeye.flashEff.text.alpha.FETAlpha;
|
removeFilter |
Removes a specified filter from the target symbol or text. It returns a Boolean value (true) if it's successful.
Parameters filter:IFlashEffFilter - The reference to the filter pattern created separately, by code. |
removeHideTransition | Removes the last symbol or text pattern used for the hide transition. |
removeShowTransition | Removes the last symbol or text pattern used for the show transition. |
setXML |
Allows setting up the component according to xml data passed as parameter.
Parameters xml:* - The XML object that contains setup information for the FlashEff component instance. It can be either of type XML, a XML object created by code, or of type String, the same xml data passed as String argument. |
show |
Applies a show transition to the target object, if a symbol or text pattern has been applied to it. If the FlashEff object does not have a symbol or text pattern applied, it will not execute any actions.
Parameters forceAutoHide:* (default = null) - [optional] If true, the show method will execute a show transition and then, force FlashEff to execute a hide transition after the time interval specified at hideDelay, even if hideAutoPlay is set to false. Otherwise, only the show transition will be executed. Example The next example applies a show transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip. The show transition will not execute automatically since the showAutoPlay property is set to false, but it will execute on mouse click over the target clip. Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:
import com.jumpeye.flashEff.symbol.alpha.FESAlpha;
|
swap |
Applies the swap transition between two target objects. The first target object is the one that is currently visible and will be hidden with a hide transition if swapType is FlashEff.SWAP_TYPE_HIDE or FlashEff.SWAP_TYPE_HIDE_AND_SHOW. The second target object is the one that will be made visible after the transition, using a show transition, if swapType is FlashEff.SWAP_TYPE_SHOW or FlashEff.SWAP_TYPE_HIDE_AND_SHOW. Parameters newTarget:DisplayObject (default = null) - The second target object that will replace the current target object. If this is null, then the object specified at swapTarget will be used. swType:String (default = "") - The type of swap transition applied. If it is a blank String (""), then the transition type will be the one specified at swapType. Example The next example uses the swap() method to apply a swap transition between two text fields, by pressing on a button. The example applies a show transition based on the Alpha pattern (FETAlpha) to a text field called myTextField1 and then swaps the text field with another one called myTextField2. The swap operation hides the first text field using the Blur pattern (FETBlur) and then displays the second text field at the same time with the Alpha pattern. Place two dynamic text fields on the stage, enter the "This is the first text field" text into one of them and "This is the second text field" text into he other and give them instance names of myTextField1 for the first text field and myTextField2 for the second one. Change the anti-alias setting to "Anti-alias for animation", enable the "Render text as HTML" option and embed the characters using the Auto Fill option in the Embed characters dialog box for both text fields. Next, place a button on the Stage and give it the instance name of swapButton. Finally, from the Components panel drag the FlashEff component and the FETAlpha and FETBlur patterns into the Library. Bring up the Actions panel and paste the following code into it:
import com.jumpeye.flashEff.text.alpha.FETAlpha;
|
transitionEffect |
Starts a show or hide effect, according to the argument's value.
Parameters type:String (default = "show") - The type of transition to be executed. Possible values are show and hide. Example The next example applies a show transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip. The show transition will not execute automatically since the showAutoPlay property is set to false, but it will execute on mouse click over the target clip. Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:
import com.jumpeye.flashEff.symbol.alpha.FESAlpha;
|
General | Patterns | Properties | Methods | Events | XML