Archive for the ‘Bugs’ Category

An internal build error has occurred. See the error log for more information.

Tuesday, January 24th, 2012

ONE of the reasons this might happen is because of the following:

public static function compareStrings ( firstString:String, secondString:String ):String
{
	firstString:String = tidySpace( firstString );
	...
}

You see that firstString:String = etc there? That’s the fella. DON’T EVER strongly type your vars more than once, unless you wanna lose an hour of dev like I have this morning.

HowTo: Build a multi-language dynamic Flex application

Monday, November 3rd, 2008

One of the projects I worked upon over the summer was destined for the South-American market and therefore needed to display in both Spanish and Portuguese. It was a microsite built in Flex and needed the capacity to alternate between these two languages at any given time. From the user’s perspective, a single button click should be sufficient to translate the entire site’s text from one language to another instantly. Looking around the web I couldn’t find any answers so I sat down and worked out a solution myself.

Here’s a sample app using English and my second language Swedish:

(more…)

Where have my swc graphic assets gone?

Saturday, October 11th, 2008

There is a fantastic technique for getting graphics drawn in Flash into Flex by means of classes compiled into a swc. It’s a really nice little method and if you wanna learn about it Ultraviolet Design have a great post about it here. I’m pointing you towards their post as this post is not going to be about that. Instead it’s going to be about what happens when that technique - which usually works fine - goes unexpectedly and bafflingly wrong.

(more…)

‘An internal build error has occurred’

Monday, August 11th, 2008

That’s the description of a problem Flex Builder just presented me with. Not too descriptive is it? With so little to go on, I assumed there was some file corruption somewhere and hunted high and low to find it, to the point of checking my whole project out from scratch. Nothing helped.

I found the problem eventually though. It was this:

switch (someValue){
 
}

That’s all: an empty, half-finished switch statement!

I’d recommend making sure you finish coding your switch statements before casually hitting ’save’ if you don’t want to waste time like I just have.

TextField.maxscroll weirdness

Wednesday, February 20th, 2008

So this:

trace(label_txt.maxscroll);

Produces this output:

1
1
1
1

Whereas this:

var tmp:Number = label_txt._height;
trace(label_txt.maxscroll);

Produces this:

1
1
1
3

I’m, like, wtf?! I think the moral of the story here is USE AS3 & NOT AS2!

Classes within swfs within swfs gotcha

Sunday, December 16th, 2007

I’ve been bashing my head away at a problem this morning. An AS3 project I’m working on here features a swf within a swf. The encased swf has a bunch of graphics in it most of which are linked to visual classes (classes that extends Sprite, SimpleButton, etc.). Likewise the encasing swf has its own Document class which instantiates a whole other bunch of other abstract and data classes.

Now it just so happens that one of these classes - lets call it ViewClassA - was imported into one of the wrapping abstract classes in the outer swf; not used but just imported. I compiled that swf was compiled yesterday and haven’t touched it since because I’ve been concentrating on the inner swf. ViewClassA was one of the classes linked to a onstage graphic and I’ve been making changes to it over the past 24 hours until I got it to the point this lunchtime that I was happy with it and thus wanted to see how the inner swf looked within and interacted with its wrapper swf.

So I launched the encasing outer swf in a browser and… what is this? All the functionality added over the past day was gone and the trace statements were outputting old content. Eh? OK, so, I cleared the cache, deleted and recompiled the inner swf which was all working nicely and tried again. Same result, what? How puzzling.

I tried this, I tried that: no cigar. Then I was about to head off to a forum and pose a question about this odd behaviour when it struck me that the encasing swf hadn’t been recompiled since yesterday and perhaps it was overwriting the new implementation of ViewClassA with its own embedded version. So I recompiled that too and: bingo! Our inner swf was suddenly kicking out the correct, up-to-date trace content.

So interestingly there is some sort of hierarchy here. There were two versions of the same class existing within the totality of the swf-as-two-swfs and the version accessed was the one stored in the containing outer swf, which embedded the contained inner swf into itself. I gotta get on with some stuff so don’t have time to test this more thoroughly but thought a blog post about it might be useful to anyone out there suffering similar problems.

A good gotcha to be aware of. Heads up everybody!

:)

Compile-time gotcha: 0.9.5 = badJuju

Monday, November 12th, 2007

I have been mentally and quite literally physically underground for weeks now. I won’t bore you with quite how or why but take my word for it: I have been busy. I return following my lengthy subterranean hiatus with the intention of informing you all of a troubling experience I had with AS3 whilst away, a thoroughly unpleasant compile-time gotcha!have a look at this charming getter method:

public function get playerAnswerToSeek ():PlayerAnswer
{
	var p:PlayerAnswer = _playerAnswers[0];
	if ( Math.random() > 0.9.5 ){
		p.distance = p.distance + 1;
	}
	return p;
};

Can you see anything wrong with it?

(more…)