Main Page | Packages | Class Tree | Index | Help

com.mosesSupposes.tweentargets

class ScreenWrap

A non-FuseFX example

Object
  |
  +--com.mosesSupposes.tweentargets.ScreenWrap


class ScreenWrap
extends Object

ScreenWrap: adds Atari-style screen-wrapping to MovieClip movement.

Usage:
There are three general approaches to extending the ZigoEngine. The most basic is subclassing as shown in the SoundPlus example. FuseFX provides the option to define surrogate tween properties. However, neither of those solutions is the right choice for ScreenWrap, because we want to take advantage of the engine's built-in bezier-tween functionality, which works directly with a target's _x and _y properties.

This class shows a third approach: creating a surrogate target that wraps the actual target with tweenable _x and _y properties.
ZigoEngine.doTween(new ScreenWrap(logo_mc), '_x,_y', ['2000', '1000'], 3, 'easeInOutExpo');
ZigoEngine operates on the ScreenWrap instance instead of the real target MovieClip.

One disadvantage to creating extensions in this fashion is that property-conflicts are not automated and so they have to be handled manually, see onTweenAdd for more on this.



Property Summary


_x: Number (read, write)



_y: Number (read, write)


Constructor

public
ScreenWrap ( target: Object)


Method Summary

public
destroy ( ): Void
Instances of this extension have to be deleted manually. Call this method first.



Property Documentation

_x

_x: Number (read, write)

_y

_y: Number (read, write)

Constructor Documentation

ScreenWrap

public function ScreenWrap(target: Object)

Method Documentation

destroy

public function destroy(): Void
Instances of this extension have to be deleted manually. Call this method first.


The documentation was generated from the following file: