Sha256: 34702799e0c15c7adb056a036b071ec1503f00b716ca7517b3ff1369589a3e57

Contents?: true

Size: 1.43 KB

Versions: 31

Compression:

Stored size: 1.43 KB

Contents

/**    
 * @author Jefferson González
 * @copyright 2010 Jefferson González
 *
 * @license 
 * This file is part of Jaris FLV Player.
 *
 * Jaris FLV Player is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License or GNU LESSER GENERAL 
 * PUBLIC LICENSE as published by the Free Software Foundation, either version 
 * 3 of the License, or (at your option) any later version.
 *
 * Jaris FLV Player is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License and 
 * GNU LESSER GENERAL PUBLIC LICENSE along with Jaris FLV Player.  If not, 
 * see <http://www.gnu.org/licenses/>.
 */

package jaris.player;

//{Libraries
import jaris.events.PlayerEvents;
//}

/**
 * Implements a loop mechanism on the player
 */
class Loop 
{
	private var _player:Player;
	
	public function new(player:Player) 
	{
		_player = player;
		_player.addEventListener(PlayerEvents.PLAYBACK_FINISHED, onPlayerStop);
	}
	
	/**
	 * Everytime the player stops, the playback is restarted
	 * @param	event
	 */
	private function onPlayerStop(event:PlayerEvents):Void
	{
		_player.console.text += "\n loop";
		_player.console.setTextFormat(_player.textFormat);
		_player.togglePlay();
	}
}

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
sequenceserver-1.1.0.beta12 public/vendor/npm/webshim@1.15.8/swfs/jaris/src/jaris/player/Loop.hx
sequenceserver-1.1.0.beta11 public/vendor/npm/webshim@1.15.8/swfs/jaris/src/jaris/player/Loop.hx
sequenceserver-1.1.0.beta10 public/vendor/npm/webshim@1.15.8/swfs/jaris/src/jaris/player/Loop.hx
sequenceserver-1.1.0.beta8 public/vendor/npm/webshim@1.15.8/swfs/jaris/src/jaris/player/Loop.hx
sequenceserver-1.1.0.beta7 public/vendor/npm/webshim@1.15.8/swfs/jaris/src/jaris/player/Loop.hx
sequenceserver-1.1.0.beta6 public/vendor/npm/webshim@1.15.8/swfs/jaris/src/jaris/player/Loop.hx
sequenceserver-1.1.0.beta5 public/vendor/npm/webshim@1.15.8/swfs/jaris/src/jaris/player/Loop.hx
sequenceserver-1.1.0.beta4 public/vendor/npm/webshim@1.15.8/swfs/jaris/src/jaris/player/Loop.hx
sequenceserver-1.1.0.beta3 public/vendor/npm/webshim@1.15.8/swfs/jaris/src/jaris/player/Loop.hx
sequenceserver-1.1.0.beta2 public/vendor/npm/webshim@1.15.8/swfs/jaris/src/jaris/player/Loop.hx
sequenceserver-1.1.0.beta public/vendor/npm/webshim@1.15.8/swfs/jaris/src/jaris/player/Loop.hx