Software Development -- Flash, Flex, C++, ASP.NET
Tags:

If your TextArea has a lot of text, you get a scroll bar. If your datagrid has too many rows or columns, you get scroll bars. If your Image is too large, you can put it inside a container with scrollbars. Charts, however, do not have scrollbars. Charts with too much data look like this:

Read more...

Tags:

While porting some xpath-heavy AS2 code to AS3, I ran into problems. E4X (new and improved xml support in AS3) seems to make xpath obsolete. However, all the E4X query examples in the docs use hard-coded literals. I can't use literals because I don't know at code-time what the queries are going to be. My AS2 code creates xpath paths dynamically from variables. What is the E4X equivalent?

Read more...

Tags:

I thought I was done with the Flash-embedded-font in my previous blog entry, but there is more. I received an email requesting help with CSS and embedded fonts, and when I looked into it, found some quirks related to the CSS specified font-family and bold/italic text.

Read more...

Tags:

The 'why' and 'how' of embedding fonts is a Flash 101 topic. The main 'why' is that the user can't see fonts that she doesn't have. If your swf uses these fonts, you need to bundle them in the swf (or with the swf). The 'how' also seems very simple: in the properties panel for a given text field, click the 'Embed' button and select the character range you want to embed. Click OK. Done. Move on.

But it's really not that simple.

Read more...

Tags:

Unlike most other computer languages, when ActionScript code fails, it fails silently. If my code sends an undefined argument to a function, there is no crash, no alert message, nothing scary.

Overall, this is a good thing. If my live swf hits a bug, it might work just fine, no one is the wiser and life goes goes on blissfully unaware.

Read more...

Tags:

This problem drove me crazy. I'd thought I'd get it in the google-verse so anyone else who runs into it can benefit from my pain.

Array.sortOn() does not seem to work when the array elements are objects derived from MovieClip. The following code demonstrates.

Read more...

Tags:

It was about 10 years ago when carpal-tunnel first hit me. Every time I put my hand on my mouse, I'd get spasms of pain in my various parts of my arm. I tried special ergonomic mice and trackballs, but they didn't help. I tried speech recognition software, but it was a joke. Whether I could continue with my profession was becoming an issue. I even tried moving the mouse with my feet. Nose mousing was next.

Read more...

Tags:

Unlike Grant Skinner's gooify, which is a free-form distortion, the morph presented here is more constrained. It has an editable triangle mesh

Read more...

Tags:

The 'Simulate Download' feature in the Flash IDE is very useful. It can help debug race conditions that are a cause of intermittent problems. However, it can also lead you astray.

Problem: AS2 static variables are NOT reinitialized when you hit control-Enter the 2nd time to go into simulate-download mode.

If you'd like to try it, here's a simple test class:

Read more...

A while back, I wrote about rendering Wood and Marble using Perlin noise. But I've found that these code bits are a pain to use. You need to write code just to see them. You can't work with them in the Flash IDE; i.e. they are inconvenient.

Solution: package them in components with live preview. That way you can see them, adjust their color visually, mask them, drop shadow them, etc.

So, here they are.

Read more...