Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.flagstone.transform
Class FSWith

    java.lang.Object
      com.flagstone.transform.FSTransformObject
          com.flagstone.transform.FSActionObject
              com.flagstone.transform.FSWith

All Implemented Interfaces:
  java.lang.Cloneable

    public class FSWith

extends FSActionObject

FSWith is a stack-based action and supports the with statement from the ActionScript language.

      with(_root.movieClip)
      {
      gotoAndPlay("frame");
      }

Attributes
type | A code identifying the action when it is encoded. Read-only.
actions | An array of actions that will be executed for the specified movie clip.

The FSWith action temporarily selects the movie clip allowing the following stream of actions to control the movie clip's time-line.

The ActionScript shown above is represented (compiled) into the following actions:

     clipActions.add(new FSPush("frame"));
     clipActions.add(new FSPush(1));
     clipActions.add(new FSPush("gotoAndPlay"));
     clipActions.add(FSAction.ExecuteFunction());

     // Get the movie clip

     actions.add(new FSPush("_root"));
     actions.add(FSAction.GetVariable());
     actions.add(new FSPush("movieClip"));
     actions.add(FSAction.GetAttribute());

     actions.add(new FSWith(clipActions));

# History

The FSWith class represents the ActionWith action in the Macromedia Flash (SWF) File Format Specification. It was introduced in Flash 5. FSWith supersedes the FSSetTarget action.

Field Summary

Fields inherited from class com.flagstone.transform.FSActionObject
`Call, ExceptionHandler, GetUrl, GetUrl2, GotoFrame, GotoFrame2, GotoLabel, If, Jump, length, NewFunction, NewFunction2, Push, RegisterCopy, SetTarget, Table, type, WaitForFrame, WaitForFrame2, With`

Constructor Summary
`FSWith(java.util.ArrayList anArray)` Constructs an FSWith object with an array of actions.
`FSWith(FSCoder coder)` Construct an FSWith object, initialising it with values decoded from an encoded object.
`FSWith(FSWith obj)` Constructs an FSWith object by copying values from an existing object.

Method Summary
`void` | `add(FSActionObject anAction)` Adds the action object to the array of actions.
`void` | `appendDescription(java.lang.StringBuffer buffer, int depth)` AppendDescription is used to present a string description of the object including all nested objects up to a specified depth.
`java.lang.Object` | `clone()` Creates a deep copy of the entire object.
`void` | `decode(FSCoder coder)`
`void` | `encode(FSCoder coder)`
`boolean` | `equals(java.lang.Object anObject)` Returns true if anObject is equal to this one.
`java.util.ArrayList` | `getActions()` Get the array of actions that are executed for the movie clip target.
`int` | `length(FSCoder coder)`
`void` | `setActions(java.util.ArrayList anArray)` Set the array of actions that will be executed for the movie clip target.

Methods inherited from class com.flagstone.transform.FSActionObject
`getType, length`

Methods inherited from class com.flagstone.transform.FSTransformObject
`name, toString`

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### FSWith

    public FSWith(FSCoder coder)

  Construct an FSWith object, initialising it with values decoded from an encoded object.

  Parameters:
    `coder` - an FSCoder containing the binary data.

### FSWith

    public FSWith(java.util.ArrayList anArray)

  Constructs an FSWith object with an array of actions.

  Parameters:
    `anArray` - the array of action objects.

### FSWith

    public FSWith(FSWith obj)

  Constructs an FSWith object by copying values from an existing object.

  Parameters:
    `obj` - an FSGotoFrame object.

Method Detail

### add

    public void add(FSActionObject anAction)

  Adds the action object to the array of actions.

  Parameters:
    `anAction` - an object belonging to a class derived from FSActionObject.

### getActions

    public java.util.ArrayList getActions()

  Get the array of actions that are executed for the movie clip target.

  Returns:
    the array of action objects.

### setActions

    public void setActions(java.util.ArrayList anArray)

  Set the array of actions that will be executed for the movie clip target.

  Parameters:
    `anArray` - the array of action objects.

### clone

    public java.lang.Object clone()

  Description copied from class: `FSTransformObject`
  Creates a deep copy of the entire object.

  Overrides:
    `clone` in class `FSTransformObject`
  Returns:
    a copy of the object.

### equals

    public boolean equals(java.lang.Object anObject)

  Description copied from class: `FSActionObject`
  Returns true if anObject is equal to this one. Objects are considered equal if they would generate identical binary data when they are encoded to a Flash file.

  Overrides:
    `equals` in class `FSActionObject`
  Returns:
    true if this object would be identical to anObject when encoded.

### appendDescription

    public void appendDescription(java.lang.StringBuffer buffer,
                                  int depth)

  Description copied from class: `FSTransformObject`
  AppendDescription is used to present a string description of the object including all nested objects up to a specified depth. This method provide a more controlled way of creating a string representation of an object since large objects such as font or shape definitions can contain dozens of nested objects. The representation of the object is appended to the StringBuffer, showing the name of the class and values of the attributes it contains. If the object contains any attributes that are objects then the object graph will be traversed up to the specified depth. If objects are nested at a level less than specified depth then the full string representation of the object is displayed. For objects at the specified depth only the name of the class is displayed. Any objects below this depth are not displayed.

  Specified by:
    `appendDescription` in class `FSTransformObject`
  Parameters:
    `buffer` - a StringBuffer to which the description of each object is appended.
    `depth` - the maximum level of nesting up to which objects will be displayed.

### length

    public int length(FSCoder coder)

  Overrides:
    `length` in class `FSActionObject`

### encode

    public void encode(FSCoder coder)

  Overrides:
    `encode` in class `FSActionObject`

### decode

    public void decode(FSCoder coder)

  Overrides:
    `decode` in class `FSActionObject`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD