ActionScript 3 Tutorials

Learn about ActionScript3.
News from www.flashandmath.com -- a large and growing collection of open source, free ActionScript 3 tutorials for Flash.
  • AS3 Events Properties: target, currentTarget, eventPhase, localX, localY
    We examine properties: target, currentTarget, localX, localY, eventPhase and reveal some surprising results. We provide a simple utility that displays those properties for MouseEvent.CLICK. If the interactive object that you want to target has a child which is an interactive object and the user happens to click on the child, localX and localY remain relative to the child throughout the event's propagation, and it is the child...
  • Mobile AIR: Loading an External SWF as a Scrollable Help File
    Our goals are to bundle help files with a mobile app so they can easily be accessed without Internet connection, will not be trying on the memory, and will scroll smoothly. Our help files contain text and graphics. We find that bundling and loading at runtime AS3-free SWF files is a good way to accomplish this. We provide a custom SWFScroller AS3 class. All Flash...
  • Behavior of a Loaded SWF File versus Behavior of a MovieClip
    You load an external SWF file at runtime using Loader.load() method. You extract the file via Loader.content, cast it to MovieClip, and store in a MovieClip variable. You add a listener to mouse clicks to your loaded MovieClip only to discover that it does not respond to clicks. Isn't Loader.content in the case of loading an SWF file a MovieClip? We discuss...
  • Display Web Content within AIR Mobile App - StageWebView Tutorial
    There is a couple of ways to display web pages in your AIR mobile app: the navigateToURL method and the AS3 StageWebView class. We discuss both, but focus on StageWebView as it displays web content without leaving your app. We explain the finer points of using the class, e.g. disabling and enabling zooming in a StageWebView instance. Complete Flash CS5.5 and CS5 code ready for download.
  • Drawing Display Objects into Bitmaps with BitmapData.draw() Method - AS3 How-To
    In many circumstances you may want to draw a DisplayObject into a Bitmap. For example, to take an image 'snapshot' of a Sprite. The important BitmapData.draw method became even more important in development for mobile as Bitmaps are easier to process by mobile devices than vector content. We discuss the method with special emphasis ...


B&W Powered