What is Software? | What is Education? | What is Technology? | What is Research? | What is Wi-Fi? | What is Communication? | What is Customer Service?

Free SEO Tutorials & Help

Tutorials:   Adobe Flash   Adobe Photoshop   CorelDRAW   SEO  

Site Map

Website Development | Cable & Broadband Magazine | Solutions for Higher Education | Auction Anything Online

Adobe Flash Help & Tutorials

 Back to Topics

 

How to Work with Screens

Slide presentations and form applications (Flash Professional only)

Document structure and hierarchy (Flash Professional only)

About using preloaders with screen-based documents

Slide screens and form screens (Flash Professional only)

About organizing code for screens

Placing code in the FLA file

Using external ActionScript

Working with other structural elements

Using the Screen Outline pane (Flash Professional only)

About undoing and redoing commands with screens (Flash Professional only)

Using the screens context menu (Flash Professional only)

Creating a new screen-based document (Flash Professional only)

Adding screens to a document (Flash Professional only)

Naming screens (Flash Professional only)

Setting properties and parameters for a screen (Flash Professional only)

Specifying the ActionScript class and registration point of a screen (Flash Professional only)

Setting parameters for a screen (Flash Professional only)

About adding media content to screens (Flash Professional only)

Selecting and moving screens (Flash Professional only)

Creating controls and transitions for screens with behaviors (Flash Professional only)

Adding controls to screens using behaviors (Flash Professional only)

Adding transitions to screens using behaviors (Flash Professional only)

Using Find and Replace with screens (Flash Professional only)

About using the Movie Explorer with screens (Flash Professional only)

About using Timelines with screens (Flash Professional only)

About using ActionScript with screens (Flash Professional only)

Screen instance names, class names, and registration points (Flash Professional only)

About using components with screens (Flash Professional only)

Accessibility in the Flash screens authoring environment (Flash Professional only)

 

Slide presentations and form applications (Flash Professional only)

TOP

You can create screen-based documents of two types. The type of document you select determines the type of default screen in the document.

  • A Flash Slide Presentation uses the slide screen as the default screen type. A slide screen has functionality designed for a sequential presentation.

  • A Flash Form Application uses the form screen as the default screen type. A form screen has functionality designed for a nonlinear, form-based application.

Although each document has a default screen type, you can include both slide screens and form screens in any screen-based document.


 

Document structure and hierarchy (Flash Professional only)

TOP

Each document has a master screen at the top level. In a Flash Slide Presentation, the top-level screen is called Presentation by default. In a Flash Form Application, the top-level screen is called Application by default.

The top-level screen is the container for everything that you add to the document, including other screens. You can place content on the top-level screen. You cannot delete or move the top-level screen.

Screens are similar to nested movie clips in some ways: Child screens inherit the behavior of their parents, and you use target paths in ActionScript to send messages from one screen to another. However, screens do not appear in the library, and you cannot create multiple instances of a screen.

You can add multiple screens to a document, and you can nest screens within other screens, in as many levels as you want. A screen that is inside another screen is the child of that screen. A screen that contains another screen is the parent of that screen. If a screen is nested several layers deep, all the screens above that screen are its ancestors. Screens that are at the same level are sibling screens. All screens nested in another screen are its descendants. A child screen contains all the content of its ancestor screens.

The Screen Outline pane for a Flash Slide Presentation containing screens nested three levels deep.

About using preloaders with screen-based documents

TOP

If you want to include a preloader (a separate SWF file that loads your primary SWF) with your screen-based document, one way to do this is to create the preloader as a separate SWF file (non-screen-based), and load the SWF file for the screen-based document from within the preloader SWF.

You cannot create a preloader within a screen-based document, because all screens in a document are located on the first frame of the root Timeline, so you cannot call or load other frames.

 

Slide screens and form screens (Flash Professional only)

TOP

You can create two types of screens in a document: slide screens and form screens. A Flash Slide Presentation uses the slide screen as the default screen type. A Flash Form Application uses the form screen as the default screen type. However, you can mix slide screens and form screens in any screen-based document to take advantage of the functionality of each type of screen and create more complex structure in a presentation or application.

You can set parameters for slide or form screens in the Property inspector.  You can also use ActionScript to control screens. Form class (Flash Professional only), and Slide class (Flash Professional only), in the Components Language Reference.

Slide screens let you create Flash documents with sequential content, such as a slide show. The default runtime behavior lets users navigate sequentially through slide screens, using the left and right arrow keys. Sequential screens can overlay one another so that the previous screen remains visible when the next slide is viewed. Screens can continue playing after they are hidden. Use slide screens when you want the visibility of each screen to be managed automatically.

