Archive for 2006

2006 , top Ipod tracks…

Thursday, December 21st, 2006 by Luis

Today is the last day in the office until next year, so far 2006 has been very good, I haven’t surf yet but I had my first experience with snowboard (fantastic experience).

If everything goes as plan I’m expecting to end the year surfing in the Cantabric Sea, as I have done it every year since 1989.

Music has been the replacement of the sea whenever I felt down…

Read the rest of this entry »

Haunch of Venison

Wednesday, December 20th, 2006 by Luis

We have recently launched the new Flash site for Haunch Of Venison. It supports the use of browser back-buttons and deeplinking plus friendly Search Engine Optimization (SEO) powered by a complete content management system. An AA Accessible version and language selection are on their way too.

The site functions as a resource for the Gallery’s exhibitions (London, Zürich, Berlin, Athens) as well as documenting the activities of the represented artists. In addition, it provides access to available works for sale, online and offline private views and books & editions.


Related Entries:

AS3 + Java: Socket connections to ports below 1024

Monday, December 11th, 2006 by Thomas

Since people started to experiment with the new Socket class in AS3 I've often read that it wouldn't be possible to connect to any port below 1024 with it. While that's true if you want to connect to any server on the web, it is possible to connect to servers that run a special socket server returning cross domain policy information to the Flash Player. It's similar to putting a cross-domain-policy file on your web server - it just requires a little more effort.

