Archive for September, 2007

Jobs in Japan

Friday, September 28th, 2007 by Carsten Schneider

Our friends from The Plant have just launched Joblet, a job listing site for Japan.

Joblet job offers are published on sites such as pingmag and asoboo. And if you’re looking for a Flash developer position in Japan, have a look here.

Flash 3D Flight

Friday, September 28th, 2007 by Carsten Schneider

Flash 3D engine demo by Electric Oyster. Nice lake texture, too.

Update: The new engine is actually Papervision. The lake is still a nice touch.

onReleaseOutside: AS3 Button Engine revisited

Saturday, September 22nd, 2007 by Luis

A few months ago I wrote a post with a solution to the missing onReleaseOutside event in AS3.

Unfortunately the post has disappeared completely while upgrading some wordpress plugins.

Here there is a resume of the post, a swf demo and the source code of the Button engine that allows you to set sprites as buttons very easily, with some additional events such onReleaseOutside, onRollOutWhileMouseDown, onRollOverWhileMouseDown and the ability to manage in a very natural and intuitive way all the Button Instances in your project.


Download src code.

Simple Usage:

Actionscript:
  1. package
  2. {
  3.     import com.lessrain.as3lib.utils.stage.TopLevel;
  4.     import flash.display.Sprite;
  5.     import com.lessrain.as3lib.controls.button.Button;
  6.     import com.lessrain.as3lib.controls.button.ButtonEvent;
  7.     import com.lessrain.as3lib.controls.button.ButtonList;
  8.     import com.lessrain.as3lib.controls.button.ButtonListEvent;
  9.  
  10.     public class Test extends Sprite
  11.     {
  12.         private var _myButton : Button;
  13.         private var _mySprite : Sprite;
  14.        
  15.         public function Test()
  16.         {
  17.             TopLevel.getInstance().stage = this.stage;
  18.             initialize();
  19.         }
  20.        
  21.         public function initialize():void
  22.         {
  23.             ButtonList.getInstance().addEventListener(ButtonListEvent.BUTTON_ADDED,buttonAddedToList);
  24.             ButtonList.getInstance().addEventListener(ButtonListEvent.BUTTON_REMOVED,buttonRemovedFromList);
  25.            
  26.             _mySprite   =  new Sprite();
  27.             _mySprite.graphics.beginFill(0x660000);
  28.             _mySprite.graphics.drawCircle(250,250,50);
  29.             _mySprite.graphics.endFill();
  30.            
  31.             addChild(_mySprite);
  32.            
  33.             _myButton   = new Button();
  34.            
  35.             _myButton.addEventListener(ButtonEvent.RELEASE,release);
  36.             _myButton.addEventListener(ButtonEvent.RELEASE_OUTSIDE,releaseOutside);
  37.             _myButton.addEventListener(ButtonEvent.PRESS,press);
  38.             _myButton.addEventListener(ButtonEvent.ROLL_OVER,rollOver);
  39.             _myButton.addEventListener(ButtonEvent.ROLL_OUT,rollOut);
  40.             _myButton.addEventListener(ButtonEvent.ROLL_OVER_WHILE_DOWN,press);
  41.             _myButton.addEventListener(ButtonEvent.ROLL_OUT_WHILE_DOWN,rollOutWhileDown);
  42.  
  43.             _myButton.initialize(_mySprite,'myID','myGroup',false,true);
  44.  
  45.         }
  46.        
  47.         private function press(event_:ButtonEvent):void
  48.         {
  49.             trace(String(event_.type));
  50.         }
  51.        
  52.         private function release(event_:ButtonEvent):void
  53.         {
  54.             trace(String(event_.type));
  55.         }
  56.        
  57.         private function releaseOutside(event_:ButtonEvent):void
  58.         {
  59.             trace(String(event_.type));
  60.         }
  61.        
  62.         private function rollOutWhileDown(event_:ButtonEvent):void
  63.         {
  64.             trace(String(event_.type));
  65.         }
  66.        
  67.         private function rollOver(event_:ButtonEvent):void
  68.         {
  69.             trace(String(event_.type));
  70.         }
  71.        
  72.         private function rollOut(event_:ButtonEvent):void
  73.         {
  74.             trace(String(event_.type));
  75.         }
  76.            
  77.         private function buttonAddedToList(event_:ButtonListEvent):void
  78.         {
  79.             var myButton:Button = event_.getButton() as Button;
  80.             trace('--------------------------------------------------');
  81.             trace('Button has been added to the ButtonList:');
  82.             trace('Button GroupID: '+Button(event_.getButton()).groupID);
  83.             trace('Button ID: '+Button(event_.getButton()).id);
  84.             trace('--------------------------------------------------');
  85.         }
  86.        
  87.         private function buttonRemovedFromList(event_:ButtonListEvent):void
  88.         {
  89.             trace('button has been removed:'+event_.currentTarget);
  90.         }
  91.     }
  92. }




Related Links:

Echochrome

Friday, September 21st, 2007 by Carsten Schneider

Eurogamer has an article up with first impressions of Echochrome, Sony's upcoming Escher-inpired puzzler.

Previous post here.