Form screens let you create structured form-based applications, such as online registration or e-commerce forms. Form screens are simple containers that you use to structure a form-based application. By default, to create the navigation structure with form screens, you must write ActionScript. Use form screens when you want to manage the visibility of individual screens yourself.

 

About organizing code for screens

TOP

There are three places you can place code in a screen-based application:

  • On the Timeline

  • On screens and symbol instances

  • In an external file

Because code can be placed in many different locations, it complicates matters as to where you should put your code. Therefore, you must consider the type of application you're writing and what it requires in the way of ActionScript. As with behaviors, you should use ActionScript consistently in screen-based applications.

The difference between screens and behaviors is that the ActionScript that behaviors add is much more complex than most of the behaviors available for a regular FLA file. Screens are based on complex ActionScript, so some of the code used for transitions and changing slides might be difficult to write yourself.

You might use either behaviors or ActionScript that attaches directly to screens, combined with either a Timeline or an external ActionScript file. Even if you decentralize your code this way, have code put on screens and an external ActionScript file, you should still avoid attaching code directly to movie clip or button instances that are placed on individual screens. This ActionScript is still hard to locate in a FLA file, debug, and edit.

Even if you attach code directly to a screen, it is more acceptable and easier to use than in regular FLA files for the following reasons:

  • The code that attaches to screens when you use behaviors often doesn't interact with other ActionScript you might write--you can place behaviors there and you might not have to worry about editing the code further, which is ideal.

  • The code placed directly on screens is easy to locate and view the hierarchy of, because of the Screen Outline pane. Therefore, it is easy to quickly locate and select all of the objects that you might have attached ActionScript to.

If you use behaviors placed on screens (or other instances), remember to document the location on Frame 1 of the main Timeline. This is particularly important if you also place ActionScript on the Timeline. The following code is an example of the comment you might want to add to your FLA file:

/*
On Frame 1 of main Timeline.
ActionScript is placed on individual screens and directly on instances in addition to the code on the Timeline (frame 1 of root screen).
...
*/

 

Placing code in the FLA file

TOP

Using behaviors on screens while placing ActionScript on the main Timeline makes a screen-based FLA file less complex and easier to work with than a regular FLA document. Behavior code is sometimes added to instances where it might take a long time to create because of its complexity. The convenience of using behaviors might vastly outweigh any drawbacks if the behaviors you add to a screens document are quite complex to write yourself.

New Flash users frequently like the visual approach of placing ActionScript for a particular screen directly on an object. When you click the screen or a movie clip, you see the code that corresponds to the instance or the name of the function that's called for that instance. This makes navigating an application and associated ActionScript visual. It's also easier to understand the hierarchy of the application while in the authoring environment.

If you decide to attach ActionScript to symbol instances on the Stage and directly on screens, try to place all your ActionScript only in these two places to reduce complexity.

If you place ActionScript on screens and either on the Timeline or in external files, try to place all your ActionScript in only these two of places to reduce complexity.

 

Using external ActionScript

TOP

You can organize your screen-based FLA file by writing external code and not having any code in the document. When you use external ActionScript, try to keep most of it in external AS files to avoid complexity. Placing ActionScript directly on screens is acceptable, but avoid placing ActionScript on instances on the Stage.

You can create a class that extends the Form class. For example, you could write a class called MyForm. In the Property inspector, you would change the class name from mx.screens.Form to MyForm. The MyForm class would look similar to the following code:

class MyForm extends mx.screens.Form {
function MyForm() {
trace("constructor: "+this);
      }
}

 

Working with other structural elements

TOP

A screen-based document, when published, is essentially a single movie clip on the first frame of a Timeline. This movie clip contains a few classes that compile into the SWF file. These classes add additional file size to the published SWF file compared with a nonscreen-based SWF file. The contents load into this first frame by default, which might cause problems in some applications.

You can load content into a screen-based document as separate SWF files onto each screen to reduce the initial loading time. Load content when it is needed, and use runtime shared libraries when possible. This approach reduces what the user needs to download from the server, which reduces the time that the user must wait for content if they do not have to view each different part of the application.

 

Using the Screen Outline pane (Flash Professional only)

TOP

When you work with a screen-based document, the Screen Outline pane at the left of the Document window displays thumbnails of each screen in the current document, in a collapsible tree view. The tree represents the structural hierarchy of the document. Nested screens are indented below the screen that contains them.

When you add a screen to a document, the screen appears in the Screen Outline pane.
You can collapse and expand the tree to hide and show nested screens. You can hide, show, and resize the Screen Outline pane.

By clicking on a screen thumbnail in the Screen Outline pane, you can display the screen on the Stage.

To hide or show the Screen Outline pane:

  • Select Window > Other Panels > Screens.

To expand or collapse the tree:

  • In Windows, click the Plus (+) or Minus (-) button next to a screen to show or hide the screens nested within it.

  • On the Macintosh, click the triangle next to a screen to show or hide the screens nested within it.

