Panorama schließen

Abs Plugin abs.swf / abs.js for Flash and HTML5
by Hernán Sartorio - hernan@uruguay360.com.uy

Description

  • Let's you find the absolute position and attributes of a layer relative to the stage, no matter what the align, edge, scale, width/height, x/y or ox/oy settings are, of it or any of the infinite parents it may have.
  • Works with the scrollarea plugin too.
  • This plugin is also included in the downloads of the Tooltip and Auto Thumbs plugins.

Download

  • The plugin price is €15 is free and open source (see the forum thread for details).
  • You can download the plugin from its Github repository (and contribute if you wish).

Syntax / XML Usage Example

Include the plugin:
<plugin name="abs" 
        url="abs.swf" 
        alturl="abs.js" 
        keep="true"
        />

Usage example:
plugin[abs].get_x(destination, layer_name);

Plugin Actions

Action name
get_x(destination, layer_name, origin*)
get_y(destination, layer_name, origin*)

Calculates the layer's absolute x/y coordinate, and copies it to the destination variable.

Parameters:
  • destination
    The destination variable. If the variable doesn't exist it will be created.
  • layer_name
    The name of the layer.
  • origin (optional)
    The origin point of the layer that you wish to get the coordinates from.
    get_x possible values: left, center, right. Default is left.
    get_y possible values: top, center, bottom. Default is top.
Action name
get_width(destination, layer_name)
get_height(destination, layer_name)

Calculates the layer's absolute (real pixels) width/height value, and copies it to the destination variable.

Parameters:
  • destination
    The destination variable. If the variable doesn't exist it will be created.
  • layer_name
    The name of the layer.
Action name
get_scale(destination, layer_name)

Calculates the layer's absolute scale value, and copies it to the destination variable.

Parameters:
  • destination
    The destination variable. If the variable doesn't exist it will be created.
  • layer_name
    The name of the layer.

Example

Source
CLICK TO VIEW EXAMPLE