AS3 Quickie – Native Mouse Cursors

We’re looking all the way back to Flash Player 10.2 for a peek at native mouse cursor support! This feature allows us to use bitmap based mouse cursors that run at the OS level rather than inside the display list in Flash Player. Huge performance gains! Requires Flash Player 10.2 or above! It is fairly simple to use a bitmap as a native cursor in Flash Player. We can do so through the [Embed] mechanism: [Embed (source=”AngryFace.png” )] public static const AngryFace:Class; Or by utilizing a bitmap image imported through the Flash Professional Library: Perform the necessary imports: import flash.ui.Mouse;

Continue reading »

AS3 Quickie – “What’s New” Catch-up

For most of my “AS3 Quickie” series, I’ve focused on Flash Player 11.2-11.4, but really have plans to cover all sorts of interesting bits in the recent runtimes – even some additions with Flash Player 10. For those who would like a comprehensive guide to everything new in Flash Player 11 and AIR 3, O’Reilly has published a set of books: “What’s New in Flash Player 11” and “What’s New in Adobe AIR 3“. These books are companion pieces as there is obvious overlap between what is new in each runtime, but are unique enough to require this manner of

Continue reading »

AS3 Quickie – Mouse Lock and Relative Mouse Coordinates

Another great feature in Flash Player 11.2 is the combination of the mouseLock boolean in flash.display.Stage along with the ability to read movementX and movementY from MouseEvent.MOUSE_MOVE. When used within Flash Player, we must be in fullscreen for mouse lock to be enabled and the relative mouse coordinates made available. The primary focus of this feature is to provide a better experience in gaming – particularly in 3D games within which the player is able to move and look around the entire environment. This can also be useful in full screen simulations and experimental pieces. Requires Flash Player 11.2 or

Continue reading »

AS3 Quickie – Monitor Throttle Events

One of the great new features introduced with Flash Player 11.2 is the ability to detect when the runtime throttles, pauses, or resumes normal activity through the flash.events.ThrottleEvent class. This is useful for saving state, or pulling back our activity when a throttle is detected. What does the throttle actually do? Well, if you have multiple tabs open in a web browser, and navigate from a tab with Flash content to another tab – the Flash content will enter a throttled state in which the frames per second is drastically slowed down so as not to take any unnecessary resources.

Continue reading »

AS3 Quickie – Removing the right-click menu from Flash content

One of the great new features introduced with Flash Player 11.2 is the ability to intercept the right-click from a user’s mouse. A simple MouseEvent listener can be added to the Stage or any object which extends flash.display.InteractiveObject. Not only does this have the effect of completely removing the right-click menu from Flash content, but we can also alternatively react to the right-click in any way we choose. Requires Flash Player 11.2 or above! To enable this, we must import the MouseEvent class into our project: import flash.events.MouseEvent; Next, let’s add a listener to the Stage itself, disabling the context

Continue reading »