To resize the Screen Outline pane:

  • Drag the dividing line between the Screen Outline pane and the Document window.

About undoing and redoing commands with screens (Flash Professional only)

TOP

You can use the Edit > Undo and Edit > Redo menu commands to undo and redo the following actions performed on screens: adding, cutting, copying, pasting, deleting, and hiding a screen. The following actions performed on screens are recorded in the History panel: adding a screen, adding a nested screen, selecting a screen, renaming a screen, and deleting a screen. For information on the Undo and Redo commands and the History panel, see Using the Undo, Redo, and Repeat menu commands.

 

Using the screens context menu (Flash Professional only)

TOP

The screens context menu contains many commands for working with screens. You can insert screens, cut, copy and paste screens, and perform other operations with the context menu commands.

NOTE : Specific context menu commands are documented in sections describing those tasks. For example, to find information on the Insert Screen command, seeAdding screens to a document (Flash Professional only).

To view the context menu for a screen:

Right-click (Windows) or Control-click (Macintosh) a screen thumbnail in the Screen Outline pane.

 

Creating a new screen-based document (Flash Professional only)

TOP

You can create a new screen-based document using one of two screen types:
  • A Flash Slide Presentation uses the slide screen as the default screen type.
  • A Flash Form Application uses the form screen as the default screen type.

When you create a new screen-based document, it contains a top-level container screen and a single screen of the default type. Keep in mind that a screen-based document can be published only Flash Player 6 format or later, with ActionScript 2.0. You cannot save a screen-based document in any earlier Flash Player format.

You can create a new screen-based document from the Start page or from the New Document dialog box. For information on the New Document dialog box, see Creating or opening a document and setting properties.

To create a new screen-based document from the Start page:

  • Select a screen type for your document. Under Get Started, select one of the following from the Open a File options menu:

    Flash Slide Presentation creates a document with the slide screen as the default screen type.

    Flash Form Application creates a document with the form screen as the default screen type.

To create a new screen-based document from the New Document dialog box:

  1. Select File > New.
  2. Click the General tab and select one of the following under Type:

    Flash Slide Presentation creates a document with the slide screen as the default screen type.

    Flash Form Application creates a document with the form screen as the default screen type.

 

Adding screens to a document (Flash Professional only)

TOP

You can add a new screen at the same level as the currently selected screen. The new screen is a sibling screen of the selected screen. You can also add a nested screen one level below the currently selected screen. You can add a screen of the default screen type or select a screen type when you add a screen. You can view all screens in a document in the Screen Outline pane. For more information, see Using the Screen Outline pane (Flash Professional only).

When you add screens to a document, Flash exhibits certain default behaviors:

  • By default, Flash uses the screen type of the document (slide type for a Slide Presentation or form type for a Form Application) for the new screen. You can select to insert a screen of another type, using the Insert Screen Type command in the screens context menu.

  • Flash inserts the first screen you add directly after the top-level screen, one level below it.

  • Flash inserts a new screen after the currently selected screen, at the same level. If the document contains nested screens below the currently selected screen, the new screen is added after the nested screens, at the same level as the selected screen.

  • Flash inserts a new nested screen directly after the currently selected screen, and nested one level down. If the document already contains a nested screen or screens below the currently selected screen, the new screen is inserted after all nested screens already in place, one level below the selected screen.

You can also use a template to add a new screen or a series of screens. Flash Professional 8 includes screen templates in various categories.

To add a screen of the default type at the current screen level:

  1. Select a screen in the Screen Outline pane.

  2. Do one of the following:

    • Press Enter or Return.

    • Click the Insert Screen (+) button at the top of the Screen Outline pane.

    • Select Insert > Screen.

    • Select Insert Screen from the screens context menu.

To add a screen of a specified type at the current screen level:

  1. Select a screen in the Screen Outline pane.

  2. Select Insert Screen Type from the context menu and select a screen type.

To add a nested screen of the default type:

  1. Select a screen in the Screen Outline pane.

  2. Do one of the following:

    • Press Enter or Return.

    • Select Insert > Nested Screen.

    • Select Insert Nested Screen from the screens context menu.

To add a screen or series of screens based on a template:

  1. Select a screen in the Screen Outline pane.

  2. Select Insert Screen Type from the context menu and select Saved Templates.

  3. Select a template category under Category, and then select a template under Templates.

  4. Click OK to close the dialog box and add the template-based screen(s) to your document.

 

Naming screens (Flash Professional only)

TOP

By default, screens are named with their default type, in the order in which they are created: slide1, slide2, form1, form2, and so on. The creation order does not necessarily reflect the order of the screens in the Screen Outline pane. For example, you could create three sibling screens, slide1, slide2, and slide3. If you then create a nested screen directly below slide1, the nested screen is slide4.

