Daily Archives: August 2, 2007

Using special characters in your Flex applications

Another good question/dilemma came up on FlexCoders the other day. A curious poster asked how you could embed a copyright symbol, ©, into a Flex application since using © did not seem to work. As it turns out, an easy way to do this is to use a character’s numeric value (©) instead of its code name (©).

Well, at any rate, here’s a handy little chart thing-a-ma-jig to hopefully help out if you’re looking for some specific codes. Granted, you could have probably found it on Google in a fraction of the time, but what fun would that be?

Full code after the jump.

Continue reading

Using the Validators.validateAll() method to validate a form

I recently saw this issue in FlexCoders and filed a bug for the poster. Well, it turns out the bug I filed was a duplicate of an existing bug, and that bug has been fixed (in Flex 3 — codename:Moxie). So, long story longer, here’s how you can use the Validator class’s validateAll() method to validate a form (which may or may not have enabled validators).

Full code (and workaround) after the jump.

Continue reading

Scrubbing an FLV using the VideoDisplay control and a slider

In yet *another* post about the VideoDisplay control, this time we look at formatting playback times using the DateFormatter class/tag, creating a basic scrubber using an HSlider control, and applying a mildly annoying Zoom effect to the video.

Also, we tweak the slider control (or more accurately HSlider) and prevent users from clicking on the slider track (thanks to the allowTrackClick property, we set the liveDragging property to false to make sure we arent needlessly seeking around the video every time the slider thumb moves, and finally we invert the thumb arrow for no other reason than I didn’t know you could do that so easily.

Oh, and I also created a faux looping video by using the autoRewind property, and calling the play() method in the rewind event handler.

Full code after the jump.

Continue reading