Uppercase your textfields!

Posted on January 13th, 2011 by Pål – Be the first to comment

Ever used the PSD import with “all case” text field that ended up lower case in Flash? Salvation is here with this command! Just select your textfields and run this command to uppercase them back.

Download the file here or check out the tiny code:

// ToUpperCase by Pål @ Apt 2011
var dc = fl.getDocumentDOM();
var sel_array = dc.selection; //Get selected items
 
for (var i=0;i<sel_array.length;i++) {
	s = sel_array[i];
	if (s.elementType == "text") { //Check if it is a textfield
		s.setTextString(s.getTextString().toUpperCase());
	}
}

HTML5 canvas particle experiment

Posted on August 20th, 2010 by Daniel – Be the first to comment

canvas-particles1

One of my first experiments with HTML5 canvas. Particles with gravity, moving against each other depending on the mass / size of each circle. Added some controls, so you can mess around with it. I did not have time to make controls for number of particles on screen, but maybe i’ll fix it later. No framework used, except from jQuery for the controls. The experiment is optimized for webkit, and there are some known bugs :)

Check it!

Multi-touch html demo/experiment (for iOS)

Posted on August 18th, 2010 by Pål – Be the first to comment

Screenshot from the appOn HP’s little challenge to show HTML5/Canvas stuff (beatiful vid btw.), here we go :-)

I had some time in June to experiment with iPhone web-apps and its proprietary Safari html. As a flash developer it was a fun to get my hands dirty and work with a little in the non-strict world of Javscript.

The idea of the web-app was to demonstrate multi-touch in a web-app and also for it to be a little playful drawing tool. The user can draw series of ribbons by swiping two or more fingers across the screen, creating a trail after the movements. Have a go at it on your iPhone or iPad, but remember to use two or more fingers.

Use your iPhone/iPad/iPhone touch and press here

Adding it to the home screen will also create a nice icon and it will run in fullscreen.

In this demo I’ve been using:

  • CSS3 (webkit-*) for 3D perspective
  • Canvas for drawing
  • Safari multi-touch events for user input
  • Icon for the home screen (apple-touch-icon)
  • Picture for the splash screen (apple-touch-startup-image)

For docs I mostly used developer.apple.com and the odd Google search. You are welcome to take a peek at the (single file) code if you are interested in how it works. Feedback is also welcome, ie. I dont think it works optimally on the Ipad. I havent got one yet :-)

PS. I have already got reports that this doesn’t work on Android (surprise!). But I dunno if that was a multi-touch enabled one.

Pål - twitter.com/paalsa

Show and Tell: OpenFrameworks || Cinder.

Posted on August 18th, 2010 by hp. – Be the first to comment

I would love to see what you people are doing out there with cinder and openFrameworks.

Here’s my first stab. CinderFlow code hosted on github.

Oh, all right, show your HTML5/Canvas stuff as well!

5 minute recipe for simple’n'easy export from symfony to Excel

Posted on June 15th, 2010 by Erland – Be the first to comment

So your client wants her data in Excel format? Not to worry. After reading this, you will be able to deliver data to her in a matter of minutes. Having said that, please bear in mind that it is not a generic solution for delivering dynamic Excel spreadsheets, merely a quick-fix solution.

But, you knew that already, didn’t you? Please read on for the good stuff…

read more »

Oldschool dissolve function

Posted on April 26th, 2010 by Thomas H – Be the first to comment

While doing a recent project I wanted to create a fade effect that worked well with the 8bit style design of the application. I wanted to use the dissolve effect, and lo and behold, flash has that function built in to the BitmapData class ( pixelDissolve ). Only problem was that the dissolve is on a pixel to pixel basis, so it did not look really authentic to a 8bit based graphics. All that was needed to do was to mimic the pixelDissolve function but apply them to squares of pixels.

read more »

Keep your flags in order.

Posted on April 21st, 2010 by hp. – 2 Comments

use a go style iota operator:

package rendering {
	public class RenderFlags {
 
		private static var _i:uint;
		private static function get iota():uint { return _i++; }
 
		public static const GENERIC:uint		= 0x1<<iota;
		public static const DIMENSIONS:uint 		= 0x1<<iota;
		public static const POSITION:uint 		= 0x1<<iota;
		public static const SCALE:uint 			= 0x1<<iota;
		public static const CHILDREN:uint 		= 0x1<<iota;
 
 
		public static const BOUNDS:uint = DIMENSIONS | POSITION;
		public static const ALL:uint = ~ 0x0;		
 
	}
}

“HTML5″ versus Flash: Animation Benchmarking

Posted on April 14th, 2010 by Pål – Be the first to comment

Check out this test, benchmarking a particle system with “HTML/Browser” against Flash. Seems like Flash still has the upper hand in pure animation power:
http://www.themaninblue.com/writing/perspective/2010/03/22

Is the only hope IE9? HW/GPU is needed to kick some ass here…

Also check out this test, done on the Google Nexus One.
http://vimeo.com/10553088

iPhone apps built with with Flash CS5

Posted on February 2nd, 2010 by Pål – 1 Comment

In the middle of all the “Flash on the iPad” controversy, it can be a little soothing to watch this video demoing apps built with upcoming Flash CS5.

http://theflashblog.com/?p=1737

Image burn out effect in AS3

Posted on January 18th, 2010 by Thomas H – 2 Comments

Use your favourite tween engine and tween a property like so:

       public function get burn() : Number {
         return _burn;
	}
 
	public function set burn(value:Number) : void {
	  _burn = value;
	  var CF:Array = [1,0,0,0,255*_burn,
                                  0,1,0,0,255*_burn,
                                  0,0,1,0,255*_burn,
                                  0,0,0,1,255*_burn];
	  filters = [new ColorMatrixFilter(CF.concat())];
        }