You can rename screens, including the top-level screen. Screen names must be unique in a document. For example, you can have only one screen named Quiz_Page in a document.

The default screen name is used as the instance name, which is used in ActionScript to control a screen. If you change the default screen name, the instance name is updated with the new name; likewise, if you change the instance name, the screen name is updated. The linkage identifier for the screen is also identical to the screen name, and it is updated when the screen name or instance is updated.

Instance names must conform to the following requirements:

  • The name must not contain any spaces.

  • The first character must be a letter, underscore (_), or dollar sign ($).

  • Each subsequent character must be a letter, number, underscore, or dollar sign.

  • The instance name must be unique.

To rename a screen:

  • Double-click the screen name in the Screen Outline pane and enter a new name.

 

Setting properties and parameters for a screen (Flash Professional only)

TOP

You use the Property inspector to set properties and parameters for individual screens. On the left side of the Property inspector, you can view the instance name, width, height, and x and y coordinates of a screen:

  • The instance name is a unique name assigned to a screen, used when you target the screen in ActionScript. Each screen is assigned a default instance name, based on its default name in the Screen Outline pane. The instance name and default screen name are also identical to the linkage identifier for the screen. If you update the instance name, the default screen name and the linkage identifier are also updated.

  • Width and height are specified in pixels. The values in the W and H fields are read-only. Width and height are determined by the screen contents. You can use the Auto Snap option to make sure the registration point stays in the same relative position when the screen width and height change. For more information, see Specifying the ActionScript class and registration point of a screen (Flash Professional only).

  • The x and y coordinates of a screen are specified in pixels. You can move a child screen on the Stage by changing its x and y coordinates. You can change the registration point of a screen using the registration point grid. For more information, see Specifying the ActionScript class and registration point of a screen (Flash Professional only).

You can set parameters for slide and form screens, to control screen behavior during playback. For more information, see Setting parameters for a screen (Flash Professional only).
To change the instance name of a screen:

  1. Select a screen in the Screen Outline pane.

  2. Select Window > Properties.

  3. On the left side of the Property inspector, enter a name in the Instance Name text box.

    NOTE : If you update the instance name, the screen name in the Screen Outline pane and the linkage identifier for the screen also update.

To move a child screen on the Stage:

  1. If the Hide Screen context menu option for the child screen is selected (the default setting for slide screens), deselect the option.

  2. Select the screen's parent in the Screen Outline pane, and select the child screen on the Stage.

  3. Select Window > Properties.

  4. In the Property inspector, enter new values for the x and y coordinates, drag the child screen to another location on the Stage, or use the Align panel.

 

Specifying the ActionScript class and registration point of a screen (Flash Professional only)

TOP

You can specify the ActionScript class of the screen and its registration point on the Properties tab of the Property inspector:

  • The ActionScript class specifies what class to which the screen belongs. The class determines what methods and properties are available for the screen. By default, slide screens are assigned to the mx.screens.Slide class, and form screens are assigned to the mx.screens.Form class. You can assign the screen to a different class.

  • The registration point grid indicates the position of the screen registration point in relation to its content. By default, the registration point of a slide screen is in the center and Auto Snap is on. The registration point of a form screen is in the upper left corner and Auto Snap is off by default. You can change the registration point using the grid. You can use the Auto Snap option to keep the registration point in the same position in relation to screen contents, even when you add, remove, or reposition the screen contents.

Remember that the height and width of a screen are determined by its content. Therefore, the center of a screen cannot be the center of the Stage.

NOTE : If you have changed the coordinate grid setting in the Info panel in another Flash document, the coordinate grid for the screen registration point can reflect that change. To check the Info panel coordinate grid setting, open a Flash document (a non-screen-based document) or select something on the Stage that is not a screen, and select Window > Design Panels > Info. To change settings in the Info panel while working in a screen-based document, deselect all screens before you open the panel.

To change the ActionScript class of a screen:

  1. Select a screen in the Screen Outline pane.

  2. Select Window > Properties.

  3. In the Property inspector, click the Properties tab.

  4. Enter a class name in the Class Name text box. For more information on ActionScript classes, see Classes in Learning ActionScript 2.0 in Flash.

To change the registration point of a screen:

  1. Select a screen in the Screen Outline pane.

  2. Select Window > Properties.

  3. Click the Properties tab and click a point in the registration grid.

Clicking a registration point automatically selects in on the Properties tab. When this option is selected, the registration point moves in relation to the screen content, but the screen itself does not move.

 

Setting parameters for a screen (Flash Professional only)

TOP

On the Parameters tab of the Property inspector, you can set parameters to control how the screen appears and behaves during playback. Different parameters are available for slide and form screens.

