Author: Ben Foster
-
Record and play back video with AIR for iOS on iPad
Recently I needed to figure out how to create an iPad app when you can record and play back video from the iPad’s camera, and then upload to it to a server using AIR for iOS. I wasn’t able to find a whole lot of info on it and so I eventually pieced it together…
-
AS3 / JS Constrain a value in one line
Here is a little snippet to constrain a value in a single line. It works by using two nested inline conditionals. The ‘else’ part of the first conditional is another conditional. It may not be the best approach but it works and is much easier and faster to write than two if-else statements. In English…
-
AS3 Getting colours blended between two other colours
Here is another function that can be added to my ColourUtil class. This one gets a specified number of colour steps between two blended colours. I thought it would be much harder to achieve than it is, luckily the AS3 Color class has the static method interpolateColor which calculates a single colour at a specified…
-
JS Transform Handles
The other day I was playing around with Mozilla’s Popcorn Maker and I had the idea of using HTML/JS/CSS to create transformable divs using transform handles and a bounding box. I did a quick search for any existing examples of HTML transform handles but i couldn’t find anything so I decided to give it a…
-
Inspiring Inspiration #9
A collection of cool video, motion graphics and interface design, mostly if not all from Vimeo…
-
AS3 Hex Colour Dodge blending utility
The following is a function that takes two hex colours – a top colour and a bottom colour – and blends them using the Colour Dodge blend mode as found in Illustrator of Photoshop. This is handy for dynamically generating colour variants based on the blend mode. Instead of blending two display objects it simply…
-
AS3 Easy gapless sound looping solution
If you have come accross the issue of sounds not looping seamlessly in a Flash project then try the following. Simply offset the start of the sound by 80 milliseconds: [cc lang=”actionscript3″] var channel:SoundChannel = new SoundChannel(); var sound:Sound = new Sound(); sound.load(new URLRequest(‘sound.mp3’)); channel = sound.play(80); [/cc]
-
Emailing images directly from Flash with PHP
For an interactive drawing project I worked on recently I needed to provide the ability for users to email their artwork directly from the app without the need to save any images to a server. I pieced together a solution from various blogs and websites and I decided to provide the full source here. The…
-
Using PHP to dynamically display the current year
Update 20-9-1012: As Kimonoki pointed out in the comments, this can actually be done in one line. There is no need to store the $time variable as the second parameter for date() is optional and defaults to time(). I have updated the snippet below. I am posting this for reference for myself as I find…
-
Adding console.log() to AIR’s HTMLLoader
Here is a little code snipped I thought I’d post for future reference and may help someone else out. I was using the HTMLLoader class in Adobe AIR to load content and I came across an error where my Javascript was calling console.log(). In the AIR HTMLLoader environment this function does not exist so I…