radiac.net

diary - archive

August 2006

I'm Back

10th August 2006 at 07:112 comments

Good morning. This entry is brought to you slightly earlier than usual thanks to the wonders of 'Tamper'.

I was woken up at 6.40 by a very loud alarm. I dozed, waiting for the owner to turn it off - as you do - only it didn't get turned off, because it turns out that the owner is me.

My burglar alarm had decided that it wanted to ring, and no matter what I did, I couldn't get it to shut the hell up. The little 'tamper' light is on, so I'm guessing a connection somewhere has gone wrong. Thank god they turn themselves off after 20 minutes. Of course nobody has come to see what was going on, and the police evidently haven't been called to investigate. It appears that burglar alarms are pointless.

Anyway, yes, I am back from Fuerteventura! It was very hot and sunny, and we did pretty much everything there was to do there. I hired a car for a couple of days, so we drove around the island (at least the bits with roads), visited a couple of towns, and stopped at the good beaches. We went across to Lanzarote and had a tour of the volcanoes, and also visited the small island Los Lobos. Oh yes, and I got sunburnt.

We took lots of photos, I'll put them up shortly.

Flashing away

15th August 2006 at 10:312 comments

Well, the Flash work is nearly finished. I thought I'd escaped any screwy bugs this time round, but in the past 48 hours I've hit two new ones. I thought I'd write them up here in case it helps anyone else.

  1. A curious arrangement of text fields, movieclips and buttons caused a text field to magically regain the input focus just after it lost it. In my case I was hiding the text field straight after, and this resulted in button clicks failing.

    The only solution I could find was to use Selection.setFocus to manually set the focus to an empty text field after the first input box had lost it. I first tried putting the setFocus call in the onKillFocus method of the text field, but it just triggered the onKillFocus method over and over again in an infinite loop, so don't do that - call setFocus from the code that causes (or is triggered by) the first onKillFocus. Kay?

    Update: This was along the right tracks, but it appears that it was a problem with the FocusManager component. Fixed with:

    function fixFocus(button) {
    	button._focusrect = false;
    	Selection.setFocus(button);
    }
    

    I call that from within every onRelease function; just stick fixFocus(this) at the top.

  2. An old bug has resurfaced somewhere that it really shouldn't be causing any problems. In essence, ActionScript seems to think that 1 - 1 = -2.8421709430404e-14. I'd guess this is due to floating point rounding error, but both the numbers causing my problem here appear to be integers... Anyway, simple to fix this time, just used Math.floor().

As I say, they're fixed now, but I really wish ActionScript didn't have these problems. I have enough work to do without wasting days tracking down bugs that aren't my fault.

Burglar Alarms Are Fun

16th August 2006 at 14:19Comment

There's an electrician here to fix my burglar alarm. It's been going off for about 5 minutes now. I'm standing right next to it in case he wants me to turn it off again. My ears hurt.

Update: Turns out that whoever originally installed it snapped a couple of centimeters off the end of the plastic anti-tamper button, and stuck a bit of cable flex on the end to extend it. First cold night after the summer must have made it contract - when the sun came up that morning, it flopped off the end and triggered the tamper alarm. It's now got a bigger bit of cable flex on the end while they order in a replacement button.

So that'll be going off again tomorrow morning then. Joy.

Love PlusNet

22nd August 2006 at 17:151 comment

PlusNet just e-mailed me to let me know they forgot to take my money this month. They apologised profusely.

No, no, that's quite alright. Any time.

Loving it

23rd August 2006 at 22:481 comment

Andrew just pointed me at www.ie7.com...