The following parameters are available only for slide screens:

  • The parameter autoKeyNav determines whether the slide uses default keyboard handling to control navigation to the next or previous slide. When autoKeyNav is set to true, pressing the Right Arrow key or the Spacebar advances to the next slide, and pressing the Left Arrow key moves to the previous slide. When autoKeyNav is set to false, no default keyboard handling takes place. When autoKeyNav is set to inherit (the default setting), the slide inherits its autoKeyNav setting from its parent. If the slide's parent is also set to inherit, the parent's ancestors are examined until one is found with its autoKeyNav parameter set to true or false. If a slide is a root slide, setting autoKeyNav to inherit yields the same result as setting it to true.

    NOTE : This property can be set independently for each slide, and it affects keyboard handling when that slide has focus.

  • The parameter overlayChildren specifies whether child screens overlay one another on the parent screen during playback. When overlayChildren is set to true, child screens overlay one another. For example, suppose you have two children, Child 1 and Child 2, which are bullet points on the parent screen. If the user clicks a Next button and displays Child 1, then clicks Next again and displays Child 2, Child 1 remains visible when Child 2 appears. When overlayChildren is set to false (the default setting), Child 1 is removed from the display when Child 2 appears. This parameter affects only the immediate children of a slide, not nested descendants.

  • The parameter playHidden specifies whether a slide continues to play if it is hidden after being shown. When playHidden is set to true (the default setting), the slide continues to play when the slide is hidden after being shown. When playHidden is set to false, the slide stops playing if it is hidden, and resumes playing at Frame 1 if it is shown again.

There is one parameter that is available only to form screens: The parameter visible indicates whether a screen is visible or hidden at runtime. When visible is set to true, the screen is visible at runtime. When visible is set to false, the screen is hidden. This property does not affect the visibility of the screen in the authoring environment.

The following parameters are available for slide and form screens:

  • The parameter autoload indicates whether the content should load automatically (true), or wait to load until the Loader.load() method is called (false). The default value is true. This parameter is inherited from the Loader component.

  • The parameter contentPath is an absolute or relative URL indicating the file to load when the Loader.load() method is called. A relative path must point to the SWF file loading the content. The URL must be in the same subdomain as the URL where the Flash content currently resides. For use in Flash Player or with the Test Movie command, all SWF files must be stored in the same folder, and the filenames cannot include folder or disk drive specifications. The default value is undefined until the load starts. This parameter is inherited from the Loader component.

To specify parameter settings for a screen:

  1. Select a screen in the Screen Outline pane.

  2. Select Window > Properties.

  3. In the Property inspector, click the Parameters tab.Click the setting for a parameter, and select a setting from the pop-up menu.

  4. Click the setting for a parameter, and select a setting from the pop-up menu.

 

About adding media content to screens (Flash Professional only)

TOP

You add media content to screens the same as you do to a Flash document that does not contain screens. You can add media content to the screen that is currently selected in the Screen Outline pane.

Selecting and moving screens (Flash Professional only)

TOP

When you select an individual screen in the Screen Outline pane, the screen appears in the Document window. You can select multiple contiguous or discontiguous screens in the Screen Outline pane to apply modifications to several screens at once. When you select multiple screens, the contents of the first screen selected appear in the Screen Outline pane.

By default, the contents of a slide screen are not visible when you show the screen's parent in the Document window (the Hide Screen context menu option is selected). You can select to show the contents of a slide screen when its parent appears by deselecting this option. When the Hide Screen context menu option is deselected, you can select the child slide screen on the Stage.

This feature affects display during authoring only, not runtime playback. (The Hide Screen context menu option is deselected for form screens by default. You can turn the option on to hide child form screens in the display during authoring.)

You can cut, copy, paste, and drag screens in the Screen Outline pane to change their position in the document, and you can remove screens from a document.

NOTE : The terms child, parent, and ancestor refer to the hierarchical relationships of nested screens.

To view a screen in the Document window, do one of the following:

  • Click a screen thumbnail in the Screen Outline pane to view that screen.

  • With the Screen Outline pane in focus, use the keyboard keys to navigate to the screen.

  • Select View > Go To and select the screen name from the submenu, or select First, Previous, Next, or Last to navigate through the screens.

  • Click the Edit Screen button at the right side of the edit bar and select the screen name from the pop-up menu.

To select multiple screens in the Screen Outline pane:

  • To select multiple contiguous screens, Shift-click the first and last screen you want to select.

  • To select multiple discontiguous screens, Control-click (Windows) or Command-click (Macintosh) each screen.

To edit an item on a screen:

  • Select the item in the Document window.

To view the contents of a child screen when the parent screen appears:

  • Click Hide Screen in the child screen's context menu to turn off the Hide feature. (Hide Screen is selected for slide screens by default.)

