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.
  • 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 ...
  • BitmapData.draw or cacheAsBitmapMatrix or Vector Content - AIR Mobile Experiments
    Suppose you want to zoom and pan a MovieClip with static but otherwise complex vector content. From the point of view of performance - memory and frame rate - is it better to leave it in the vector form, draw a scaled up version into a BitmapData or use cacheAsBitmapMatrix AS3 method available in mobile AIR? We compare these three techniques and provide Flash source ...
  • Zooming on an Arbitary Point and Panning with Gestures - AIR Mobile Tutorial
    We examine two important AS3 gesture events: GESTURE_ZOOM and GESTURE_PAN. We show how to use the AS3 MatrixTransformer class to zoom around any point in an image other than the registration point. We accomplish smooth panning by removing GESTURE_ZOOM listener in the BEGIN phase of GESTURE_PAN event and reinstating it in the END phase. We provide complete, commented source code in Flash CS5.5 and CS5 formats.
  • Loading Images from and Saving Images to Camera Roll - AIR Mobile Tutorial
    We discuss loading images from the Camera Roll on your phone into an app and saving images of the screen or a part of the screen to the Camera Roll. Many new AS3 classes specific to AIR on mobile come into play. In particular, the AS3 CameraRoll class and its methods: browseForImage() and addBitmapData(). Also, the MediaPromise class and Loader.loadFilePromise(). We provide complete, commented source code in Flash CS5.5 and CS5 formats.


B&W Powered