Proximity

Inherits from:none (Proximity is a root class)
  • Version: 1.1
  • Author: Brendan Dawes
  • Classpath: com.dragslidefade.Proximity
  • File last modified: Saturday, 11 February 2006, 14:18:31
Returns the distance of your mouse from a MovieClip
Example:
var p:Proximity = new Proximity(instanceName,1,300,100);

Summary

Constructor
Instance methods

Constructor

Proximity

function Proximity (
$target:MovieClip, $depth:Number, $maxDiff:Number, $scaleAmount:Number)
Parameters:
target :
the MovieClip to target
depth :
the depth of the MovieClip
maxDiff :
the maximum distance you want the effect to occur, in pixels
scaleAmount:
the amount you want the distance to be relatively scaled to, in pixels. You can also use negative numbers

Instance properties

maxDiff

maxDiff:Number
(read,write)

onProximityUpdate

onProximityUpdate:Function
Callback function triggered when the proximity updates, returns the distance

scaleAmount

scaleAmount:Number
(read,write)

Instance methods

attachCalc

function attachCalc (
)

remove

function remove (
)
Removes the onMouseMove event from the targeted MovieClip