To select a child screen on the Stage:

  1. Make sure the Hide Screen context menu option is deselected. (See the previous procedure.)

  2. Select the parent screen in the Screen Outline pane.

  3. Click in the contents of the child screen on the Stage.

To edit an item on an ancestor screen of the current screen:

  • Double-click the item in the Document window.

    The Smart Clicking feature shows the ancestor screen in the Document window and selects the item for editing.

    NOTE : By default, items on ancestor screens of the current screen are dimmed in the Document window.

To fully render all items on ancestor screens:

  • Select View > Preview Mode > Full.

To cut or copy a screen, do one of the following:

  • Right-click (Windows) or Control-click (Macintosh) the screen, and select Cut or Copy from the context menu.

  • Select Edit > Cut or Edit > Copy.

To paste a screen, do one of the following:

  • After cutting or copying the screen, right-click (Windows) or Control-click (Macintosh) another screen and select Paste from the context menu. The cut or copied screen is pasted after the selected screen.

    To nest the pasted screen within the selected screen, select Paste Nested Screen from the context menu.

  • After cutting or copying the screen, select Edit > Cut or Edit > Copy.

To drag a screen in the Screen Outline pane:

  • Using the mouse, drag the screen to any other position in the Screen Outline pane. Release the mouse button when the screen is in the desired position. To nest a screen within another screen, drag it toward the right side of the Screen Outline pane below the intended parent.

To remove a screen:

  • Do one of the following:

    • Right-click (Windows) or Control-click (Macintosh) the screen, and select Cut or Delete from the context menu.

    • Select the screen, and click the Delete Screen (-) button at the top of the Screen Outline pane.

    • Press Backspace (Windows) or Delete (Macintosh).

 

Creating controls and transitions for screens with behaviors (Flash Professional only)

TOP

You can create controls and transitions for screens using behaviors. Controls enable the flow between screens--for example, you can go to another screen, hide a screen, or show a screen. Transitions create visual animations that play as the Flash document display changes from one screen to another.

Behaviors are built-in ActionScript scripts that you add to an object, such as a screen, to control that object. Behaviors lets you add the power, control, and flexibility of ActionScript coding to your document without having to create the ActionScript code yourself. Behaviors are available for a variety of objects in Flash, including movie clips, text fields, and video and sound files.

 

Adding controls to screens using behaviors (Flash Professional only)

TOP

To add a control to a screen using a behavior, you attach the behavior to a trigger--a button, movie clip, or screen--and target the screen that you want to affect by the behavior. You can select the event that triggers the behavior.

You can add the following behaviors to control slide screens: Go to First Slide, Go to Last Slide, Go to Next Slide, Go to Previous Slide, and Go to Slide (specify slide name).

NOTE : Go to Next Slide and Go to Previous Slide move to screens on the same level, not to parents or children. For an explanation of parents and children, see Document structure and hierarchy (Flash Professional only).

You can add the following behaviors to control slide or form screens: Show a Specified Screen (if the screen has previously been hidden) or Hide a Specified Screen (if the screen has previously been shown).

To add a control behavior:

  1. Select the button, movie clip, or screen to trigger the behavior.
  2. In the Behaviors panel, click the Add (+) button.
  3. Select Screen, and select the desired control behavior from the submenu.
  4. If the behavior requires that you select a target screen, the Select Screen dialog box appears. Select the target screen in the tree control. Click Relative to use a relative target path, or Absolute to use an absolute target path, and click OK. (For information on target paths, see Using absolute and relative target paths.)

    NOTE : Some behaviors select a target screen by default; for example, the Go to First Slide screen automatically targets the first screen. These behaviors do not show the Select Screen dialog box.

  5. In the Event column, click in the row for the new behavior and select an event from the list. This specifies the event that triggers the behavior--for example, a user clicking a button, a movie clip loading, or a screen receiving focus. The list of available events depends on the type of object you use to trigger the behavior.

 

Adding transitions to screens using behaviors (Flash Professional only)

TOP

Screen transition behaviors let you add animated transitions between screens, fade a screen in or out, rotate a screen as it appears or disappears, have a screen fly in from the edge of a document, and create other effects. To add a transition using a behavior, you attach the behavior directly to a screen.

You can select the direction of a transition: In, which plays the animation as the screen first appears in the document; or Out, which plays the animation as the screen disappears from the document. You can also specify the duration in seconds.

Easing options let you modify the transition to achieve different effects. For example, the Bounce easing option makes the screen appear to bounce as the transition completes.
Some transitions have additional parameters that you can modify. Parameters appear in the Transitions dialog box when you select the transition.

