Posts tagged as:

Actionscript

Overriding Menu to include stage height bounds

by klejnieks on November 17, 2008

I was working on a custom menu component uses Menu. Turns out that Menu doesnt inherintly understand the stage height of the application. What I ended up doing was creating CustomMenu which extends Menu and adds in height bounds for the root and any sub menu.

[click to continue…]

{ 1 comment }

Handling Keyboard Events

by klejnieks on July 12, 2008

Im working on a project that required a Keyboard Manager to track shortcut keys within the Flex app, so i went ahead a wrote this quick little POC that I later incorporated into the project. I handle shortcut keys by adding and removing key listeners and mapping them to a dictionary of available keys. My final implementation handled [cmd + shift + key] for windows and [alt + key] for mac switched based on Capabilities.os. [click to continue…]

{ 1 comment }

Flex Call Stack and callLater()

by klejnieks on May 16, 2008

Ive used callLater() quite a few times before, but about a week ago a co-worker asked me if I knew exactly when callLater() was called. Well I think its 1 millisecond after the method executes, to which he re-asked if its after the method or after the block of code executes? Great question, and I honestly couldn’t with absolute certainty answer him so I went ahead and wrote this quick POC to prove the fact one way or another.
[click to continue…]

{ 1 comment }

Image Load I/O Error in Flex

by klejnieks on May 9, 2008

On a project im working on I ran into a very strange error when trying to load in a simple .jpg image. The image wouldn’t load. Now this sounds like a very familiar issue and easily solvable right? That what I thought too, but as it turns out, it turned into a couple hours of work and debugging. The issue wasn’t as simple as an incorrect url, network timeouts, dead links, etc… Debugging the complete() event shows the image was getting to where it had to get to and that flex felt that it did everything it had to do. So what was the problem with loading the image? [click to continue…]

{ 0 comments }

Enum toArray()

by klejnieks on March 29, 2008

There have been plenty of times that Ive needed to reuse the values of my enums as an array. A good example of this would be an enumeration of US states. There are many ways of doing this, however I find that writing an enumeration of static constants gives me the most flexibility and accuracy in my code.

[click to continue…]

{ 0 comments }