Thank you for visiting us. We are currently updating our shopping cart and regret to advise that it will be unavailable until September 1, 2014. We apologise for any inconvenience and look forward to serving you again.

Wiley
Wiley.com
Print this page Share

ActionScript 3.0 Bible

ISBN: 978-0-470-13560-0
792 pages
October 2007
ActionScript 3.0 Bible (0470135603) cover image
This description refers to the first edition of ActionScript 3.0 Bible. For the greatly revised and updated second edition published in April 2010, search on author Roger Braunstein’s name or for ISBN 0470525231. ActionScript has matured into a full-fledged, object-oriented programming language for creating cutting-edge Web applications, and this comprehensive book is just what you need to succeed. If you want to add interactivity to Flash, build Flex applications, or work with animation — it's all here, and more. Packed with clear instruction, step-by-step tutorials, and advanced techniques, this book is your go-to guide to unlock the power of this amazing language. Learn the basics, apply object-oriented programming, and more.
See More
Introduction.

Part I: Getting Started with ActionScript 3.0.

Chapter 1: Introducing ActionScript 3.0.

Chapter 2: Understanding ActionScript 3.0 Language Basics.

Chapter 3: Programming with Classes.

Chapter 4: Working with Methods and Functions.

Chapter 5: Validating Your Program.

Part II: Working with ActionScript 3.0 Objects.

Chapter 6: Using Strings.

Chapter 7: Working with Numbers and Math.

Chapter 8: Using Arrays.

Chapter 9: Using Objects.

Chapter 10: Working with XML.

Chapter 11: Working with Regular Expressions.

Part III: Working with the Display List.

Chapter 12: Understanding the Flash Player 9 Display List.

Chapter 13: Working with DisplayObjects in Flash CS3.

Chapter 14: Printing.

Chapter 15: Working with Text and Fonts.

Part IV: Understanding the Event Framework.

Chapter 16: Understanding Events.

Chapter 17: Working with Mouse and Keyboard Events.

Chapter 18: Using Timers.

Part V: Working with Error Handling.

Chapter 19: Understanding Errors.

Chapter 20: Using the AVM2 Debugger.

Chapter 21: Making Your Application Fault-Tolerant.

Part VI: Working with External Data.

Chapter 22: Understanding Networking Basics.

Chapter 23: Communicating with Server-Side Technologies.

Chapter 24: Saving Data to a Local Machine Using SharedObject.

Chapter 25: Managing File Uploads and Downloads.

Part VII: Enriching Your Program with Sound and Video.

Chapter 26: Working with Sound.

Chapter 27: Adding Video.

Chapter 28: Accessing Microphones and Cameras.

Part VIII: Programming Graphics and Motion.

Chapter 29: Applying Filters to Your Graphics.

Chapter 30: Drawing Vector Graphics Programmatically.

Chapter 31: Scripting Animation.

Chapter 32: Applying Transformations to Graphics.

Chapter 33: Drawing Bitmap Graphics Programmatically.

Part IX: Working with Binary Data.

Chapter 34: Working with Binary Data.

Part X: Deploying Your Program.

Chapter 35: Deploying Flash on the Web.

Chapter 36: Interfacing with JavaScript.

Chapter 37: Using Local Connections to Communicate Between Flash Applications.

Index.

See More
Roger Braunstein is the Director of Technology at Your Majesty. He is an ActionScript veteran, multidisciplinary programmer, and author of a short book on Flex 2. He has done a wide variety of projects for clients large and small, as a leader, developer, and animator.

Mims H. Wright is a senior Flash and Flex developer based in Brooklyn, NY. In his eight years of Flash experience he has worked on projects from video games to applications on and off the Web.

Joshua J. Noble has worked with Flash and Flex among other technologies for various companies and clients over the past five years. He has worked on projects ranging from video applications and editors to enterprise business applications.

See More
Download TitleSizeDownload
Complete code from the book
Updated 4/2/08
13.59 MB Click to Download
See More

Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
27 VideoButton Code
The following code is the VideoButton file needed to create the video button for the FLV Playback Application in Chapter 27. The download file contains the updated code files for chapter 27.

package com
{
import flash.display.Sprite;
import flash.text.TextField;
import flash.events.MouseEvent;
import flash.events.Event;

public class VideoButton extends Sprite
{
public static const CLICKED:String = "clicked";
private var text:TextField;

public function VideoButton(value:String)
{
super();

graphics.beginFill(0xFFFFFF, 1);
graphics.drawRoundRectComplex(0, 0, 30, 20, 3, 3, 3, 3);

text = new TextField();
text.height = 20;
text.width = 30;
text.text = value;
addChild(text);

addEventListener(MouseEvent.MOUSE_DOWN, dispatchClick);

}

private function dispatchClick(mouseEvent:MouseEvent):void
{
var event:Event = new Event("clicked");
dispatchEvent(event);
}

}
}
04/02/08
28 519 Error in Code
The code that begins on the bottom of page 519 was accidentally duplicated on page 521. The code that should appear on page 521 is as follows:

package
{
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.media.Camera;
import flash.display.Sprite;
import flash.media.Microphone;

public class CameraToNetStream extends Sprite
{

private var netStream:NetStream;
private var netConnect:NetConnection;
private var cam:Camera;
private var mic:Microphone;

public function CameraToNetStream()
{
cam = Camera.getCamera();
mic = Microphone.getMicrophone();
netConnect = new NetConnection();
netConnect.connect("myServerUrl");
netStream = new NetStream(netConnect);
netStream.attachCamera(cam);
netStream.attachAudio(mic);
}
}
}
11/14/07
30 568 Replace code
Replace code on page with:
package { import flash.display.*; import flash.events.Event; import flash.geom.Matrix; import flash.net.URLRequest; public class BitmapDataRect extends Sprite { private var shape:Sprite; private var loader:Loader; private var bmpImage:BitmapData; public function BitmapDataRect() { loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, picLoaded); loader.load(new URLRequest("http://www.rightactionscript.com/samplefiles/image2.jpg")); // Make a sprite into which to draw the shape. shape = new Sprite(); // Move the sprite so it's visible on stage. shape.x = 100; shape.y = 100; addChild(shape); } private function picLoaded(event:Event):void { trace("Loaded"); // Define a BitmapData object with dimensions identical to the sprite bmpImage = new BitmapData(loader.width, loader.height); // Draw the image into the BitmapData object. bmpImage.draw(loader); // Draw a shape, and use the BitmapData object as the bitmap fill. shape.graphics.lineStyle(25); shape.graphics.lineGradientStyle(GradientType.LINEAR, [0x00ff00, 0xff0000], [100, 100], [150, 255]); // Set the line gradient style to apply a linear gradient that goes from // yellow to cyan with yellow at the left edge and cyan at the right // edge. var mxBox:Matrix = new Matrix(); mxBox.createGradientBox(200, 200); shape.graphics.lineGradientStyle(GradientType.LINEAR, [0xFFFF00, 0x00FFFF], [100, 100], [0x00, 0xFF], mxBox); shape.graphics.beginBitmapFill(bmpImage); shape.graphics.drawRect(0, 0, 200, 200); shape.graphics.endFill(); } } }
11/14/07
See More

Related Titles

Back to Top