Letexa

Learning & Teaching Exchange

Building a Flash-based Image Viewer

Overview

This course explains the Flash Actionscript MovieClip-method startDrag(...) and its parameters. With this knowledge and some more we build a simple but nice image viewer, where you can zoom in and out and drag the visible part of the image around. It also includes a small Actionscript-generated preview thumbnail which shows where in the picture you are when you are zoomed in. Of course, the source code for this course and therefore for the image viewer MovieClip is available here! The code is Actionscript 2.0, but it is exactly the same when you use AS 3.0, only that some names have changed.

Sources

Download the sources for this course (Flash CS3) [3.4MB ZIP file]

The Actionscript code alone is available in the script for this course below!

Creative Commons License This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.

Prerequisites

Basic familiarity with Flash and Actionscript.

Script

Here is the script used to develop this course.

Start the course

Statistics