Connecting to ports below 1024 opens some interesting possibilities, like tunneling multiuser apps through port 80 to avoid being blocked by strict firewalls, writing your own mail-client, ftp-client - any network client for that matter (that doesn't need the ability to listen for incoming connections, so forget about p2p in Flash). Joa Ebert for example has written an IRC client in Flash. You could also write a Proxy on your own server to forward access to any port on any server...

This is how you can allow the AS3 Socket and XMLSocket to connect to a low port number, for example to a web server's port 80.

AS3 commands

Whenever you call the connect method of a Socket class in AS3:

Actionscript:
  1. socket = new Socket();
  2. socket.connect("localhost", 80);


... the Flash Player implicitly opens a socket - in the example above to port 80 - and sends the following character sequence:

XML:
  1. <policy-file-request/>


If the server responds with a string formatted as a common policy xml file, Flash Player will open the real socket and will fire the Event.CONNECT event. If no policy string is returned the connection will fail.

XML:
  1. <?xml version="1.0"?><cross-domain-policy><allow-access-from domain="*" to-ports="80" /></cross-domain-policy>


Now you probably don't want to modify the source code of your preferred open source webserver to make it answer to Flash Player's policy requests. Luckily there is an AS3 command to make Flash connect to another port when looking for the policy:

Actionscript:
  1. Security.loadPolicyFile("xmlsocket://localhost:1008");


This will cause the Flash Player to open a socket to port 1008, send the policy-request and read the policy file. If access is allowed it'll open the desired Socket connection to port 80 without further delay.

It is important to know that only policy-files read from a port below 1024 can grant access to ports below 1024. If your policy file is served from a port, say 8008, access below 1024 is blocked even though the policy file might say differently.

Curious - Adobe's DTD defining the structure of a policy file doesn't mention the to-ports attribute, but the Flash Player definitely reads it.

Java socket server

I wrote a little Java-class that, when started, runs as a policy server. By default it listens on port 1008, allowing connections to any port. Which is good for testing but should be changed when running it publicly!

You can download the source code here, or a runnable jar-file here. Just install the Java-Runtime-Environment (you probably already have it) and on the command line type java -jar policyserver.jar.

Flex example client

I've also written a little example AS3/Flex application that connects to the localhost web-server, sends an HTTP GET command and reads the response including HTTP headers from the webserver. You could call it a browser ;) - unfortunately it only let's you connect to servers that have the policy server running.

You can download the source code here (just import it into a Flex project and mark WebReader.as as the Default Application).

Or view an example here - enter a path starting with "/" and click on connect and see what it reads from our blog webserver...

Nintendo Flash Game: Mission in Snowdriftland

Monday, December 11th, 2006 by Carsten Schneider

An advent calendar from Nintendo, developed by extra tonic. Behind every door waits a level of cute Flash platformer "Mission in Snowdriftland".

Found on Aeropause.

Flex: Customizing SWF Properties

Monday, November 27th, 2006 by Luis

There are two ways of changing the basic properties of your application in Flex, one is by passing multiple arguments to the command-line compiler and the second one by adding metadata in your Main class.

Yesterday I almost got crazy trying to figure out why one of my projects didn't work when changing the properties of the output swf adding metadata in my Main class, and the answer was very simple, basically the metadata statement has to be placed after any import statement. By placing the metadata statement before the imports, the application properties were set to the default parameters (500 x 375, 24 , blue background).

This doesn't seem to work:

Actionscript:
  1. package
  2. {
  3.     [SWF(width="200", height="200", frameRate="31", backgroundColor="#FFFFFF")]
  4.    
  5.     import flash.display.Sprite;
  6.    
  7.     public class Main extends Sprite
  8.     {
  9.         public function Main()
  10.         {
  11.             trace('stage width: '+stage.stageWidth);
  12.             trace('stage height: '+stage.stageHeight);
  13.             trace('framerate: '+stage.frameRate);
  14.         }
  15.     }
  16. }


This works:

Actionscript:
  1. package
  2. {
  3.     import flash.display.Sprite;
  4.  
  5.     [SWF(width="200", height="200", frameRate="31", backgroundColor="#FFFFFF")]
  6.    
  7.     public class Main extends Sprite
  8.     {
  9.         public function Main()
  10.         {
  11.             trace('stage width: '+stage.stageWidth);
  12.             trace('stage height: '+stage.stageHeight);
  13.             trace('framerate: '+stage.frameRate);
  14.         }
  15.     }
  16. }


Flash & Right-To-Left (RTL): Less Rain launches dynamic hebrew Flash site

Saturday, November 25th, 2006 by Thomas

Less Rain has recently launched the corporate site for Red Bull Israel - one of the few Flash websites to render fully dynamic text in right-to-left layout - including formatting, links and input textfields. It also supports the use of browser back-buttons, deeplinking and bookmarking.

[flash]wp-content/upload/slideshow_rb.swf,450,400[/flash]

The right-to-left algorithm is losely based on Richard Ishida very helpful explanation of the bidi algorithm.

I had looked into other discussions and solutions but wasn't able to make any of them work, or found them to be too restrictive. See also the efforts of Flaraby, g. wygonik, Oddhammer, Quasimondo, FlashRTL.

For more information about the underlying problem visit The Right To Flash

We are not that flattered, really… but it made us laugh!

Friday, November 24th, 2006 by Vassilios

We have come across an interesting page on Flickr with pirated sites and lo and behold, it seems we have been the victims of plagarism! Very funny indeed, considering that the offenders are describing themselves as an "award winning multi-discipline creative agency specialising in ideas-led solutions for print, web and interactive design". Well guys, here are another 15 minutes of fame ; as Malcolm MacLaren has always mainitained, there is no such thing as "bad press".

Ours: www.sonjamueller.org

sm original

Theirs: www.viewcreative.co.uk

sm copy

Exhibition: Heartfelt, Contemporary Arts and Crafts

Friday, November 24th, 2006 by Carsten Schneider

Paper cutting, needlepoint, appliqué, woodwork, screen printing, book binding, origami, collage, sewing, artists from the USA, Canada, Japan & the UK.

Some of Shin Tanaka's work is on display, too.

Nov 24 - Dec 21 2006, Tue - Sun, 12 noon - 6 pm
At 96 gillespie

Related Posts

Minilogue

Friday, November 24th, 2006 by Carsten Schneider

Mac + Flash + Photoshop: Mac OS 10.4.8 performance

Thursday, November 23rd, 2006 by Thomas

Mac OS 10.4.8 boosts Flash Professional 8 performance by 10% and Photoshop CS2 runs around 35% faster on Intel-based Macs.

Via Mike Downey

Kuler Colours

Wednesday, November 22nd, 2006 by Carsten Schneider

Create / rate / share colour schemes with Adobe Kuler.

GammaSlamma 1.0

Wednesday, November 22nd, 2006 by Carsten Schneider

Ever wondered why your designs look so much better in Photoshop than as a PNG imported into Flash?

Try GammaSlamma, a small OS X application that removes the gamma information from a PNG file.

(Thanks, Hawken!)