API Documentation for: 1.1.23
Show:

CombinedCallback Class

Defined in: CombinedCallback:8
Namespace: cloudkid

A function that is used as a normal callback, but checks an object for a property in order to combine two callbacks into one. For example usage:

var voPlayer = new cloudkid.VOPlayer(); var callback = cloudkid.CombinedCallback.create(myFunc.bind(this), voPlayer, "playing", "_callback"); Animator.play(myClip, "myAnim", callback);

In this example, when Animator calls 'callback', if voPlayer["playing"] is false, 'myFunc' is called immediately. If voPlayer["playing"] is true, then voPlayer["_callback"] is set to 'myFunc' so that it will be called when voPlayer completes.

Constructor

CombinedCallback

(
  • call
  • obj
  • prop
  • callProp
)

Defined in CombinedCallback:8

Parameters:

  • call Function

    The callback to call when everything is complete.

  • obj

    The object to check as an additional completion dependency.

  • prop String

    The property to check on obj. If obj[prop] is false, then it is considered complete.

  • callProp String

    The property to set on obj if obj[prop] is true when the CombinedCallback is called.

Item Index

Methods

Methods

create

(
  • call
  • obj
  • prop
  • callProp
)
static

Defined in create:34

Creates a CombinedCallback for use.

Parameters:

  • call Function

    The callback to call when everything is complete.

  • obj

    The object to check as an additional completion dependency.

  • prop String

    The property to check on obj. If obj[prop] is false, then it is considered complete.

  • callProp String

    The property to set on obj if obj[prop] is true when the CombinedCallback is called.