Reviews & Opinions
Independent and trusted. Read before buy Macromedia Flash 8 - Extending Flash!

Macromedia Flash 8 - Extending Flash


Bookmark
Macromedia Flash 8 - Extending Flash

Bookmark and Share

 

Macromedia Flash 8 - Extending FlashAbout Macromedia Flash 8 - Extending Flash
Here you can find all about Macromedia Flash 8 - Extending Flash like manual and other informations. For example: review.

Macromedia Flash 8 - Extending Flash manual (user guide) is ready to download for free.

On the bottom of page users can write a review. If you own a Macromedia Flash 8 - Extending Flash please write about it to help other people.
[ Report abuse or wrong photo | Share your Macromedia Flash 8 - Extending Flash photo ]

 

 

Manual

Preview of first few manual pages (at low quality). Check before download. Click to enlarge.
Manual - 1 page  Manual - 2 page  Manual - 3 page 

Download (English)
Macromedia Flash 8-extending Flash, size: 3.6 MB

 

Macromedia Flash 8 - Extending Flash

 

 

Video review

[MapleStory Short] TsukiAkari

 

User reviews and opinions

<== Click here to post a new opinion, comment, review, etc.

Comments to date: 2. Page 1 of 1. Average Rating:
lawsonrc 3:53pm on Friday, July 23rd, 2010 
Does this device have any real flaws? Lets address some real shortcomings of the iPad. The iPad is exactly what I expected, easy to use, very well executed so long as you understand that it is mainly a device to consume media.
tsager 5:29pm on Sunday, July 18th, 2010 
Bought the 16G WiFi for my wife. She enjoys playing games, surfing the web, reading books, reading email and catching up on her Soaps at ABC.com. Awesome game player, and has replaced my laptop but I do not have to need for business and so I do not know about how those work. Great for traveling,...

Comments posted on www.ps2netdrivers.net are solely the views and opinions of the people posting them and do not necessarily reflect the views or opinions of us.

 

Documents

doc0

Extending Flash
Trademarks 1 Step RoboPDF, ActiveEdit, ActiveTest, Authorware, Blue Sky Software, Blue Sky, Breeze, Breezo, Captivate, Central, ColdFusion, Contribute, Database Explorer, Director, Dreamweaver, Fireworks, Flash, FlashCast, FlashHelp, Flash Lite, FlashPaper, Flash Video Encoder, Flex, Flex Builder, Fontographer, FreeHand, Generator, HomeSite, JRun, MacRecorder, Macromedia, MXML, RoboEngine, RoboHelp, RoboInfo, RoboPDF, Roundtrip, Roundtrip HTML, Shockwave, SoundEdit, Studio MX, UltraDev, and WebHelp are either registered trademarks or trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words, or phrases mentioned within this publication may be trademarks, service marks, or trade names of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. Third-Party Information This guide contains links to third-party websites that are not under the control of Macromedia, and Macromedia is not responsible for the content on any linked site. If you access a third-party website mentioned in this guide, then you do so at your own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third-party sites. Speech compression and decompression technology licensed from Nellymoser, Inc. (www.nellymoser.com). Sorenson Spark video compression and decompression technology licensed from Sorenson Media, Inc. Opera browser Copyright 1995-2002 Opera Software ASA and its suppliers. All rights reserved. Macromedia Flash 8 video is powered by On2 TrueMotion video technology. 1992-2005 On2 Technologies, Inc. All Rights Reserved. http://www.on2.com. Visual SourceSafe is a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries. Copyright 2005 Macromedia, Inc. All rights reserved. This manual may not be copied, photocopied, reproduced, translated, or converted to any electronic or machine-readable form in whole or in part without written approval from Macromedia, Inc. Notwithstanding the foregoing, the owner or authorized user of a valid copy of the software with which this manual was provided may print out one copy of this manual from an electronic version of this manual for the sole purpose of such owner or authorized user learning to use such software, provided that no part of this manual may be printed out, reproduced, distributed, resold, or transmitted for any other purposes, including, without limitation, commercial purposes, such as selling copies of this documentation or providing paid-for support services. Acknowledgments Project Management: Sheila McGinn Writing: Jay Armstrong Managing Editor: Rosana Francescato Lead Editor: Lisa Stanziano Editing: Geta Carlson, Evelyn Eldridge, Mark Nigara Production Management: Patrice ONeill, Kristin Conradi, Yuko Yagi Media Design and Production: Adam Barnett, Aaron Begley, Paul Benkman. John Francis, Geeta Karmarkar, Masayo Noda, Paul Rangel, Arena Reed, Mario Reynoso Special thanks to Jody Bleyle, Mary Burger, Lisa Friendly, Stephanie Gowin, Bonnie Loo, Mary Ann Walsh, Erick Vera, the beta testers, and the entire Flash and Flash Player engineering and QA teams. First Edition: September 2005 Macromedia, Inc. 601 Townsend St. San Francisco, CA 94103

Contents

Introduction. 5 Overview of the Macromedia Flash JavaScript API. 5 Whats new in the JavaScript API. 10 The Flash Document Object Model. 14 Sample implementations. 19 Chapter 1: Top-Level Functions and Methods. 23 Chapter 2: Objects. 39 BitmapInstance object. 42 BitmapItem object. 46 CompiledClipInstance object. 49 ComponentInstance object. 54 componentsPanel object. 55 Contour object.57 Document object. 61 drawingLayer object. 177 Edge object.185 Effect object.190 Element object.193 Fill object. 203 Filter object. 208 flash object (fl). 222 FLfile object. 255 folderItem object. 271 fontItem object. 272 Frame object. 273 HalfEdge object. 289 Instance object. 294 Item object. 296 Layer object. 305 library object. 311 Math object. 327 Matrix object. 330

mouseMove()

