Over the past 2 or so months I've been using Flex for all my AS projects. Usually when I need to figure something out, I'll create a new FLA document and throw all my code into the timeline until it's been worked out, then bring it back into the class files. However, I've found this to be a big pain in the butt when creating AIR applications. For some reason it only lets me test AIR applications a few times before the adl file freezes and I need to force quit to get out. Well, seeing that I had never messed around with creating a Flex Project, I decided to give it a whirl and learn to put my code into MXML and go from there. In doing this, I discovered I no longer had the adl freeze issue!
Read the rest of this entry »
This post will be updated the more I use Objective C.
Read the rest of this entry »
For the past month or so I've been involved with creating 2 iPhone applications at work. I was the sole developer on the first but worked with one other developer on the latter. Seeing as this was our first experiences with xCode and Objective C, there's a few good techniques I'd like to note when it comes to organization.
Read the rest of this entry »
A "Find and Replace" method is always handy when trying to avoid repetition in code (especially when replacing variables in XML Strings) and so here's a quick script everyone should know:
public static function replaceWord (searchString:String, find:String, replace:String) : String
{
var wordLength = searchString.length;
var result:String = '';
for (var i = 0; i < wordLength; i++) {
if (searchString.substr (i, find.length) == find) {
result = searchString.substr (0, i) +
replace +
searchString.substr (i + find.length, wordLength);
}
}
if (result == '') result = searchString; // didn't replace anything
return result;
}