Code

XML Node with Hyphen

without comments

Flash does not like node names that have hyphens. So it will complain about

1
data.clip-board.clips

We can get around this issue by using the square brakets.

1
data['clip-board'].clips

Written by cisnky

September 7th, 2011 at 1:12 am

Posted in ActionScript,Flash Platform

Tagged with , , ,

Add new PATH

without comments

export PATH=$PATH:/new_path

Added path to my local Android Tools folder.

export PATH=$PATH:/Users/yourusername/SDK/android/tools

Written by cisnky

August 1st, 2011 at 8:23 am

Posted in Apple,Mac

32-bit or 64-bit Intel-based Mac?

without comments

About This Mac >> More Info… >> Hardware — Processor Name

Compare with

Intel Core Solo – 32 bit
Intel Core Duo - 32 bit
Intel Core 2 Duo – 64 bit
Intel Quad-Core Xeon – 64 bit
Dual-Core Intel Xeon – 64 bit
Quad-Core Intel Xeon – 64 bit
Core i3 – 64 bit
Core i5 64 bit
Core i7 64 bit

Written by cisnky

August 1st, 2011 at 7:39 am

Posted in Apple,Mac

Setting the ListActivity Background Colour (Android)

with one comment

The following code shows how you can set the background colour of a ListActivity.

1
2
getListView().setCacheColorHint(Color.rgb(36, 33, 32));
getListView().setBackgroundColor(Color.rgb(36, 33, 32));

Written by cisnky

January 21st, 2011 at 11:45 am

Posted in Android

Tagged with , ,

Setting or Editing Environment Variables on a Mac

without comments

When running ANT I use a Environment Variable to load the relevant property file for the machine that is running the build.

ANT_USER is the environment variable with the value “laptop”

1
<property file="${env.ANT_USER}.properties"/>

This will end up loading a property file called “laptop.properties”

You can set environment variables by editing an XML file that can be found in your home directory (If the file doesn’t exist, you can create it yourself).

~/.MacOSX/environment.plist

1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>ANT_USER</key>
	<string>laptop</string>
</dict>
</plist>

If you don’t fancy modifying XML directly you can use PlistEdit Pro to edit your environment file.

Written by cisnky

June 5th, 2010 at 7:13 am

Posted in Apple,Mac,Software

Tagged with , , ,

Move Dragable Clip to Top of Stack

without comments

1
2
3
4
5
private function onMouseDown(evt:MouseEvent):void
{
	_itemHolder.setChildIndex(evt.currentTarget as Sprite, _itemHolder.numChildren-1);
	evt.currentTarget.startDrag();
}

_itemHolder – Sprite containing the dragable items.

Written by cisnky

February 16th, 2010 at 11:05 am

Pretty Print JSON

without comments

Sometimes JSON is returned from a service as a single wrapped line and the data structure is not obvious. JSON Formatter can be used to turn the data into a more readable format and also validate it.

Matt also suggested JSONView a Firefox plugin as another alternative.

Written by cisnky

November 4th, 2009 at 4:00 pm

Posted in JSON

Tagged with

CS4 and Mac Spaces

without comments

I’ve noticed that applications from the CS4 suite don’t work too well with a dedicated space. For example; Flex Builder is in space 4 and the Flash IDE in space 5. When I move from 4 to 5, I need to select Flash to gain focus and use the application. On some occasions when tabbing around I’ve also noticed that some applications just seem to disappear into the background and require restarting to use again. There seems to be some sort of focus issue with applications from the CS4 suite, it might have something to do with the panels.

I’ve found that if you set applications from the CS4 suite to appear in all spaces then the issues are avoided.

Written by cisnky

October 3rd, 2009 at 3:59 am

Wget On Mac For Terminal

without comments

Terminal comes with Curl by default, but over the years I’ve got used to Wget.

I found an article on how to install Wget on the Mac over at Mac Tricks And Tips.

I did get a error when I ran ./configure and this was because the system couldn’t find a C compiler. I got round the issue by installing the latest version of xcode.

Written by cisnky

August 8th, 2009 at 5:53 pm

Posted in Apple,Mac

Open Video Player Initiative

without comments

The Open Video Player Initiative is a community project dedicated to sharing player code and best practices around video player development and monetization.

Open Video Player Initiative

Open Source Media Framework

Open Source Media Framework open source development

Written by cisnky

July 24th, 2009 at 1:06 am

Posted in Flash,Flash Platform