Sunday, 26 September 2010

Embedding Fonts

Hey, I just found out that if you embed text in a text field, it loses that horrible grainy look that text has when it is loaded from another source!

Cool, I hate that grainy look.

UPDATE:
And now I just found out that embedded fonts allow dynamic text to show through a mask - just saved me about an hour's work, that may be an overestimate...

Saturday, 25 September 2010

Line Breaks - Apple vs Windows

Well, it's that time again...

What time?

Time to be incomprehensibly inconvenienced by stupid differences between one version of something and another version.

Why oh why is there a difference between text files in MS Windows, and Apple? It's a text file for goodness' sake - that's about as simple as it gets isn't it?

Apparently not.

First of all the text file wouldn't even load into Flash, because it had all this invisible gobbledygook at the beginning - visible in Notepad or Dreamweaver, but not MS Word...

And even when that is all deleted (I copied the text from MS Word and pasted it into Dreamweaver) there are still invisible line breaks!

So I'm going to do a search and see if I can find an alternate way of saving this so I don't have to go through and manually add unicode line breaks.

UPDATE:

OK - First I tried looking at the invisible characters and using 'Shift+Enter' and also, changing the format to 'Normal-No spaces'.

Neither worked.

And now I've tried saving it as Unicode and other txt formats, but nothing worked, the invisible characters are still there. So I will have to go through and change all the line breaks to %0d.

Oh well.

Wednesday, 22 September 2010

SetInterval

I hardly ever use this, but in all honesty, it is very useful.

The code below is what I have used for a button which starts or stops the setInterval method. This is AS2 code.

var methInterval = null;
btn.onRelease = function () {
if(methInterval == null) {
methInterval = setInterval(meth,200);
} else {
clearInterval(methInterval);
methInterval = null;
}
}

There may be a more graceful way to do this, but this worked for me. If you trace the interval after clearing it, you get numbers anyway, and I think the number goes up by one each time you set it, so why not just set it to null when you are not using it?!