RSS Valid
XHTML Valid
CSS Valid

Background disappearing with TabNavigator in Flex

Sunday, August 10th, 2008

Was having an issue with the TabNavigator component in Flex today. When switching to a new Tab, the background of the whole application would turn white and parts of the Tabs were not rendering correctly. Through a little googling, I found a similar bug reported on adobe. The working around seems to work pretty nicely until the “bug” is resolved:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
	<mx:Script>
		<![CDATA[
			/**
			 * Force main app to redraw
			 * @return void
			 */
			private function hackToFixBgBug():void {
				this.alpha = 0.99; 
				this.alpha = 1.0;
			}
		]]>
	</mx:Script>	
	<mx:TabNavigator id="tabNavigator" mouseDown="hackToFixBgBug()">
		<!--tab windows go here-->
	</mx:TabNavigator>
</mx:Application>
Basically, it looks like you’re just forcing the main swf to “redraw” whenever you click on the TabNavigator.

svn:externals and svn export

Friday, August 8th, 2008


svn:externals

svn externals are essentially symbolic links to other repositories that get updated along with your current working copy. They can be essential for sharing frameworks across different projects. For example, at BKWLD we keep a repo of our Actionscript codebase (com.bkwld) that we all make revisions to. Adding the package as an external in each Flash/Flex project allows us to make modifications to the codebase without having to worry about copying the changes over to other projects.

Externals can be a pain to set up. There’s no support for them in GUI’s such as Zigversion and Versions (but Cornerstone, Tortoise, SmartSVN and RapidSVN do as far as I know) but they are pretty easy to set up from the command-line. Frankly, I had an easier time setting them up from Terminal than from RapidSVN when I was using GUIs to begin with.

Read the rest of this entry »

Pathfinders: A Career Pathways Game

Portfolio

Full portfolio entry »

Pathfinders is a platforming game created around a contest held on the whodouwant2b.com website. The object is to climb as high as you can while grabbing icons for points and answering trivia which earns you tickets in the raffle for prizes every month.

Play the game on WhoDoUWant2b.com

pathfinders characters

The characters were created and animated using flash and illustrator. The game engine itself is based in AS3 and an ASRA (A Simple RESTful API) deployment powers the MySQL backend and high score data/display.

svn and Flex, hiding folders

Sunday, August 3rd, 2008

I found that after working for a day with Flex and commiting my changes to subversion that the bin-debug folder had a ‘S’ status code next to it. This one was unfamiliar to me, but after looking it up it seems like it’s a code for “traversing branches” or that you’ve (s)witched your working copy to a new branch. Apparently, since html-template is used to publish to bin-debug, the .svn files in bin-debug are being overwritten (and seems to modify them to look like a switch).

To avoid this conflict, you just do not want the two folders to be included under version control. To “ignore” them when you commit your changes, modify the svn:ignore property (in this case I’ve cd‘ed into my Flex project directory that contains ‘bin-debug’ using Terminal):

svn propedit svn:ignore .

The EDITOR property of your shell should open a file. My EDITOR is set to 'mate -w' (open the file with TextMate and wait for it to close)…in the file you want to add these two lines:

bin-debug
html-template

There may be other directories and files to include after publishing the release build, but I haven’t reached that stage in my project quite yet. Anyway, once saved and closed it outputs:

Set new value for property 'svn:ignore' on '.'

In a GUI such as Zigversion, you can right-click your project directory, select “Ignore Properties…” and add the same two lines using the ‘+’ button.

Hiding .svn files in Flex Builder

This may sound silly, but Eclipse is so unintuitive, it took me a while to figure out how to accomplish hiding typically hidden files in the ‘Flex Navigator’ panel. Click on the downwards pointing arrow (third from the right)

flex hidden files

and select “Filters…”. Then check the box next to “.*”. Now any hidden files will be not shown. If anyone has any ideas how to customize these filters, please let me know.

UPDATE: just found this awesome post which had some solutions for still including the bin-debug and html-template folders!

Best Facebook Status Change Ever!

Tuesday, July 22nd, 2008

A status update that my coworker Greg noticed today:

Facebook married

Yay! I joked with my coworkers that considering how much I log into facebook, my next update will be:

Facebook dead

Availability

Ben is currently employed as the Development Director at BKWLD in Seattle, Washington and is also available for freelance gigs. Please see the services and contact sections for more information or for work inquiries.