MXML
New Site Launched
Submitted by ben.bishop on Wed, 02/11/2009 - 16:53.Touchwood is proud to present its new website at http://www.touchwoodcreative.com. The site was developed almost exclusively with the Flex framework as an exercise and proof of concept that developers using Flex can not only build a stable application but can also provide a rich visual experience to the user.
Flex's transitions, parallels, and effects were used extensively to add the more polished elements to the presentation of the agency's capabilities and past work.
Also used was Flex's ability to take XML, parse it, and update the UI according to the XML file's contents. This allows Touchwood to update the site quickly and frequently with cool new client projects. So be sure to check it out frequently!
Touchwood Presents UI Marker Beta 1
Submitted by ben.bishop on Tue, 11/13/2007 - 04:11.Touchwood is proud to present UI Marker Beta 1. UI Marker is a Flex component that allows users to draw squares, lines, and notes on an AIR application's UI and save the screenshot as a PNG. This tool is valuable for design reviews and/or client input and feedback.
How to implement:
Let's say you want to setup your app to where a user can click F12 and make notations. Here's how you do it.
Actionscript 3: How to Draw a Shape with Flex 3
Submitted by ben.bishop on Sun, 11/11/2007 - 20:36.Problem:
You want to draw a square programmatically using Actionscript's drawing API.
AIR: How to Detect All Link and Image Clicks in a HTMLControl
Submitted by ben.bishop on Fri, 10/19/2007 - 21:21.Problem:
How can an AIR application detect if a link or an image has been clicked inside an HTMLControl?
Solution:
Create an app to loop through all images and links in the web page's DOM and attach click listeners to them.
Actionscript/Flex: How to Programmatically Add a Link to a LinkBar
Submitted by ben.bishop on Wed, 10/17/2007 - 03:46.Problem:
You have a LinkBar's dataprovider bound to a viewstack, but you want to add an extra button that opens an URL in a new browser window when clicked.
Solution:
Why addChild May Not Work With Sprites in Flex/Actionscript 3
Submitted by ben.bishop on Sat, 10/13/2007 - 20:21.This post is in reference to AxiomFlash's message board post at FlashKit. AxiomFlash cannot get the following code to work in his class that extends the main Application class:
private function init(eventObj:FlexEvent):void
{
trace("init()");
var clip:Sprite = new Sprite();
clip.x = 100;
clip.y = 50;
clip.graphics.beginFill(0x00aa00, .7);
clip.graphics.drawRect(0, 0, 300, 200);
addChild(clip);
}
When this application is executed the following error message appears:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Sprite@4abb3c1 to mx.core.IUIComponent.
How to Read a Directory's Contents with Flex and AIR
Submitted by ben.bishop on Fri, 10/12/2007 - 16:16.Needed Resources:
Final Product:
A small application that traces out the contents of the user's documents directory. This was originally a posting for help by Boombanguk in the FlashKit message boards.
Stay DRY (Don't Repeat Yourself): Audio AS3 Helper Class
Submitted by ben.bishop on Wed, 10/10/2007 - 19:12.What this is:
A commented Actionscript 3 class that is a static helper class that allows a developer to load/unload, play, pause, and skip to a point in an audio track. With this, a developer can separate out the redundant tedious code necessary to play an audio track from the view/UI code.
A break down of the methods:
- AudioManager.loadSong(url)
Use this method to load in your audio track. - AudioManager.playSong()
Plays the currently loaded track. - AudioManager.skipToPos(n)
Skips to a location in the track (in milliseconds.) - AudioManager.pauseSong()
Pauses the current track. - AudioManager.setVolume(n)
Sets the volume level of the current track (0-100.) - AudioManager.getVolume()
Returns the current volume level of the track (0-100). - AudioManager.getSongLength()
Returns the length of the current track in milliseconds. - AudioManager.getSongPos()
Returns the current position of the current track in milliseconds.
How to build your own video recorder using Flex and AIR
Submitted by ben.bishop on Mon, 10/01/2007 - 21:22.Needed Resources:
Final Product:
A simple AIR application that records a video stream from a webcam and saves a temporary FLV file to the desktop. The UI will consist of a window displaying the current video feed and a button to start and stop recording.