Follow these guidelines when adding transitions:

  • For most situations, the In option is recommended.

  • Use the In option when applying a transition that uses the on(reveal) event.

  • Use the Out option when applying a transition that uses the on(hide) event.

  • Do not add an Out transition immediately before an In transition in a presentation.

  • To attach the same transition to all children of a given slide, attach the single transition to the on(revealChild) or on(hideChild) event of the parent, rather than duplicating the transition on all child slides.

To add a transition behavior:

  1. Select the screen to which you want to apply the behavior.

  2. In the Behaviors panel, click the Add (+) button.

  3. Select Screen > Transition from the submenu.

  4. In the Transition dialog box, select a transition from the scroll list.

    An animated preview of the transition plays in the preview window, and a brief description of the transition appears in the description field. The animation changes to reflect options that you select for the transition in the following steps.

  5. For Direction, select In to play the transition as the screen appears in the document, and Out to play the transition as the screen disappears from the document.

  6. For Duration, enter a time in seconds.

  7. For Easing, select an option to define the transition style.

  8. If the transition has additional parameters, select options or enter values for those parameters in the fields provided.

  9. Click OK.

  10. In the Behaviors panel, go to the Event column and click in the row for the new behavior, and select an event from the list. This action specifies the event that triggers the behavior--for example, the mouse pointer moving over the screen.

 

Using Find and Replace with screens (Flash Professional only)

TOP

You can use the Find and Replace feature to find and replace a specified element in a Flash document that uses screens. You can search for a text string, font, color, symbol, sound file, video file, or imported bitmap file.

You can search for elements in the entire document or in the current screen.

To use Find and Replace with a document containing screens:

  1. Select Edit > Find and Replace.

  2. Do one of the following:

    • To search the entire document, select Current Document from the Search In pop-up menu.

    • To search a screen, click in the Screen Outline pane, and select Current Screen from the Search In pop-up menu.

 

About using the Movie Explorer with screens (Flash Professional only)

TOP

You can use the Movie Explorer to view and organize the contents of a document containing screens. The Movie Explorer handles documents that contain screens much as it handles those that do not contain screens, with the following exceptions:

  • The Movie Explorer shows the contents of the current screen (the screen selected in the Screens Outline pane) only.

  • You cannot view scenes in the Movie Explorer because a document with screens cannot contain scenes.

 

About using Timelines with screens (Flash Professional only)

TOP

Each screen has its own Timeline. The Timeline is collapsed by default. You must expand it to work with frames or layers.

You cannot view or modify the main Timeline of a screen-based document.

You can add frames, keyframes, and layers, and manipulate content on a screen's Timeline.

In the Timeline, nested screens work much as nested movie clips do, with some exceptions.

 

About using ActionScript with screens (Flash Professional only)

TOP

You can use ActionScript to control screens in a document. You can insert, remove, rename, or change the order of screens, and perform other operations.

ActionScript uses the screen instance name, class name, and registration point when controlling screens.

Screens and movie clips interact with ActionScript in similar ways, but with some important differences.
 

Screen instance names, class names, and registration points (Flash Professional only)

TOP

The screen name automatically generates the instance name and class name of the screen. You need these identifying labels when you manipulate screens with ActionScript in various ways. You can change a screen's registration point to adjust how the screen behaves. You can work with these features in various ways, as described in the following list:

The instance name is a unique name assigned to a screen, used when you target the screen in ActionScript. You can change the instance name in the Property inspector. The instance name is identical to the screen name in the Screen Outline pane and the linkage identifier for the screen. If you update the instance name, the screen name and the linkage identifier also update. For more information, see Setting properties and parameters for a screen (Flash Professional only).

NOTE : Symbol instances, including movie clips, buttons, and graphics, also have instance names. For more information on symbol instances, see Using Symbols, Instances, and Library Assets.

The class name identifies the ActionScript class to which the screen is assigned. By default, a slide screen is assigned to the mx.screens.Slide class, and a form screen is assigned to the mx.screens.Form class. You can assign the screen to a different class to modify the methods and properties that are available for the screen. For more information on ActionScript classes, see Classes in Learning ActionScript 2.0 in Flash.

The Property inspector indicates the registration point in the x and y coordinate fields and in the registration point grid. For more information, see Setting properties and parameters for a screen (Flash Professional only). You might want to move the registration point for greater control in manipulating screen content. For example, if you want to create a spinning shape in the center of a screen, you can reposition the screen registration point at the center of the screen and rotate the screen around its registration point.

 

About using components with screens (Flash Professional only)

TOP

You can use components with screens to create complex, structured applications in Flash. Components are especially useful with forms, to create structured applications that show data and enable nonlinear user interactivity. For example, you can use forms to populate a container component.

When you use components with screens, you can use the Focus Manager to create custom navigation between components. The Focus Manager specifies the order in which components receive focus when a user presses the Tab key to navigate in an application. For example, you can customize a form application so that a user can press Tab to navigate fields and press Return (Macintosh) or Enter (Windows) to submit the form.

