Receiver.onTouchEnd( callback )

Use this method to pass a function to a receiver, which should be called when the controlling user lifts his finger from the smartphone's screen.

 

Callback arguments

none

 

Example

In the following example, a developer is creating a game, in which a gorilla throws a banana at buildings. The longer a player holds down her finger on the screen of her smartphone, the further the banana will go.

var throwingPower = 0;

var playerReceiver = PLUGPIN
    .createReceiver( { "name" : "Gorilla Power" } )
    .onTouch( function()
    {
        throwingPower = throwingPower + 0.1;
    }
    .onTouchEnd( function()
    {
        throwBanana( throwingPower );
        throwingPower = 0;
    };


 

 

Contact us


Talk to us!
Tell us anything you want to and please add your contact information.




Our contact info
tel. +31 (0) 20 2170013
info@plugpin.com

Groenhoedenveem 28
1019 BL Amsterdam
The Netherlands

News letter


Enter your e-mail address to stay informed on everything PlugPIN!