Main Page | Packages | Class Tree | Index | Help

com.mosesSupposes.util

class MixerFX

Object
  |
  +--com.mosesSupposes.util.MixerFX

Implemented Interfaces: IFuseFX

class MixerFX
extends Object

MixerFX: tween one of this extension's registry keys directly on a Sound instance without subclassing Sound.

Usage:
Another approach is to subclass Sound, as shown in the SoundPlus example.
import com.mosesSupposes.fuse.*;
import com.mosesSupposes.fusefx.*;
import com.mosesSupposes.util.*;
 
ZigoEngine.register( PennerEasing );
FuseFX.register( MixerFX );
 
var mySound:Sound = new Sound();
mySound.attachSound("librarySound");
mySound.start(0, 10);
 
// Fade to half volume using the engine
ZigoEngine.doTween(mySound, MixerFX.VOLUME, 50, 2, "easeInOutQuint");
 
// You can't use the constants with Fuse's object-literal syntax,
// so instead of MixerFX.pan you should use the value of the constant "panFX"
var f:Fuse = new Fuse({ target:mySound, panFX:100, time:2, ease:"easeInOutQuint" });
f.start();
This extension provides only the most basic controls, volume and pan. It could be updated to include more complex Sound.setTransform controls.


Author:
Moses Gunesch

Version:
0.2


Field Summary

public static
PAN: String
Tweens a Sound object's pan level

public static
VOLUME: String
Tweens a Sound object's volume level

Method Summary

public
addTween ( target: Object, prop: String, endval: Object ): Boolean
Required by IFuseFX for compliance with FuseFX. Setup, called just prior to tweening.

public
defineProperties ( ): Array
Required by IFuseFX for compliance with FuseFX.

public
destroy ( target: Object ): Void
Required by IFuseFX for compliance with FuseFX. Cleanup, called just prior to deletion. Listeners are removed by FuseFX.

public
onTweenUpdate ( o: Object ): Void
Required by IFuseFX for compliance with FuseFX. Standard event fired by the engine on its update pulse just after updating the property.



Field Documentation

PAN

public static var PAN: String = "panFX"
Tweens a Sound object's pan level

VOLUME

public static var VOLUME: String = "volumeFX"
Tweens a Sound object's volume level


Method Documentation

addTween

public function addTween(target: Object,
 prop: String,
 endval: Object): Boolean
Required by IFuseFX for compliance with FuseFX. Setup, called just prior to tweening.

Specified by:

Parameters:
target
The tween target object (not necessary to store a hard reference!)
prop
The tween property which has been pre-verified as one of this extension's keys.
endval
The tween end-value passed by the user (for special cases like type checking)

defineProperties

public function defineProperties(): Array
Required by IFuseFX for compliance with FuseFX.

Specified by:

Returns:
An Array of FXProperty instances.

destroy

public function destroy(target: Object): Void
Required by IFuseFX for compliance with FuseFX. Cleanup, called just prior to deletion. Listeners are removed by FuseFX.

Specified by:

Parameters:
target
The original tween target, which may be missing. Passed to enable extensions to avoid storing a hard reference to tween targets.

onTweenUpdate

public function onTweenUpdate(o: Object): Void
Required by IFuseFX for compliance with FuseFX. Standard event fired by the engine on its update pulse just after updating the property.

Specified by:

Parameters:
o
Event object sent by engine containing {target:Object, props:Array}

The documentation was generated from the following file: