Archive for Flex

VideoDisplay Improvements

// April 3rd, 2009 // 1 Comment » // Actionscript 3, Flash, Flex, Programming

VideoDisplay has no doubt been the source of many headaches and much wasted time for any developer that has touched it. A lot has been written about it, and here’s my contribution, which is an evolutionary improvement over others’ work. It’s a fix that adds video smoothing and a source propert setter that doesn’t break the component and still allow you to set autoPlay. (This will all make sense in a minute.)

(more…)

A Note on VideoDisplay in Flex

// March 6th, 2009 // No Comments » // Actionscript 3, AIR, Flash, Flex, Programming

I just wasted an hour trying to track down the cause of a VideoDisplay-related bug, and I’m posting the very simple solution here to hopefully save one or two people (including future Daniel) some headaches.

(more…)

JVM and Flex Don’t Play Nice

// August 22nd, 2008 // No Comments » // Flex, Programming

I ran across an interesting problem today. I tried to create a new workspace with the intent of cleaning up my Flex environment. It’s getting pretty cluttered between client work and personal projects and random experiments. So I hit Switch Workspace / Other and type in the name of a location that doesn’t exist yet, assuming it would go ahead and create that Experiments folder for me. Which it did, right as Flex went down in flames.

Every time I try opening Flex Builder up again, I was immediately met with a daunting error. JVM Terminated! All from switching my workspace? Obviously this isn’t normal behavior. A week ago, I was required to change my machine’s version of Java SDK to work with a simulator required for my current project. The computer was using what seemed to be a special version of 1.5, and the simulator app required 1.6. In OS X, there is a sym link at /System/Library/Frameworks/JavaVM.framework/Versions called Current. Originally, that was pointing at something called A, and I don’t know what that means, because in the same directory there’s also the 1.5 sdk, and they look pretty much the same. That was switched to 1.6.0 and the simulator worked. I switched (and when I say “I” here, I mean our resident Java guy) that sym link from 1.6 back to 1.5, still getting the error. Then I switched it back to A, and all is well.

So! Lesson learned. Flex Builder will give me problems if I mess with Java. Seems like kind of a bad thing, though, if ever I want to do any Java programming, right?

Resizing ViewStack

// June 25th, 2008 // No Comments » // Actionscript 3, Flex


Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3643

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3643

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3651

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3651

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3654

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3654

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3643

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3643

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3651

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3651

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3654

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3654

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 1925

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 1925

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 2290

Warning: implode() [function.implode]: Argument must be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3242

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3265

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3265

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3306

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3357

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3357

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3502

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3502

This is simply a really quick note, and a reminder that whenever you’re starting to jump through hoops with code in Flex to accomplish something that should already be there, it probably is. Check the documentation.

So ViewStack lets you switch between different containers visually. By default, the ViewStack takes on the height of the first container within it and does not adjust height when it changes what it’s showing. Why this is the default behavior, I have no idea. But there’s a property that address this.

1
resizeToContent = "true"

Done. And duh.