RelaxedSignals

RelaxedSignals

What?

RelaxedSignals are an addition to the popular signals library of Robert Penner.

It’s still in pull-request state, and hopefully it will make it into the official lib sometime soon.
In the meantime you can download it here:

https://github.com/creynders/as3-signals

Why?

Signals are great but there’s one feature that’s really missing: the ability to subscribe to a signal, after it having been dispatched.

Read more

Share on Facebook

SignalResponder

SignalResponder

What?

I wanted to create an easy-to-use helper class that can deal with async process state changes in AS3.
A SignalResponder allows you to easily respond to start, progress, success and failure signals.
It’s meant to be a versatile class, that can be used in many different ways, allowing to use them
in any way you see fit.

Basic Usage

Consumption of a process result through a SignalResponder

_responder = new SignalResponder();
_responder.successSignal.addOnce( _handleSuccessSignal );
_service = new TwitterService();
_service.loadTwitterStream( _responder );

private function _handleSuccessSignal( data : String ):void
{
	trace( data );
}
Usage of a SignalResponder in the process
public function loadTwitterStream( responder : SignalResponder ) : void{
	var request : URLRequest = new URLRequest( TWITTER_FEED_URL );
	_loader = new URLLoader();
	_loader.addEventListener( Event.COMPLETE, _handleCompleteEvent );
	_loader.load( request );
	_responder = responder;
}

private function _handleCompleteEvent( e : Event ) : void{
	_responder.successSignal.dispatch( _loader.data );
}

Advanced usage

Custom signals for specific state changes

A SignalResponder can use custom signals for specific state changes

_responder = new SignalResponder();
_responder.successSignal = new TwitterStreamLoadedSignal();
_responder.successSignal.addOnce( _handleSuccessSignal );
_service = new TwitterService();
_service.loadTwitterStream( _responder );

private function _handleSuccessSignal( data : String ):void
{
	trace( data );
}

Using a custom signal for all state changes

SignalResponder uses a ISignalFactory to create the signals for the various state changes.

By default the factory creates signals of type Signal, but this can easily be adjusted.

var factory : ISignalFactory = new SignalFactory( TwitterServiceStateChangeSignal );
var responder : SignalResponder = new SignalResponder( factory );
//now all 4 signals (startSignal, progressSignal, successSignal and failureSignal ) will be of
//type TwitterServiceStateChangeSignal

Notes

  • The signals are instantiated lazily, if a process doesn’t dispatch a certain signal and there were no listeners specified for that particular signal, then the signal will not be instantiated.
  • This means that in cases as above in the example of Basic Usage only one signal is instantiated.
  • A SignalResponder has a `result` property which contains the result of the process after completion and is bindable.
  • The `status` property contains the current process state expressed as a constant from  SignalResponderStatus

Dependencies

Signals by Robert Penner

https://github.com/robertpenner/as3-signals

Share on Facebook

Fabulatoriers flyer and poster

Wim Geysen Producties

‘t Werkhuys

De Huiskamer

Share on Facebook

Apollon Project Video

Apollon project video from IBBT on Vimeo.

Share on Facebook

Apathie²


Wim Geysen Producties

Share on Facebook

Installing an android app in the emulator

If you try to install an android app ( .apk file) in the android emulator, it should not be a problem, when doing so with a vanilla install of the android SDK.
Here’s a fine walkthrough

However, if you’ve been developing for various android SDK versions, you’ll have defined multiple AVD’s (Android Virtual Devices) to test your stuff and when trying to install an .apk file with:

adb install path/to/<filename>.apk

Read more

Share on Facebook

How to get the Kitchensink app for Android running on Titanium

When starting out with Appcelerator Titanium it’s pretty easy to get the kitchensink app running on the iphone emulator, however running it on the Android emulator was not a breeze. Several pitfalls and hurdles need to be overcome to get it running.

The first problem I encountered was after installing the required Android SDK’s and tools. Even though I pointed Titanium to look in the correct folder for the android sdk it complained:

Couldn’t find adb or android in your SDK’s “tools” directory. You may need to install a newer version of the SDK tools.

Read more

Share on Facebook

New year, new job, new website

From next monday on I’ll be working for IBBT as a developer (and sometimes designer), more particularly I’ll be joining the Apollon project and be developing all kinds of exciting new media apps/sites/prototypes/knitwear.

And ah yes, the website’s been refurbished and renewed. Thanks to Mono-lab, for the magnificent WP theme.

Share on Facebook

Delhaize EOY

Development of Delhaize EOY campaign site at Prophets with Flex, Flash, AS3, Gaia and RobotLegs.

design by Prophets

Share on Facebook

Ik kijk vooruit

Development of campaign site for Mobistar at Prophets with Flash, AS3 and RobotLegs.

design by Prophets

Share on Facebook
Return top

Multi media developer

Currently I'm working as a multi media developer for IBBT after having worked as a freelance webdeveloper with a specialization in flash/as3.


You can contact me at:
info [at] creynders [dot] be
 
[ more... ]