For information on the Focus Manager, see Creating custom focus navigation and FocusManager class in Components Language Reference.

You can also create a tab order using the Accessibility panel. For more information, see Viewing and creating tab order and reading order.\

 

Accessibility in the Flash screens authoring environment (Flash Professional only)

TOP

Accessibility support is available for screen-based documents in the Flash authoring environment. Using keyboard shortcuts rather than the mouse, users can navigate a document and use interface elements, including screens, panels, the Property inspector, dialog boxes, the Stage, and objects on the Stage.

Accessibility support for screen-based documents is similar to support for other documents, with one exception: when keyboard shortcuts are used to navigate panels (Control+Alt+Tab in Windows or Command+Option+Tab on the Macintosh), the Screen Outline pane receives focus the first time the keyboard shortcut is used. (For other documents, the Timeline receives focus first.)

To cycle through individual screens in the Screen Outline pane, you use the arrow keys.

The Screen Outline pane receives focus only the first time you cycle through the panels. That is, if you come to the last panel and press the keyboard shortcut again, the Screen Outline pane is skipped, and the next panel receives focus.

 

Copyright ADOBE - All Rights Reserved Worldwide

 

 

More Topics:

Working with Flash Documents

How to work in Flash WorkSpace

Working with Projects in Flash

Process to Build your First Application in Flash

Using Symbols, Instances and Library Assets in Flash

How to Build Video Player in Flash

How to Work with Color, Strokes and Fills in Flash

How to Create Document in Flash

What is Vector and Bitmap Graphics in Flash

How to Create a Banner in Flash, Part 1

How to Work with Text in Flash

How to Create a Banner in Flash, Part 2

How to Use Imported Artwork in Flash

How to Create a Banner in Flash, Part 3

How to Work with Graphic Objects in Flash

How to Work with Layers in Flash

How to Use Filters and Blends

Working with Graphics in Flash

What is Accessibility Features in Flash

How to Create Motion (Shape Tween & Motion Tween) in Flash

How to Create an Application in Flash

What is Masking in Flash

How to Work with Video in Flash

How to Use Layout Tools in Flash

What are Behaviors in Flash

How to Work with Sound in Flash

How to Create Symbols and Instances in Flash

What is ActionScript in Flash

How to Write ActionScript With Script Assist in Flash

How to Add Button Animation and Navigation in Flash

What is Data Integration in Flash

How to Work with Screens

How to Create a Presentation with Screens

What is Extending Flash

How to Create Multilanguage Text in Flash

How to Create Graphics: Draw in Flash

What is Flash Lite

Ways of Data Integration

How to Create Graphics: Create a Timeline Animation in Flash

Getting Started with Flash Lite in Flash

How to Publish Flash Documents

How to Create Graphics: Making Animations with Easing

Learning Flash Lite 1.X ActionScript in Flash

How to Export Flash Content and Images from Flash

How to Create Graphics: Applying Gradients in Flash

Process of Writing and Editing ActionScript 2.0 in Flash

How to Create Accessible Content in Flash

How to Create Graphics: Apply Graphic Filters and Blends

What is Data and Data Types in Flash

Process of Printing from SWF Files in Flash

Using ActionScript: How to Use Script Assist mode in Flash

Learn Syntax and Language Fundamentals in Flash

How to Create E-learning Content in Flash

Using ActionScript: How to Write Scripts in Flash

Working with Functions and Methods in Flash

Process of Using Templates in Flash

Using ActionScript: Process of Adding Interactivity in Flash

What are Classes in Flash

Control Tag Summary of XML to UI in Flash

Using ActionScript: How to Create a Form with Conditional Logic and Send Data in Flash

What is Inheritance in Flash

What is Data Integration: Overview

Using ActionScript: How to Work with Objects and Classes in Flash

Overview on Interfaces in Flash

What is Data Integration: Using XML for a Timesheet

How to Work with Text and Strings in Flash

How to use Handling Events in Flash

What is Data Integration: Using XUpdate to Update the Timesheet

Learning Animation, Filters and Drawings in Flash

How to Work with Movie Clips in Flash

How to Create Interaction with ActionScript in Flash

How to Work with Images, Sound, and Video in Flash

How to Work with External Data in Flash

What is Security in Flash

How to Debug Applications in Flash

List of Error Messages in Flash

Using Object-Oriented Programming with ActionScript 1.0 in Flash

How to Write Scripts for Earlier Versions of Flash Player in Flash

List of all Keyboard Keys and Key Code Values for using in Flash

Terminology

Introduction to Components in Flash

What are Components in Flash

How to Create an Application with Components

How to Work with Components in Flash

How to Handle Component Events in Flash

How to Customize Components in Flash

How to Create Components in Flash

What is Collection Properties in Flash