function mouseMove( [ pt ] ) { // statements }
A point that specifies the current location of the mouse. It is passed to the function whenever the mouse moves, which tracks the mouse location. If the Stage is in edit or edit-in-place mode, the point coordinates are relative to the object being edited. Otherwise, the point coordinates are relative to the Stage. This parameter is optional.
Function; called whenever the extensible tool is active and the mouse moves over a specified point on the Stage. The mouse button can be down or up.
The following examples show how this function can be used. The first example displays a message in the Output panel that the mouse is being moved. The second example displays the x and y coordinates of the mouses location as it moves.
function mouseMove() { fl.trace("moving"); } function mouseMove(pt) { fl.trace("x = "+ pt.x + " :: y = " + pt.y); }

mouseUp()

function mouseUp() { // statements }
Function; called whenever the extensible tool is active and the mouse button is released after being pressed on the Stage.
The following example displays a message in the Output panel when the extensible tool is active and the mouse button is released.
function mouseUp() { fl.trace("mouse is up"); }

notifySettingsChanged()

function notifySettingsChanged() { // statements }
Function; called when the extensible tool is active and the user changes its options in the Property inspector. You can use the tools.activeTool property to query the current values of the options (see tools.activeTool).
The following example displays a message in the Output panel when the extensible tool is active and the user changes its options in the Property inspector.
function notifySettingsChanged() { var theTool = fl.tools.activeTool; var newValue = theTool.myProp; }

prompt()

prompt( promptMsg, [ text ] )

promptMsg

A string to display in the Prompt dialog box (limited to 256 characters on Macintosh OS X). An optional string to display as a default value for the text field.
The string the user typed if the user clicks OK; null if the user clicks Cancel.
Method; displays a prompt and optional text in a modal Alert dialog box, along with OK and Cancel buttons.
The following example prompts the user to enter a user name. If the user types a name and clicks OK, the name appears in the Output panel.
var userName = prompt("Enter user name", "Type user name here"); fl.trace(userName);

alert(), confirm()

removeEffect()
function removeEffect() { // statements }
Function; called when the user changes an effects properties or uses the Remove Effect menu item. The code contained in this function returns the object(s) to their original state. For example, if the effect broke a text string apart, the removeEffect() method would remove the text string that was broken apart and replace it with the original string.

configureEffect(), executeEffect()

setCursor()

Availability Flash MX 2004.
function setCursor() { // statements }
Function; called when the extensible tool is active and the mouse moves, to allow the script to set custom pointers. The script should call tools.setCursor() to specify the pointer to use. For a list that shows which pointers correspond to which integer values, see tools.setCursor().
function setCursor() { fl.tools.setCursor( 1 ); }

CHAPTER 2

Objects
This chapter briefly describes each of the objects available in the Flash JavaScript application programming interface (JavaScript API). The objects are listed in alphabetical order in the following table:

Object

BitmapInstance object BitmapItem object
The BitmapInstance object is a subclass of the Instance object and represents a bitmap in a frame. A BitmapItem object refers to a bitmap in the library of a document. The BitmapItem object is a subclass of the Item object.
CompiledClipInstance object The CompiledClipInstance object is a subclass of the Instance object. ComponentInstance object The ComponentInstance object is a subclass of the SymbolInstance object and represents a component in a frame. The componentsPanel object, which represents the Components panel, is a property of the flash object (fl) and can be accessed by fl.componentsPanel. A Contour object represents a closed path of half edges on the boundary of a shape. The Document object represents the Stage. The drawingLayer object is accessible from JavaScript as a child of the flash object. The Edge object represents an edge of a shape on the Stage. The Effect object represents an instance of a timeline effect. Everything that appears on the Stage is of the type Element. The Fill object contains all the properties of the Fill color setting of the Tools panel or of a selected shape.

componentsPanel object

Contour object Document object drawingLayer object Edge object Effect object Element object Fill object
Filter object flash object (fl) FLfile object
The Filter object contains all the properties for all filters. The flash object represents the Flash application. The FLfile object lets you write Flash extensions that can access, modify, and remove files and folders on the local file system. The folderItem object is a subclass of the Item object. The fontItem object is a subclass of the Item object. The Frame object represents frames in the layer. Directed side of the edge of a Shape object. The Instance object is a subclass of the Element object. The Item object is an abstract base class. The Layer object represents a layer in the timeline. The library object represents the Library panel. The Math object is available as a read-only property of the flash object; see fl.Math. The Matrix object represents a transformation matrix. The outputPanel object represents the Output panel, which displays troubleshooting information such as syntax errors. The Parameter object type is accessed from the screen.parameters array (which corresponds to the screen Property inspector in the Flash authoring tool) or by the componentInstance.parameters array (which corresponds to the component Property inspector in the authoring tool). The Path object defines a sequence of line segments (straight, curved, or both), which you typically use when creating extensible tools. The Project object represents a Flash Project (FLP) file. The ProjectItem object represents an item (file on disk) that has been added to a project. The Screen object represents a single screen in a slide or form document. The ScreenOutline object represents the group of screens in a slide or form document.

The following example adds a new oval within the specified coordinates; it is 164 pixels in width and 178 pixels in height:
flash.getDocumentDOM().addNewOval({left:72,top:50,right:236,bottom:228});
The following example draws the oval without a fill:
flash.getDocumentDOM().addNewOval({left:72,top:50,right:236,bottom:228}, true);
The following example draws the oval without a stroke:
flash.getDocumentDOM().addNewOval({left:72,top:50,right:236,bottom:228}, false, true);
document.addNewPublishProfile( [profileName ] )
profileName The unique name of the new profile. If you do not specify a name, a default name is provided. This parameter is optional.
An integer that is the index of the new profile in the profiles list. Returns -1 if a new profile cannot be created.
Method; adds a new publish profile and makes it the current one.
The following example adds a new publish profile with a default name and then displays the name of the profile in the Output panel:
fl.getDocumentDOM().addNewPublishProfile(); fl.outputPanel.trace(fl.getDocumentDOM().currentPublishProfile);
The following example adds a new publish profile with the name "my profile":
fl.getDocumentDOM().addNewPublishProfile("my profile");
document.addNewRectangle( boundingRectangle, roundness [, bSuppressFill [, bSuppressStroke ] ] )
A rectangle that specifies the bounds within which the new rectangle is added, in the format {left:value1,top:value2,right:value3,bottom:value4}. The left and top values specify the location of the upper-left corner (e.g., left:0,top:0 represents the upper-left of the Stage), and the right and bottom values specify location of the lower-right corner. Therefore, the width of the rectangle is the difference in value between left and right, and the height of the rectangle is the difference in value between top and bottom.

boundingRectangle

In other words, the rectangle bounds do not all correspond to the values shown in the Property inspector. The left and top values correspond to the X and Y values in the Property inspector, respectively. However, the right and bottom values dont correspond to the W and H values in the Property inspector. For example, consider a rectangle with the following bounds:
{left:10,top:10,right:50,bottom:100}
This rectangle would display the following values in the Property inspector:
X = 10, Y = 10, W = 40, H = 90 roundness
An integer value from 0 to 999 that specifies the roundness to use for the corners. The value is specified as number of points. The greater the value, the greater the roundness.

bSuppressFill

bSuppressStroke
A Boolean value that, if set to true, causes the method to create the rectangle without a stroke. The default value is false. This parameter is optional.

Method; converts the current selection to a group.
The following example converts the objects in the current selection to a group:
fl.getDocumentDOM().group();

document.unGroup()

Property; an integer that specifies the height of the document (Stage) in pixels.
The following example sets the height of the Stage to 400 pixels:
fl.getDocumentDOM().height = 400;

document.width

document.importFile()
document.importFile(fileURI [, importToLibrary])
A string, expressed as a file:/// URI, that specifies the path of the file to import.
A Boolean value that specifies whether to import the file only into the documents library (true) or to also place a copy on the Stage (false). The default value is false.

importToLibrary

A Boolean value that indicates whether the file was successfully imported.
Method; imports a file into a document. This method performs the same operation as the Import to Library or Import to Stage menu command. To import a publish profile, use document.importPublishProfile().
The following example lets the user browse for a file to import onto the Stage.
var dom = fl.getDocumentDOM(); var URI = fl.browseForFileURL("select", "Import File"); dom.importFile(URI);
document.importSWF(), fl.browseForFileURL()
document.importPublishProfile()
document.importPublishProfile( fileURI )
fileURI A string, expressed as a file:/// URI, that specifies the path of the XML file defining the profile to import.
An integer that is the index of the imported profile in the profiles list. Returns -1 if the profile cannot be imported.
Method; imports a profile from a file.
The following example imports the profile contained in the profile.xml file and displays its index in the profiles list:
alert(fl.getDocumentDOM().importPublishProfile('file:///C|/Documents and Settings/janeUser/Desktop/profile.xml'));

document.importSWF()

document.importSWF( fileURI )
A string, expressed as a file:/// URI, that specifies the file for the SWF file to

import.

Method; imports a SWF file into the document. This method performs the same operation as using the Import menu command to specify a SWF file. In Flash 8 and later, you can also use document.importFile() to import a SWF file (as well as other types of files).
The following example imports the "mySwf.swf" file from the Flash Configuration folder:

The following example removes the first filter (index value 0) from the Filters list of the selected object(s):
fl.getDocumentDOM().removeFilter(0);
document.addFilter(), document.changeFilterOrder(), document.disableFilter(), document.getFilters(), document.removeAllFilters(), Filter object
document.renamePublishProfile()
document.renamePublishProfile( [profileNewName ] )
profileNewName An optional parameter that specifies the new name for the profile. The new name must be unique. If the name is not specified, a default name is provided.
A Boolean value: true if the name is changed successfully; false otherwise.
Method; renames the current profile.
The following example renames the current profile to a default name and displays it:
alert(fl.getDocumentDOM().renamePublishProfile());

document.renameScene()

document.renameScene( name )
A string that specifies the new name of the scene.
A Boolean value: true if the name is changed successfully; false otherwise. If the new name is not unique, for example, the method returns false.
Method; renames the currently selected scene in the Scenes panel. The new name for the selected scene must be unique.
The following example renames the current scene to "new name":
var success = fl.getDocumentDOM().renameScene("new name");
document.reorderScene( sceneToMove, sceneToPutItBefore )

sceneToMove

An integer that specifies which scene to move, with 0 (zero) being the first

scene.

sceneToPutItBefore An integer that specifies the scene before which you want to move the scene specified by sceneToMove. Specify 0 (zero) for the first scene. For example, if you specify 1 for sceneToMove and 0 for sceneToPutItBefore, the second scene is placed before the first scene. Specify -1 to move the scene to the end.
Method; moves the specified scene before another specified scene.
The following example moves the second scene to before the first scene:

The following example returns an array representing the files, folders, or both files and folders in the Program Files directory.
var var var var folderURI = "file:///C|/WINDOWS/Program Files" ; fileList = FLfile.listFolder(folderURI, "files) // files fileList = FLfile.listFolder("folderURI", "directories) //folders fileList = FLfile.listFolder(folderURI) //files and folders
The following example returns an array of all the text (.txt) files in the temp folder and displays the list in an alert box.
var folderURI = "file:///c|/temp"; var fileMask = "*.txt"; var list = FLfile.listFolder(folderURI + "/" + fileMask, "files"); if (list) { alert(folderURI + " contains: " + list.join(" ")); }
The following example uses a file mask in the specified folderURI to return the names of all the executable files in the Windows application folder:
var executables = FLfile.listFolder("file:///C|/WINDOWS/*.exe","files") alert(executables.join("\n"))

FLfile.read()

FFLfile.read()
The contents of the specified file as a string, or null if the read fails.
Method; returns the contents of the specified file as a string, or null if the read fails.
The following example reads the file mydata.txt and, if successful, displays an alert box with the contents of the file.
var fileURI = "file:///c|/temp/mydata.txt"; var str = FLfile.read( fileURI); if (str) { alert( fileURL + " contains: " + str); }
The following example reads the ActionScript code from a class file and stores it in the code variable:
var classFileURI = "file:///C|/MyApplication/TextCarousel.as"; var code = Flfile.read(classFileURI);

FLfile.remove()

FLfile.remove( fileOrFolderURI )
A string, expressed as a file:/// URI, specifying the file or folder you want

to remove (delete).

Method; deletes the specified file or folder. If the folder contains files, those files will be deleted as well. Files with the R (read-only) attribute cannot be removed.
The following example warns a user if a file exists and then deletes it if the user chooses to do so.
var fileURI = prompt ("Enter file/folder to be deleted: ", "file:///c|/temp/ delete.txt"); if (FLfile.exists(fileURI)) { var confirm = prompt("File exists. Delete it? (y/n)", "y"); if (confirm == "y" || confirm == "Y") { if(FLfile.remove(fileURI)) { alert(fileURI + " is deleted."); } else { alert("fail to delete " + fileURI); } } } else { alert(fileURI + " does not exist"); }

CHAPTER 21

HalfEdge object
The HalfEdge object is the directed side of the edge of a Shape object. An edge has two half edges. You can transverse the contours of a shape by walking around these half edges. For example, starting from a half edge, you can trace all the half edges around a contour of a shape, and return to the original half edge. Half edges are ordered. One half edge represents one side of the edge; the other half edge represents the other side.
Method summary for the HalfEdge object
The following methods are available for the HalfEdge object:
halfEdge.getEdge() halfEdge.getNext()
Gets the Edge object for the HalfEdge object. Gets the next half edge on the current contour.
halfEdge.getOppositeHalfEdge() Gets the HalfEdge object on the other side of the edge. halfEdge.getPrev() halfEdge.getVertex()
Gets the preceding HalfEdge object on the current contour. Gets the Vertex object at the head of the HalfEdge object.
Property summary for the HalfEdge object
The following properties are available for the HalfEdge object:

halfEdge.id

Read-only; a unique integer identifier for the HalfEdge object.

halfEdge.index

halfEdge.getEdge()

An Edge object.

Method; gets the Edge object for the HalfEdge object. See Edge object.
The following example illustrates getting an edge and a half edge for the specified shape.
var shape = fl.getDocumentDOM().selection[0]; var hEdge = shape.edges[0].getHalfEdge(0); var edge = hEdge.getEdge();

halfEdge.getNext()

Method; gets the next half edge on the current contour.
Although half edges have a direction and a sequence order, edges do not.

N OT E 290

The following example stores the next half edge of the specified contour in the nextHalfEdge variable:
var shape = fl.getDocumentDOM().selection[0]; var hEdge = shape.edges[0].getHalfEdge( 0 ); var nextHalfEdge = hEdge.getNext();

The following example deselects any currently selected screens, and then selects screens slide1, slide2, slide3, and slide4 in the screen outline:
myArray = new Array("slide1", "slide2", "slide3", "slide4"); fl.getDocumentDOM().screenOutline.setSelectedScreens(myArray, true);

CHAPTER 35

Element object > Shape object
The Shape object is a subclass of the Element object. The Shape object provides more precise control than the Drawing APIs when manipulating or creating geometry on the Stage. This control is necessary so that scripts can create useful effects and other drawing commands. (See Element object.) All Shape methods and properties that change a shape or any of its subordinate parts must be placed between shape.beginEdit() and shape.endEdit() calls to function correctly.
Method summary for the Shape object
In addition to the Element object methods, you can use the following methods with the Shape object:
shape.beginEdit() shape.deleteEdge() shape.endEdit()
Defines the start of an edit session. Deletes the specified edge. Defines the end of an edit session for the shape.
Property summary for the Shape object
In addition to the Element object properties, the following properties are available for the Shape object:

shape.contours

Read-only; an array of Contour objects for the shape (see Contour object). Read-only; an array of Edge objects (see Edge object). Read-only; if true, the shape is a drawing object. Read-only; if true, the shape is a group. Read-only; an array of Vertex objects (see Vertex object).
shape.edges shape.isDrawingObject shape.isGroup shape.vertices

shape.beginEdit()

Method; defines the start of an edit session. You must use this method before issuing any commands that change the Shape object or any of its subordinate parts.
The following example takes the currently selected shape and removes the first edge in the edge array from it:

An integer that specifies the end of the range of text, which starts with startIndex and goes up to, but does not include, endIndex. This parameter is optional.
The value of the attribute specified in the attrName parameter.
Method; retrieves the attribute specified by the attrName parameter for the text identified by the optional startIndex and endIndex parameters. If the attribute is not consistent for the specified range, Flash returns undefined. If you omit the optional parameters startIndex and endIndex, the method uses the entire text range. If you specify only startIndex, the range used is a single character at that position. If you specify both startIndex and endIndex, the range starts from startIndex and goes up to, but does not include, endIndex.
The following example gets the font size of the currently selected text field and shows it:
var TheTextSize = fl.getDocumentDOM().selection[0].getTextAttr("size"); fl.trace(TheTextSize);
The following example gets the text fill color of the selected text field:
var TheFill = fl.getDocumentDOM().selection[0].getTextAttr("fillColor"); fl.trace(TheFill);
The following example gets the size of the third character:
var Char2 = fl.getDocumentDOM().selection[0].getTextAttr("size", 2); fl.trace(Char2);
The following example gets the color of the selected text field from the third through the eighth character:
fl.getDocumentDOM().selection[0].getTextAttr("fillColor", 2, 8);

text.getTextString()

text.getTextString([startIndex [, endIndex] ])
An integer that specifies the index (zero-based) of the first character. This parameter is optional. An integer that specifies the end of the range of text, which starts from and goes up to, but does not include, endIndex. This parameter is optional.

endIndex startIndex

A string of the text in the specified range.
Method; retrieves the specified range of text. If you omit the optional parameters startIndex and endIndex, the whole text string is returned. If you specify only startIndex, the method returns the string starting at the index location and ending at the end of the field. If you specify both startIndex and endIndex, the method returns the string starts from startIndex and goes up to, but does not include, endIndex.

A value for the specified property, or undefined if all the selected frames do not have the same property value.
Method; retrieves the specified propertys value for the selected frames.
The following example retrieves the name of the first frame in the current documents top layer and displays the name in the Output panel:
fl.getDocumentDOM().getTimeline().currentLayer = 0; fl.getDocumentDOM().getTimeline().setSelectedFrames(0, 0, true); var frameName = fl.getDocumentDOM().getTimeline().getFrameProperty("name"); fl.trace(frameName);
timeline.getLayerProperty(property)
A string that specifies the name of the property whose value you want to retrieve. For a list of properties, see Property summary for the Layer object on page 305.
The value of the specified property. Flash looks at the layers properties to determine the type. If all the specified layers dont have the same property value, Flash returns undefined.
Method; retrieves the specified propertys value for the selected layers.
The following example retrieves the name of the top layer in the current document and displays it in the Output panel:
fl.getDocumentDOM().getTimeline().currentLayer = 0; var layerName = fl.getDocumentDOM().getTimeline().getLayerProperty("name"); fl.trace(layerName);
timeline.getSelectedFrames()

Timeline object 483

An array containing 3n integers, where n is the number of selected regions. The first integer in each group is the layer index, the second integer is the start frame of the beginning of the selection, and the third integer specifies the ending frame of that selection range. The ending frame is not included in the selection.
Method; retrieves the currently selected frames in an array.
With the top layer being the current layer, the following example displays 0,5,10,0,20,25 in the Output panel:
var timeline = fl.getDocumentDOM().getTimeline(); timeline.setSelectedFrames(5,10); timeline.setSelectedFrames(20,25,false); var theSelectedFrames = timeline.getSelectedFrames(); fl.trace(theSelectedFrames);
timeline.getSelectedLayers()
An array of the zero-based index values of the selected layers.
Method; gets the zero-based index values of the currently selected layers.
The following example displays 1,0 in the Output panel:
fl.getDocumentDOM().getTimeline().setSelectedLayers(0); fl.getDocumentDOM().getTimeline().setSelectedLayers(1, false); var layerArray = fl.getDocumentDOM().getTimeline().getSelectedLayers(); fl.trace(layerArray);
timeline.insertBlankKeyframe([frameNumIndex])
A zero-based index that specifies the frame at which to insert the keyframe. If you omit frameNumIndex, the method uses the current playhead frame number. This parameter is optional.

fl.getDocumentDOM().getTimeline().setSelectedFrames([0, 0, 9]); fl.getDocumentDOM().getTimeline().setSelectedFrames([0, 11, 14], false);
timeline.setSelectedLayers(index [, bReplaceCurrentSelection])
A zero-based index for the layer to select.
A Boolean value that, if it is set to true, causes the method to replace the current selection; false causes the method to extend the current selection. The default value is true. This parameter is optional.
Method; sets the layer to be selected, and also makes the specified layer the current layer. Selecting a layer also means that all the frames in the layer are selected.
The following example selects the top layer:
fl.getDocumentDOM().getTimeline().setSelectedLayers(0);
The following example adds the next layer to the selection:
fl.getDocumentDOM().getTimeline().setSelectedLayers(1, false);
timeline.showLayerMasking([layer])
A zero-based index of a mask or masked layer to show masking during authoring. This parameter is optional.
Method; shows the layer masking during authoring by locking the mask and masked layers. This method uses the current layer if no layer is specified. If you use this method on a layer that is not of type Mask or Masked, Flash displays an error in the Output panel.
The following example specifies that the layer masking of the first layer should show during authoring.
fl.getDocumentDOM().getTimeline().showLayerMasking(0);

CHAPTER 44

ToolObj object
A ToolObj object represents an individual tool in the Tools panel. To access a ToolObj object, use properties of the Tools object: either the tools.toolObjs array or tools.activeTool.
Method summary for the ToolObj object
The following methods are available for the ToolObj object.
The following methods are used only when creating extensible tools.

NO T E

toolObj.enablePIControl()
Enables or disables the specified control in a Property inspector. Used only when creating extensible tools. Identifies a PNG file to use as a tool icon in the Flash Tools panel. Sets the string that appears in the pop-up menu as the name for the tool. Associates an XML file with the tool. Sets a particular Property inspector to be used when the tool is activated. Assigns a name to the tool for the configuration of the Tools panel. Sets the tooltip that appears when the mouse is held over the tool icon. Shows or hides a control in the Property inspector. tools JavaScript file to indicate that the free transform handles should appear when the tool is active.

toolObj.setIcon()

toolObj.setMenuString()
toolObj.setOptionsFile() toolObj.setPI()

toolObj.setToolName()

toolObj.setToolTip()

toolObj.showPIControl()

(mmEnv.valueToString short *)0)
? (*(mmEnv.valueToString))(c, v, l) : (unsigned
/* unsigned char *JS_ValueToBytes(JSContext *cx, jsval v, unsigned int *pLength) */ #define JS_ValueToBytes(c, v, l) \ (mmEnv.valueToBytes ? (*(mmEnv.valueToBytes))(c, v, l) : (unsigned char *)0) /* JSBool JS_ValueToInteger(JSContext *cx, jsval v, long *lp); */ #define JS_ValueToInteger(c, v, l) \ (mmEnv.valueToInteger ? (*(mmEnv.valueToInteger))(c, v, l) : JS_FALSE) /* JSBool JS_ValueToDouble(JSContext *cx, jsval v, double *dp); */ #define JS_ValueToDouble(c, v, d) \ (mmEnv.valueToDouble ? (*(mmEnv.valueToDouble))(c, v, d) : JS_FALSE) /* JSBool JS_ValueToBoolean(JSContext *cx, jsval v, JSBool *bp); */ #define JS_ValueToBoolean(c, v, b) \ (mmEnv.valueToBoolean ? (*(mmEnv.valueToBoolean))(c, v, b) : JS_FALSE) /* JSBool JS_ValueToObject(JSContext *cx, jsval v, JSObject **op); */ #define JS_ValueToObject(c, v, o) \ (mmEnv.valueToObject ? (*(mmEnv.valueToObject))(c, v, o) : JS_FALSE) /* JSBool JS_StringToValue(JSContext *cx, unsigned short *bytes, uint sz, jsval *vp); */ #define JS_StringToValue(c, b, s, v) \ (mmEnv.stringToValue ? (*(mmEnv.stringToValue))(c, b, s, v) : JS_FALSE) /* JSBool JS_BytesToValue(JSContext *cx, unsigned char *bytes, uint sz, jsval *vp); */ #define JS_BytesToValue(c, b, s, v) \ (mmEnv.bytesToValue ? (*(mmEnv.bytesToValue))(c, b, s, v) : JS_FALSE) /* JSBool JS_DoubleToValue(JSContext *cx, double dv, jsval *vp); */ #define JS_DoubleToValue(c, d, v) \ (mmEnv.doubleToValue ? (*(mmEnv.doubleToValue))(c, d, v) : JS_FALSE) /* jsval JS_IntegerToValue(long lv); */ #define JS_IntegerToValue(lv) (((jsval)(lv) << 1) | 0x1) /* jsval JS_BooleanToValue(JSBool bv); */ #define JS_BooleanToValue(bv) (((jsval)(bv) << 3) | 0x6) /* jsval JS_ObjectToValue(JSObject *obj); */ #define JS_ObjectToValue(ov) ((jsval)(ov)) /* unsigned short *JS_ObjectType(JSObject *obj); */ #define JS_ObjectType(o) \

(mmEnv.objectType

? (*(mmEnv.objectType))(o) : (unsigned short *)0)
/* JSObject *JS_NewArrayObject(JSContext *cx, unsigned int length, jsval *v) */ #define JS_NewArrayObject(c, l, v) \ (mmEnv.newArrayObject ? (*(mmEnv.newArrayObject))(c, l, v) : (JSObject *)0) /* long JS_GetArrayLength(JSContext *cx, JSObject *obj) */ #define JS_GetArrayLength(c, o) \ (mmEnv.getArrayLength ? (*(mmEnv.getArrayLength))(c, o) : -1) /* JSBool JS_GetElement(JSContext *cx, JSObject *obj, jsint idx, jsval *vp) */ #define JS_GetElement(c, o, i, v) \ (mmEnv.getElement ? (*(mmEnv.getElement))(c, o, i, v) : JS_FALSE) /* JSBool JS_SetElement(JSContext *cx, JSObject *obj, jsint idx, jsval *vp) */ #define JS_SetElement(c, o, i, v) \ (mmEnv.setElement ? (*(mmEnv.setElement))(c, o, i, v) : JS_FALSE) /* JSBool JS_ExecuteScript(JSContext *cx, JSObject *obj, unsigned short *script, * unsigned int sz, jsval *rval) */ #define JS_ExecuteScript(c, o, s, z, r) \ (mmEnv.executeScript ? (*(mmEnv.executeScript))(c, o, s, z, _T(__FILE__), \ __LINE__, r) : JS_FALSE) /* JSBool JS_ReportError(JSContext *cx, unsigned short *error, unsigned int sz) */ #define JS_ReportError(c, e, s) \ (mmEnv.reportError ? (*(mmEnv.reportError))(c, e, s) : JS_FALSE)

doc1

Flash Samples

Trademarks 1 Step RoboPDF, ActiveEdit, ActiveTest, Authorware, Blue Sky Software, Blue Sky, Breeze, Breezo, Captivate, Central, ColdFusion, Contribute, Database Explorer, Director, Dreamweaver, Fireworks, Flash, FlashCast, FlashHelp, Flash Lite, FlashPaper, Flash Video Encoder, Flex, Flex Builder, Fontographer, FreeHand, Generator, HomeSite, JRun, MacRecorder, Macromedia, MXML, RoboEngine, RoboHelp, RoboInfo, RoboPDF, Roundtrip, Roundtrip HTML, Shockwave, SoundEdit, Studio MX, UltraDev, and WebHelp are either registered trademarks or trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words, or phrases mentioned within this publication may be trademarks, service marks, or trade names of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. Third-Party Information This guide contains links to third-party websites that are not under the control of Macromedia, and Macromedia is not responsible for the content on any linked site. If you access a third-party website mentioned in this guide, then you do so at your own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third-party sites. Speech compression and decompression technology licensed from Nellymoser, Inc. (www.nellymoser.com). Sorenson Spark video compression and decompression technology licensed from Sorenson Media, Inc. Opera browser Copyright 1995-2002 Opera Software ASA and its suppliers. All rights reserved. Macromedia Flash 8 video is powered by On2 TrueMotion video technology. 1992-2005 On2 Technologies, Inc. All Rights Reserved. http://www.on2.com. Visual SourceSafe is a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries. Copyright 2005 Macromedia, Inc. All rights reserved. This manual may not be copied, photocopied, reproduced, translated, or converted to any electronic or machine-readable form in whole or in part without written approval from Macromedia, Inc. Notwithstanding the foregoing, the owner or authorized user of a valid copy of the software with which this manual was provided may print out one copy of this manual from an electronic version of this manual for the sole purpose of such owner or authorized user learning to use such software, provided that no part of this manual may be printed out, reproduced, distributed, resold, or transmitted for any other purposes, including, without limitation, commercial purposes, such as selling copies of this documentation or providing paid-for support services. Acknowledgments Project Management: Sheila McGinn Writing: Jay Armstrong, Jen deHaan Managing Editor: Rosana Francescato Lead Editor: Lisa Stanziano Editing: Evelyn Eldridge, Mark Nigara, Lisa Stanziano, Anne Szabla Production Management: Patrice ONeill, Kristin Conradi, Yuko Yagi Media Design and Production: Adam Barnett, Aaron Begley, Paul Benkman. John Francis, Geeta Karmarkar, Masayo Noda, Paul Rangel, Arena Reed, Mario Reynoso Special thanks to Jody Bleyle, Mary Burger, Lisa Friendly, Stephanie Gowin, Bonnie Loo, Mary Ann Walsh, Erick Vera, the beta testers, and the entire Flash and Flash Player engineering and QA teams. First Edition: September 2005 Macromedia, Inc. 601 Townsend St. San Francisco, CA 94103

Contents

Chapter 1: Graphics. 7 Animated drop shadow. 7 Animation and gradients. 8 Chapter 2: Accessibility.11 Accessibility features.11 Chapter 3: Masking. 13 Device font masking. 13 Scriptable masks. 14 Chapter 4: Text. 15 Text sample. 15 Multilingual content. 16 Chapter 5: Behaviors. 17 Photo scrapbook. 17 Chapter 6: Components. 19 Component application. 19 Dial component sample. 20 Login component sample. 20 Tip calculator. 21 Components jukebox. 22 Chapter 7: ActionScript. 23 Custom Flash Player context menu. Filters with ActionScript. Animation with ActionScript. The Tween class, the TransitionManager class, and progress bars. ActionScript data types. Bitmap caching with ActionScript. 26 26
Drawing with ActionScript. 27 ActionScript arrays example. 27 Interaction between the browser and Flash Player. 28 Stage size control with ActionScript. 28 Text loading with ActionScript. 29 Formatted text with ActionScript. 29 FlashType sample. 29 Login sample. 30 String processing with ActionScript. 30 Image manipulation with the BitmapData class. 31 Text field manipulation with ActionScript. 31 Photo gallery with tree navigation. 32 Photo gallery with thumbnails. 32 File upload with the FileReference API. 33 XML blog tracker. 33 XML language picker. 34 XML menu. 34 Chapter 8: Data Integration.35 News reader. 35 WebServiceConnector component. 36 Data integration XML sample. 36 Flash and PHP integration. 37 Chapter 9: Extending Flash.39 Shape command. 40 Get and set filters command. 40 PolyStar tool. 41 Trace Bitmap panel. 41 Sample DLL. 42 Chapter 10: Flash Lite.43 Two-way navigation sample. 43 Four-way navigation sample. 44 Input text field sample. 44 Movie clip menu sample. 45 Simple button menu sample. 45 Soft keys example. 45 Animated cartoon. 46 Flash Lite news reader. 46 Strategy game. 47

Introduction

Macromedia Flash Basic 8 and Macromedia Flash Professional 8 provide everything you need to create and deliver rich web content and powerful applications. Whether youre designing motion graphics or building datadriven applications, Flash has the tools necessary to produce great results and deliver the best user experience across multiple platforms and devices. The samples in this book are designed to introduce you to Flash. As you explore the samples, you will see many of the basic techniques used in creating Flash applications. For additional samples see www.macromedia.com/go/flash_samples.
This book is not a comprehensive manual that details all of the features of Flash. For in-depth information about how to use Flash, see Using Flash and Learning ActionScript 2.0 in Flash.

CHAPTER 1

Graphics
Graphics samples are provided when you install Macromedia Flash 8. This chapter contains a brief overview of each sample. This chapter contains the following sections:
Animated drop shadow. 7 Animation and gradients. 8

Animated drop shadow

This sample shows how to create a realistic-looking animated drop shadow by layering two instances of the same movie clip and adding a drop shadow filter to the lower layer. To re-create the process of constructing this sample, you first create the shadow effect for the dog by nesting the animation inside a movie clip. You then duplicate the movie clip instance and place it behind the original instance. (You can keep the duplicate on the same layer and arrange it behind the original instance, or paste it to a new layer below the original.) You then select the duplicate instance and, in the Filters tab of the Property inspector, select Drop Shadow from the Plus (+) menu. Next, adjust the strength level to around 45% and select Hide Object. This hides the movie clip object but reveals the drop shadow filter properties. You can make further adjustments by setting Quality to Low, Medium, or High, or modifying the amount of blur, the color, the angle, or the distance of the blur effect from the original graphic.
To prevent this effect from looking too much like a drop shadow against a flat wall behind the original object, you can use the Free Transform tool to skew the filtered movie clip instance. This technique takes a bit of trial and error. Squash and skew the instance until it looks as if the shadow is being cast upon a floor. (You may need to reposition the instance.) Test the movie clip, and you see the effect come to life. You can find the sample source files, drop_shadow_dog.fla and drop_shadow_monkey.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Graphics\AnimatedDropShadow. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Graphics/ AnimatedDropShadow.
These samples were developed by Chris Georgenes.

Animation and gradients

This sample shows how to create a realistic-looking animation with gradients and drop shadows. To re-create the process of constructing this sample, you first design the eight-ball graphic. Start by mixing a radial gradient containing three colors: black, white, and a medium gray. Then create a circle with the Oval tool (hold down Shift to constrain the shape so it is perfectly round), and fill it with the new radial gradient. Using the Gradient Transform tool, edit the radial gradient fill by offsetting it from the center of the circle. This gives the illusion of depth as the off-center white highlight gradually changes to black and a subtle amount of gray appears in the lower-right corner of the sphere. This is crucial for making a convincing-looking sphere; it suggests light wrapping around from behind the ball. Then convert the gradient fill to a graphic symbol and edit it further by adding a new layer and applying a shadow using a linear gradient. The linear gradient uses two colors with varying amounts of alpha mixed in.

The next step is to create a movie clip symbol and place this eight-ball graphic inside it. Inside this movie clip is where the 8 graphic is added along with a mask layer. Then add a mask that is the same size and shape as the eight ball, and use the Free Transform tool and motion tweening to create the illusion of the ball rolling in various directions by moving and squashing the 8 graphic across the surface of the circle. The mask constrains the visibility of the 8 graphic to the exact area of the circle below it. This makes for a convincing illusion of the ball rolling. Then add animations of the ball rolling to a stop and starting from a stationary position. Use descriptive frame labels and simple frame actions so this movie clip can be targeted later with ActionScript from the main timeline. The movie clip has to be set up this way; it uses a drop shadow, which can be applied only to movie clip instances. Applying the drop shadow is the easiest part, thanks to the graphics filters in Flash. You simply select the movie clip instance, and from the Filters tab of the Property inspector, click the Plus (+) pop-up menu and select Drop Shadow. From there you can adjust the amount of blur, strength, quality, color, angle distance, and so on. The drop shadow filter is used to create blurs only when the eight ball is animated moving rapidly across the screen. This emphasizes the speed at which the ball is moving and creates a dynamic visual effect. You can find the sample source file, animation_and_gradients.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Graphics\AnimationAndGradients. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Graphics/ AnimationAndGradients.
This sample was developed by Chris Georgenes.

CHAPTER 2

Accessibility
An accessibility sample is provided when you install Macromedia Flash 8. This chapter contains a brief overview of this sample. This chapter contains the following section:
Accessibility features. 11

Accessibility features

This sample shows how to use accessibility features such as tab ordering, components, and the Accessibility panel. In this sample, you can see how to use the new authoring tool features and user interface, which are geared toward building applications that contain the accessibility features. An arrow moves to indicate which element on the Stage has the focus. Explore the source code to learn more about how to take advantage of the Flash accessibility features. You can find the sample source file, AccessibleApplications.fla, in the Samples folder on your hard disk.

In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Accessibility\AccessibleApplications. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Accessibility/ AccessibleApplications.

CHAPTER 3

Masking
Masking samples are provided when you install Macromedia Flash 8. This chapter contains a brief overview of each sample. This chapter contains the following sections:
Device font masking. 13 Scriptable masks. 14

Device font masking

This sample explores Flash Player support for masking device fonts. The main features illustrated in the sample are device font masking, components, and scriptable masks. Newly added support in Flash Player for masking device fonts expands the possibilities for using scriptable masks on Flash content. Device font masking allows device fonts to be used inside components that mask their content, as well as custom masks that you create. This sample shows examples of both types of masking. You can find the sample source file, DeviceFontMasking.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Masking\DeviceFontMasking. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Masking/ DeviceFontMasking.

Scriptable masks

This sample shows how to dynamically mask Flash content at runtime using scriptable masks and components. Scriptable masking allows precise control over how masks behave at runtime, and allows the mask and the masked content to be dynamically changed at runtime. This sample shows different types of masks and masked content that are controlled by a user interface built with components. Explore this sample to learn more about masking and building interfaces with components. You can find the sample source file, ScriptableMasksPart2.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Masking\ScriptableMasksPart2. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Masking/ ScriptableMasksPart2.

CHAPTER 4

Text samples are provided when you install Macromedia Flash 8. This chapter contains a brief overview of each sample. This chapter contains the following sections:

Text sample. 15 Multilingual content. 16

Text sample

This sample uses the many new text enhancements added to Macromedia Flash Basic 8 and Macromedia Flash Professional 8. The features highlighted in this sample are text styles, inline images, hyperlink improvements, and small text optimization. The text enhancements provide better and more precise control over text as it is entered in Flash Player. This sample loads an external HTML file named sample.html into a text field in the SWF file. However, you could use any text file that incorporates a tag-based format such as XML or HTML. New support for Cascading Style Sheets allows Flash to style the text in a given text field for each tag before displaying it. This sample uses a style sheet named style.css. Additionally, Flash Player supports the img tag, allowing inline images that your text wraps around. You can find the sample source file, TextEnhancements.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Text\TextEnhancements. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Text/ TextEnhancements.

Multilingual content

This sample, featuring the Strings panel, shows a streamlined approach to developing and managing content in several languages. The new Strings panel provides for easy and fast content development in different languages. Localized content for text fields inside the document is kept in language-specific XML files in directories alongside the document. This sample has content in several languages. The language displayed corresponds to the current language of the host operating system. Explore this sample to see how the Strings panel manages localized content. You can find the sample source file, MultiLingualContent.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Text\MultilingualContent. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Text/ MultilingualContent.

CHAPTER 5

Behaviors
A behaviors sample is provided when you install Macromedia Flash 8. This chapter contains a brief overview of this sample. This chapter contains the following section:

Photo scrapbook.17

Photo scrapbook
This sample shows how to build an interactive photo scrapbook by using behaviors instead of scripting. Behaviors provide an easy way to add interactivity to your Flash content without having to write ActionScript. In this sample, multiple behaviors are combined to create an interactive scrapbook. Explore the source file to learn more, or customize it by adding your own pictures. You can find the sample source file, BehaviorsScrapbook.fla, in the Samples folder on your hard disk.

The LogIn sample component uses Button, Label, and InputField component movie clip symbols to create a simple name and password login interface that dispatches a click event when the Login button is clicked. The sample includes a document file (.fla) containing the LogIn component movie clip symbol in its library and the LogIn components class ActionScript file (.as), which defines its class properties and methods. Explore both files to learn about the basic version 2 component structure and how to incorporate the capabilities of Flash components into your own custom components. You can find the sample source file, login.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\ Samples and Tutorials\Samples\Components\Login. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Components/ Login.

Tip calculator

This sample demonstrates how to perform event handling with forms and components. You can find the sample source files (TipCalculator.fla, TipCalculator1.fla, and TipCalculator2.fla) in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\ Samples and Tutorials\Samples\Components\TipCalculator. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Components/ TipCalculator.

Components jukebox

This sample demonstrates how to create a jukebox by using data types, general coding principles, and several components. You can find the sample source file, jukebox.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\Components\Jukebox. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/Components/ Jukebox.

CHAPTER 7

ActionScript
Several ActionScript samples are provided when you install Macromedia Flash 8. This chapter contains a brief overview of each sample. This chapter contains the following sections:
Custom Flash Player context menu. 24 Filters with ActionScript. 24 Animation with ActionScript. 25 The Tween class, the TransitionManager class, and progress bars. 25 ActionScript data types. 26 Bitmap caching with ActionScript. 26 Drawing with ActionScript. 27 ActionScript arrays example. 27 Interaction between the browser and Flash Player. 28 Stage size control with ActionScript. 28 Text loading with ActionScript. 29 Formatted text with ActionScript. 29 FlashType sample. 29 Login sample. 30 String processing with ActionScript. 30 Image manipulation with the BitmapData class.31 Text field manipulation with ActionScript.31 Photo gallery with tree navigation. 32 Photo gallery with thumbnails. 32 File upload with the FileReference API. 33 XML blog tracker. 33 XML language picker. 34 XML menu. 34

Custom Flash Player context menu
In this sample, you can see how to add custom options to the Flash Player context menu using ActionScript 2.0. This sample uses ActionScript to modify the context menu by adding cut, copy, and paste functionality that can be applied to the drawing objects on the Stage. The source includes the document file (.fla) and the ActionScript file (.as) that defines the ClipBoard class. Explore both files to learn more about the context menu and writing classes with ActionScript 2.0. You can find the sample source file, CustomizingContextMenu.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\ CustomizingContextMenu. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ CustomizingContextMenu.
Filters with ActionScript
This sample shows how to apply filter effects to images with ActionScript. You can apply different filters to several images, and then manipulate their properties at runtime. The ActionScript code shows how to apply filters and manipulate the filter properties using components. You can find the sample source file, Filters.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\Filters. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ Filters.
Animation with ActionScript
This sample provides an example of programmatic animation using ActionScript. It shows a simple game where instances are animated across the Stage at runtime. You create a custom mouse pointer, and you can tally scores by manipulating strings and using operators to write equations. You can find the sample source file, animation.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\Animation. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ Animation.
The Tween class, the TransitionManager class, and progress bars
This sample shows how to script animation using the Tween and TransitionManager classes, which provide an easy way to animate instances using code. It also shows how to create a progress bar using code. You can find the sample source file, tweenProgress.fla, in the Samples folder on your hard disk.

Interaction between the browser and Flash Player
This sample demonstrates how to use the External API (ExternalInterface class) to create interaction between the browser and your SWF file. In this sample, HTML form controls on a web page let you manipulate and display information about an FLV video that plays in a SWF file. Messages from the SWF file appear in an HTML text field. You can find the sample source file, external.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\ExternalAPI. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ ExternalAPI.
Stage size control with ActionScript
This sample demonstrates how the Stage.scaleMode property affects the values of Stage.width and Stage.height when the browser window is resized. You can find the sample source file, stagesize.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\StageSize. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ StageSize.
Text loading with ActionScript
This simple sample shows how to load text into a SWF file at runtime using the LoadVars class. You can find the sample source file, loadText.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\LoadText. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ LoadText.
Formatted text with ActionScript
This sample shows how to load formatted text into a SWF file at runtime. You can find the sample source file, formattedText.fla, in the Samples folder on your hard disk.

FlashType sample

This sample shows how to apply and manipulate anti-aliased text in an application. You use the FlashType rendering technology to create small text thats highly legible. This sample also demonstrates how text fields can scroll quickly and smoothly when you use the cacheAsBitmap property. You can find the sample source file, flashtype.fla, in the Samples folder on your hard disk.

In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\FlashType. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ FlashType.

Login sample

This sample shows how to add simple login functionality to your websites using ActionScript 2.0. The sample uses ActionScript and components to create a small form in which you enter a user name and password and then click a button to enter a site. You can find the sample source file, login.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\Login. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ Login.
String processing with ActionScript
This sample demonstrates how to build a simple word processor that compares and retrieves string and substring selections. You can find the sample source file, strings.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\Strings. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ Strings.
Image manipulation with the BitmapData class
This sample demonstrates how to manipulate an image and create a transition using the BitmapData class. You can find the sample source file, BitmapData.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\BitmapData. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ BitmapData.
Text field manipulation with ActionScript
This sample demonstrates how to create and position a text field, manipulate its text, and control text selections. You can find the sample source files, textfieldsA.fla and textfieldsB.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\TextFields. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ TextFields.
Photo gallery with tree navigation
This sample is a photo gallery application with tree navigation. It provides an example of using components to control movie clips dynamically. You can find the sample source file, gallery_tree.fla, in the Samples folder on your hard disk.

In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\Galleries. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ Galleries.
Photo gallery with thumbnails
This sample is a photo gallery application with thumbnails. It provides an example of using ActionScript to control movie clips dynamically. You can find the sample source file, gallery_tween.fla, in the Samples folder on your hard disk.
File upload with the FileReference API
This sample demonstrates how to let users select a file on their hard disk and upload it to a server. After the local image uploads, it appears in the SWF file. You can find the sample source file, FileUpload.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\FileUpload. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ FileUpload.

XML blog tracker

This sample demonstrates how to create a web log tracker by loading, parsing, and manipulating XML data. You can find the sample source file, xml_blogTracker.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\XML_BlogTracker. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ XML_BlogTracker.

XML language picker

This sample demonstrates how to use XML and nested arrays to choose strings of different languages to populate text fields. You can find the sample source file, xml_languagePicker.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\XML_LanguagePicker. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ XML_LanguagePicker.

XML menu

This sample demonstrates how to create a dynamic menu with XML data. The sample calls the ActionScript XmlMenu() constructor and passes it two parameters: the path to the XML menu file and a reference to the current timeline. The rest of the functionality resides in a custom class file, XmlMenu.as. You can find the sample source file, xmlmenu.fla, in the Samples folder on your hard disk.
On Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\XML_Menu. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/ XML_Menu.

CHAPTER 8

Data Integration
Several data integration samples are provided when you install Macromedia Flash 8. This chapter contains a brief overview of each sample. If you installed Flash Basic 8, you can view and explore these samples. However, you can reconstruct the samples only if you installed Flash Professional 8. This chapter contains the following sections:
News reader. 35 WebServiceConnector component. 36 Data integration XML sample. 36 Flash and PHP integration. 37

News reader

This sample provides an interface for reading the latest news on Macromedia DevNet at www.macromedia.com/devnet. The addition of the data-binding user interface in Macromedia Flash Professional 8 allows you to build interfaces that connect to, retrieve, and display remote data without writing any code. The new components have built-in data awareness, allowing several possible scenarios with web services, XML documents, and more. Explore this sample to see how these components are connected to a Rich Site Summary (RSS) feed on www.macromedia.com.
You can find the sample source file, DevNetNews.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\DataIntegration\NewsReader. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/DataIntegration/ NewsReader.
WebServiceConnector component
This sample demonstrates how to use the WebServiceConnector component. You can find the sample source file, tips.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\DataIntegration\MacromediaTips. On the Macintosh, browse to Macintosh HD/Applications/ Macromedia Flash 8/Samples and Tutorials/Samples/DataIntegration/ MacromediaTips.

 

Tags

3 MP ASF2750 DVD-S559 Projectors L-758DR Depth ER-A610 Asko 1353 SV-DVD55 SD110U SA2940 1000ZXL AB230 MD 8828 MXD-D3 UT10532 Cuep2-M FE-220 Motorola A630 Er-a420 TX-SE550 LDA-531 MX5100VR-00 Voice CN System Roadrunner 24AP SAL-1680Z Cinema-U3000hybrid TK20 FM Pixon W710I NWZ-E345RED AA8-duramax WD-10151TP CDP-391 Geko 301 Studio Plus BC246T CMT-CQ1 CPI 1575 BH-904 AX-5103 Mastercontrol LTH T300 1050 FAX 402 S RM-VD1 Dcs-525 Automatic PT-L730NTE 42PX3RV-ZA DM6 KIT ICF-CD543RM S807D Recorder ECM-MS907 GC-154SQW Syndicate NV-HS870 CD1401B 53 Abit KT7A 212IPC Huawei E960 TME-M740BT C8906 Mc2408M Review DS-114 Sensor 500 Taurus-1999 LE46A676a1W Abit KT7 VLA424BD 952XD Quatro SC-EH750 Euromac S42 57700 GX-450 TL-WN650G ABT35-USB 170S7FB AL-350 Aurora 450 VGN-Z21xn B WM-EX570 HT-SR800 System Masterchef BH-108 Asus A4 DMR-HS1 DSP-E800 KDC-5027 GCE-8400B - Kx61 DVP3015K Scattergories SRC2496 DCR-DVD105 X-750

 

manuel d'instructions, Guide de l'utilisateur | Manual de instrucciones, Instrucciones de uso | Bedienungsanleitung, Bedienungsanleitung | Manual de Instruções, guia do usuário | инструкция | návod na použitie, Užívateľská príručka, návod k použití | bruksanvisningen | instrukcja, podręcznik użytkownika | kullanım kılavuzu, Kullanım | kézikönyv, használati útmutató | manuale di istruzioni, istruzioni d'uso | handleiding, gebruikershandleiding

 

Sitemap

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101