Drawing API enhancements part 2

Enhanced Drawing Features in Flash 8 - part 2

Flash 8 contains many new features within ActionScript that you can use when publishing to Flash Player 8. The Drawing API contains enhancements and, in this article, I’m going to look at the following areas.

This article is part of the new interactive e-book; Out of my mind: Flash 8 Power

  • Additional options when creating a gradient
  • A new method to create a line with a gradient
  • A new method that allows you fill a movie clip with a bitmap

We’ll work through a series of examples so you can see how these new features work. In the first article, I looked at the changes that have been made to the lineStyle method. You don’t need to have completed that article before reading this one.

You’ll need a copy of Flash 8 to see the features covered in this article. You can download a trial copy from the Macromedia Web site. You should also install Flash Player 8 so you can publish these features. Because they include changes to ActionScript, you can’t publish to Flash Player 7 and earlier. Note that the code samples within this article all use AS2.0.

You can download the sample files for the tutorial from the blue Properties box that contains the article PDF. There's a heading titled Code Download and you can click the Details link next to it to get the zip file. The download includes the starter files you'll need as well as the completed files.

Note: If you have difficulties downloading the source files or PDF, you might have a problem with your cookies. Delete the cookies from your machine and try again. In Internet Explorer, you can do this by choosing Tools > Internet Options… and clicking the Delete Cookies… button on the General tab.

We’ll start by looking at how you can work with gradients.

$2.89
- OR -

Overview

Drawing gradients

Flash 8 includes some extra options for drawing gradients. I’ll compare Flash 8 and Flash MX 2004 so you can see the difference.

Sas Jacobs

Sas JacobsHello. I'm the Principal of Anything Is Possible, an Australian web development business specialising in web applications development and training. I'm interested in using Flash with dynamic content and I've presented at a number of International conferences on topics relating to applications development, XML and scripting components. I have recently released my second print book Beginning XML with DOM and Ajax to match the first one - Foundation XML for Flash. I have a business web site
and a personal web site.

See All Postings From Sas Jacobs >>

Reviews

Be the first to write a review

You must me logged in to write a review.