Not finding what you are looking for? Request a recipe!

  1. Avg. Rating 4.3

    Convert images to grayscale using ActionScript.

    Create a ColorFilterMatrix instance, assign it the matrix values below, and apply it to any DisplayObject. [0.3086, 0.6094, 0.082, 0, 0, 0.3086, 0.6094, 0.082, 0, 0, 0.3086, 0.6094, 0.082, 0, 0, 0, 0, 0, 1, 0]

  2. Avg. Rating 4.3

    Remembering TextInput values for returning users

    Create a sub class of the TextInput component which uses a local SharedObject to store the text value that a user enters. This new component can then retrieve the stored value the next time the user accesses your application, preventing her from having to re-enter information.

  3. Avg. Rating 4.1

    Automatic user log out

    Use the setTimeout() function to set up a delayed function call that will log the user out. Use mouse and keyboard event listeners to detect user activity. If user activity occurs before the timeout delay has lapsed, reset the timeout.

  4. Avg. Rating 4.1

    Global keyboard event handling

    Add a KeyboardEvent.KEY_DOWN or KeyboardEvent.KEY_UP event listener to the Stage object.

  5. Avg. Rating 4.0

    Using a Factory Method to convert raw XML into custom Action ...

    In each of your custom ActionScript data classes include a static method called fromXml() that contains the logic for translating just the XML node that represents that data type into an instance of that class. This type of method is referred to as a Factory Method.

  6. Avg. Rating 3.7

    Using the browser history to track application state changes

    Use a listener function to save the currently active state name to the HistoryManager every time a new application state takes effect. Modify your application’s main MXML file so that it implements the IHistoryManagerClient interface.

  7. Avg. Rating 3.6

    Associative array-like functionality in ActionScript

    Create a Map class which uses a Dictionary to keep track of the key/value pairs and an array to keep track of the order items have been added to the Map.

  8. Avg. Rating 3.4

    Applying custom images to Buttons

    Use the upSkin, overSkin, downSkin, and disabledSkin style properties of the Button class to apply custom JPG, GIF, or PNG images to any button. These attributes can be set directly on a Button instance or as part of a CSS style definition.

  9. Avg. Rating 3.3

    Create a star rating component

    Create an MXML component that extends <mx:Canvas>. Use the <mx:Repeater> tag to repeat a star image, giving it full opacity for some stars (the rating) and partial opacity for the remaining stars.

  10. Avg. Rating 3.0