O'Reilly logo

Essential ActionScript 3.0 by Colin Moock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Restrictions on Loading Content, Accessing Content as Data, Cross-Scripting, and Loading Data

Most developers encounter ActionScript's security system for the first time when an operation they expect to succeed is blocked for security reasons. In this section, we'll study four of the most-often blocked external operations: loading content, accessing content as data, cross-scripting, and loading data. After defining each, we'll look at the circumstances under which these common operations are blocked.

Loading Content

Loading content means retrieving any external resource in order to subsequently display or play it. Conceptually, loading-content operations enable developers to present external content to the user, even in cases where ActionScript's security rules restrict programmatic access to that content's data.

The ActionScript methods considered to be "loading-content" operations from a security perspective are listed in the leftmost column of Table 19-1.

Table 19-1. Content-loading operations

Content-loading method

Type of content

Specific file formats supported by Flash Player 9

flash.display.Loader.load( )

Image, Adobe Flash

JPEG, GIF, PNG, SWF

flash.media.Sound.load( )

Audio

MP3

flash.net.NetStream.play( )

Progressive Video

FLV

For convenience, this chapter occasionally uses the term content resources when referring to resources loaded using one of the methods listed in Table 19-1. Note, however, that it is the specific method used to load the resource—not the file type of the resource—that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required