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 FSGetUrl

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

All Implemented Interfaces:
  java.lang.Cloneable

    public class FSGetUrl

extends FSActionObject

FSGetUrl is used to display a web page or load a movie clip into the Flash Player.

Attributes
type | Identifies the action when it is encoded. Read-only.
url | The fully qualified uniform resource location where the movie clip or web page will be retrieved from.
target | A level in the Flash Player where the movie clip will be loaded or frame or window in the browser where the web page will be displayed.

To display a web page or new Flash movie the target can either be the name of the web browser frame or one of the following reserved words:

`"name"` | opens the new page in the frame with the name defined in an HTML <frame> tag.
`_blank` | opens the new page in a new window.
`_self` | opens the new page in the current window.
`_top` | opens the new page in the top level frame of the current window.
`_parent` | opens the new page in the parent frame of the frame where the Flash Player id displayed.
`""` | (blank string) opens the new page in the current frame or window.

To load a movie clip into the currently playing movie then the target is a string literal of the form "_leveln". The Flash Player supports the concept of virtual layers (analogous to the layers in the Display List). Higher levels are displayed in front of lower levels. The background of each level is transparent allowing movie clips on lower levels to be visible in areas not filled by the movie clip on a given level. The main movie is loaded into _level0. Movie clips are loaded into any level above this (1, 2, 124, etc.). If a movie clip is loaded into a level that already contains a movie clip then the existing clip is replaced by the new one.

# Examples

To create an action that will load a web page into the named frame:

     FSGetUrl anAction = new FSGetUrl("http://www.myserver.com/page.html", "myFrame");

To create an action that will load a web page in a new window:

     FSGetUrl anAction = new FSGetUrl("http://www.myserver.com/page.html", "_blank");

To create an action that will load a web page into the current window or frame:

     FSGetUrl anAction = new FSGetUrl("http://www.myserver.com/page.html", "");

or

     FSGetUrl anAction = new FSGetUrl("http://www.myserver.com/page.html");

To create an action that will load a movie clip into the currently playing movie:

     FSGetUrl anAction = new FSGetUrl("http://www.myserver.com/movieClip.swf",
                                    "_level1");

# History

The FSGetUrl is a class for representing the ActionGetUrl action of the Macromedia Flash (SWF) File Format Specification. It was introduced in Flash 1.

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
`FSGetUrl(FSCoder coder)` Construct an FSGetUrl object, initialising it with values decoded from an encoded object.
`FSGetUrl(FSGetUrl obj)` Constructs an FSGetUrl object by copying values from an existing object.
`FSGetUrl(java.lang.String urlString)` Constructs an FSGetUrl with the specified url.
`FSGetUrl(java.lang.String urlString, java.lang.String targetString)` Constructs an FSGetUrl with the specified url and target frame.

Method Summary
`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.
`void` | `decode(FSCoder coder)`
`void` | `encode(FSCoder coder)`
`boolean` | `equals(java.lang.Object anObject)` Returns true if anObject is equal to this one.
`java.lang.String` | `getTarget()` Gets the name of the target frame.
`java.lang.String` | `getUrl()` Gets the URL.
`int` | `length(FSCoder coder)`
`void` | `setTarget(java.lang.String aString)` Sets the name of the Target where the URL will be displayed.
`void` | `setUrl(java.lang.String aString)` Sets the URL of the file to be retrieved.

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

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

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

Constructor Detail

### FSGetUrl

    public FSGetUrl(FSCoder coder)

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

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

### FSGetUrl

    public FSGetUrl(java.lang.String urlString,
                    java.lang.String targetString)

  Constructs an FSGetUrl with the specified url and target frame.

  Parameters:
    `urlString` - a fully qualified URL.
    `targetString` - the location (in the Flash Player or web browser) where the contents of file retrieved via the url will be displayed.

### FSGetUrl

    public FSGetUrl(java.lang.String urlString)

  Constructs an FSGetUrl with the specified url. The target defaults to the current window.

  Parameters:
    `urlString` - a fully qualified URL.

### FSGetUrl

    public FSGetUrl(FSGetUrl obj)

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

  Parameters:
    `obj` - an FSGetUrl object.

Method Detail

### getUrl

    public java.lang.String getUrl()

  Gets the URL.

  Returns:
    the URL that web page or movie clip will be loaded from.

### getTarget

    public java.lang.String getTarget()

  Gets the name of the target frame.

  Returns:
    the name of the location (in the Flash Player or web browser) where the web page or movie clip will be displayed.

### setUrl

    public void setUrl(java.lang.String aString)

  Sets the URL of the file to be retrieved.

  Parameters:
    `aString` - a fully qualified URL.

### setTarget

    public void setTarget(java.lang.String aString)

  Sets the name of the Target where the URL will be displayed. The target may be a frame or window in a web browser when displaying a web page or a level in the current movie when loading a movie clip.

  Parameters:
    `aString` - the name of the location (in the Flash Player or web browser) where contents of file retrieved via the url will be displayed.

### 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