RobustaBrewer: Put a Tiger in your Mobile

RobustaBrewer: Put a Tiger in your Mobile

The RobustaBrewer class is an adaptation of a very popular slideshow effect, based on the Coffee Shop API. Thus, contrary to the common JavaScript implementations, the RobustaBrewer class provides a very low-resource-consumer slideshow, available from all of the Web configurations that support the Flash Player.

In addition, the RobustaBrewer class offers two major advantages:

  • her flexible and modular API allows to easily create several kind of applications,
  • it creates very lightweight slideshows: the following sample application is only 10kb when you don't embed the images.

Get Adobe Flash player

package {
	import flash.display.*;
	import org.flashapi.coffeeshop.*;
	import org.flashapi.coffeeshop.coffeebean.*;
	import org.flashapi.coffeeshop.event.*;
	public class RobustaBrewerSample extends Sprite {
		public function RobustaBrewerSample():void {
		[Embed (source="thumb_01.jpg")]
		private const IMG1:Class;
		[Embed (source="thumb_02.jpg")]
		private const IMG2:Class;
		[Embed (source="thumb_03.jpg")]
		private const IMG3:Class;
		[Embed (source="thumb_04.jpg")]
		private const IMG4:Class;
		[Embed (source="thumb_05.jpg")]
		private const IMG5:Class;
		private var _brewser:RobustaBrewer;
		private function init():void {
		private function createBrewser():void {
			_brewser = new RobustaBrewer(500, 375);
			_brewser.buttonMode = _brewser.loop = true;
			_brewser.transitionDuration = 800;
			_brewser.pauseDuration = 4500;
			_brewser.increaseBeanType = Pixelation;
		private function populateBrewser():void {
			var bean1:RobustaBean = new RobustaBean(
					new IMG1().bitmapData,
					"<b>Bathing Tiger</b><br/><br/>1024 X 768 px, 133 Ko.",
			var bean2:RobustaBean = new RobustaBean(
					new IMG2().bitmapData,
					"<b>Bengal Tiger</b><br/><br/>1600 X 1200 px, 316 Ko.",
			var bean3:RobustaBean = new RobustaBean(
					new IMG3().bitmapData,
					"<b>Siberian Tiger in Snow</b><br/><br/>1280 X 1024 px, 551 Ko.",
			var bean4:RobustaBean = new RobustaBean(
					new IMG4().bitmapData,
					"<b>Baby Tigers</b><br/><br/>800 X 600 px, 75.4 Ko.",
			var bean5:RobustaBean = new RobustaBean(
					new IMG5().bitmapData,
					"<b>Light and Shadow</b><br/><br/>1920 X 1440 px, 387 Ko.",
		private function createEvents():void {
			_brewser.addEventListener(RobustaBrewerEvent.TRANSITION_START, onTransitionStart);
			_brewser.addEventListener(RobustaBrewerEvent.TRANSITION_FINISH, onTransitionFinish);
			_brewser.addEventListener(MouseEvent.CLICK, onClick);
		private function onTransitionStart(e:RobustaBrewerEvent):void {
			_brewser.useHandCursor = false;
		private function onTransitionFinish(e:RobustaBrewerEvent):void {
			_brewser.useHandCursor = true;
		private function onClick(e:MouseEvent):void {
			if(_brewser.useHandCursor) {
				var url:URLRequest = new URLRequest(_brewser.getCurrentBean().url);

The Coffee Shop API should be available in the SPAS 3.0 alpha 6.1 release.
The RobustaBrewer class will be available in the Coffee Shop API beta 2.

Share this article:


There are no comments yet for this article.

Leave a reply

Your email is required but will not be displayed.

To prevent abusive emails, please enter the numbers you see in the image below:

Security code