Macromedia Director 8.5 is the multimedia authoring application used to create dazzling multimedia-rich DVD-ROMs, CD-ROMs, and Shockwave-enhanced Web experiences.
The most exciting news for the 8.5 release is the under-the-hood Intel 3D technology that enables Shockwave to use high-impact, textured, 3D graphics and models. Since version 6.5, you can import Flash movies (as .SWF files) via the Flash Asset Xtra. With version 8.5, you can take even more control of your .SWF movies in Director. Moreover, the latest versions of the Shockwave plug-in automatically install the Flash Asset Xtra on Web browsers. That means that you can count on Shockwave-enabled visitors being able to view your Flash-Director Shockwave content. But why would you want to use Director in combination with Flash in the first place? We answer that question next.
Benefits and limitations of Flash movies in Director
Flash 5 has been another monumental leap forward for Flash interactivity. With the additional advanced ActionScripting that Flash can now employ, many of the previous Flash-Director scenarios or workarounds are no longer needed. However, if you’re already familiar with Director and Lingo (Director’s scripting language), then you may find integrating .SWF files into Director projects easier than learning advanced scripting with ActionScript in Flash 5. The following list reviews some of the benefits and drawbacks of using Flash movies in Director projects.
Creating Director-specific actions in Flash
You can use Flash .SWF files in any number of ways with Director. If you simply want to use a Flash animation for graphic content within a Director presentation, you can simply use the same .SWF you generated for the Web. Use the Flash Asset Xtra import box (see the more in-depth discussion later in this section) to set the parameters of playback without needing any Lingo. However, if you want Flash actions (in frames or on buttons) to do something in your Director movies, then you need to know how to get Lingo’s attention. The drawback to this type of “dual” interactivity is that you need to plan ahead with both your Flash and Director movies. As with any project, you should outline a storyboard before embarking on a task such as this.
You have three methods to use within the Flash authoring environment, all involving the getURL action. You can assign any of these methods the same way you would with any other Flash interactivity attach these actions to buttons, frames, or ActionScript conditions.
Standard GetURL command
On a Flash Button or frame, open the Actions Panel and assign a getURL action. This is the preferred method of sending information to Director movies because you can deal with the result of the action in Director you do not need to specify what Director does with the string from Flash. When a Button instance is selected and the Actions Panel is in Normal Mode, Flash 5 automatically creates a default on (release) action to contain the getURL action. In the URL setting, create a string to be passed to an event handler in Lingo.A getURL action is assigned to a frame in Flash. The string ProjectOne is entered in the URL text field. This string, in turn, is received by Lingo.
In Director, you need to attach a behavior script to the Flash Sprite so that the getURL action and string can be received by Lingo.The string ProjectOne was assigned to getURL. In Director, we could tell Lingo to go to the frame marker called ProjectOne:
You can enter any word or series of characters (that is, a string) in the URL field. This string is then passed to Lingo.
When the Flash Sprite plays in Director and the getURL action is executed, the ProjectOne value of getURL is passed as the FlashString argument of the Lingo event handler, on getURL. Lingo will direct the playback of the Director movie to the frame marker ProjectOne.
You can also specify an event: handler in the URL field of the getURL action. This method is useful if you would like to describe an event that is repeatedly used in Flash, but needs customized settings with each use. For example, if you want to add a mouse click to go to a different Director frame depending on which button was clicked, you could use the following URL in the getURL action:
In Director, you then write a behavior that would receive the FClick event:
How is this different from the last example? If you want to have several events in one script that perform different Lingo commands, you need to label each one with a separate event, such as:
In the preceding example, we have two defined Flash events, FClickButton01 and FclickButton02, which do different things. If we had used the standard getURL action, we could only pass the string to one Lingo command.
The last getURL method of sending events to Lingo is the most direct method of communicating with Director movies. In the URL field, a lingo: handler is used to specify a Lingo statement. This is the most inflexible method of sending events to Director insofar as you cannot do anything in Director to modify or direct the event. For example, if you added the following code to an on (release), getURL button event in Flash:
Then the Director movie quits (or the Director projector closes) when that button was clicked. With lingo: statements in getURL actions, you do not need to specify any further Lingo in the Director movie, unless you are setting the value of prescripted variable or executing a event described in the Director movie script.
Controlling .SWF files in Director
You can import and use Flash movies (.SWF files) into Director just as you would any other cast member. Director controls Flash movies with the Flash Asset Xtra. This section shows you how to import Flash movies and use them in the Director Score window. You should already be familiar with the Director authoring environment and basic Behavior use.
The Flash Asset Xtra: Importing Flash movies
Since Director 6.5, the Flash Asset Xtra has enabled Flash movies to play within a Director movie. Again, make sure you have Director 8.5 in order to use Flash 5 movies. If you have Director 8.0 or 7.0.2, you’ll need to export your Flash 4 .SWF files from Flash 5. Director 7.0.1 supports Flash 3 or earlier movies. If you have Director 6.5, you need to export your Flash movies as Flash 2 movies.
To import a Flash movie (.SWF file), do the following:
You can import several files at once with the Import command. (The Mac version is shown here.)
The Flash Asset Properties dialog enables you to specify how the Flash movie functions in the Director movie.
If Link is checked, then you can also enable Preload. Preloading will force Director to load (or download) the entire .SWF file before it starts playing the Flash movie. Otherwise, Director will start playing the Flash movie as soon as it starts to stream the Flash cast member. See the sidebar at the end of this section for more information on linked Internet files.
The Direct to Stage option tells Director to give priority to the Flash movie Sprite over all other Sprites currently on the Stage. Although this option may enable Flash movies to playback more smoothly, Director ignores any ink effects applied to the Sprite, and the Flash movie always displays on top of other Sprites.
The Paused option is akin to adding a stop() Flash action to the first frame of the Flash movie you can force Director to display the movie in a paused state. The Loop option enables continuous playback of the Flash movie. If this option is checked, the Flash movie repeats as soon as it reaches the last frame unless the last frame has a stop() Flash action. It continues to repeat while the Flash Sprite is present in the Director Score, or until it is paused by a Lingo command.
Lock-Step plays one Flash movie frame for every Director frame that its Sprite occupies (for example, if the Flash movie occupies four frames of the Director score, then only the first four frames of the animation plays back in Director). Therefore, Lock-Step inherits the frame rate of the Director movie as established in the Tempo setting in the Score. Fixed rate enables you to specify a new frame rate for the Flash movie, independent of the original frame rate specified in Flash 5 (via Modify➪ Movie) or the Director Tempo setting in the Score.
If 50 percent is used for the Scale of a 550 × 400 Flash movie and Exact Fit is chosen in Scale Mode, then the movie displays at 225 × 200 in the original placed Flash Sprite on the Stage. If you resize the Sprite box, then it continues to maintain a 50 percent portion of the Sprite box area. After specifying the settings you wish to use for your Flash movie, you can then place the Flash cast member as a Sprite on to the Director Stage.
Using Director’s Property Inspector
Director 8.0 introduced a new look-and-feel to the authoring environment. In addition to a resizable Stage window, you can change the Cast window to view by list or thumbnail, and you can quickly modify Sprite, Cast Member, and Movie attributes (among others) with the Property Inspector.
The Property Inspector enables you to quickly change all of the Flash Asset Properties for any Flash Cast Member. You can click the More Options button on the Property Inspector to access the traditional Flash Asset Properties dialog, which enables you to change Import (for example, path to remotely or locally linked .SWF files) and Media (Linked and Preload) properties.You cannot preview Flash movies in the Property Inspector.
Director’s new Property Inspector
Flash Movies as Sprites
In Director, any item that is used in a movie becomes part of a Cast, and is referred to as a Cast Member. When a Cast Member is placed on the Stage, it becomes a Sprite. A Sprite is an instance of the Cast Member used in the Score. The relationship between a Flash Symbol and a Symbol instance is similar to the relationship between a Director Cast Member and its Sprite(s).
To place a Flash Cast Member on the Director Stage, simply click and drag its Cast Member icon (or thumbnail) from the Internal Cast window to the Stage or the Score. If you drag a Cast Member to the Stage , it automatically becomes a Sprite on the first Sprite channel. If you drag a Sprite to the Score , it is automatically centered on the Stage.
(A) A Flash Sprite on the Director stage. (B) A Flash Sprite in the Director score.
Although Flash Sprites perform almost the same as other Director Sprites, you should be aware of certain Sprite properties before proceeding with Lingo Behaviors and Flash Sprites. For more information on basic animation features of Director, please consult the Using Director 8 manual that comes with the Director software.
With an ink effect of Background Transparent, the white background of the crosshairsButton Flash Sprite drops out.
Controlling .SWF files with Lingo
Not only can you send events from Flash movies to Director movies, but you can also control Flash movies from Director with Lingo. More than 70 Lingo commands exist that are specific for Flash movie assets in a Director movie. Unfortunately, it is beyond the scope of this book to explore so many different commands. This section provides an overview of the new Lingo commands for Flash movie, and shows you how to alter the size and rotation of Flash Sprites.
Lingo and ActionScript
For a complete listing of Flash-specific Lingo commands that can be used with Flash Cast Members and Sprites, access the Help➪Lingo Dictionary in Director 8.5 and search for Flash. Some of the more powerful Lingo commands are getVariable and setVariable, which give you access to any variables inside a Flash 4 or 5 movie. Make sure that you specify the variable name as a string in Director Lingo (unless it’s also the name of a Lingo variable), as in:
This Lingo code will give the variable currentURL in the globals Movie Clip of the current Sprite (me.spriteNum) the value of http://www.theMakers.com. Therefore, you can use Slashes notation to access nested variables in Movie Clip instances. Similarly, the getFlashProperty and setFlashProperty Lingo commands can use Slashes notation to access Movie Clip or Main Timeline properties:
This Lingo code will retrieve the current X scale of the _root.dog_1 Movie Clip instance and make it the value of a global Director variable named dog_ScaleX. Table below details the Flash Movie Clip and Main Timeline properties that can be retrieved and set by Lingo.
Lingo and actionscript property conversion chart
Macromedia has expanded the Lingo hitTest command (which can be used to detect whether an arbitrary point in the Flash movie is the transparent background area, a normal “fill” area, or a Flash button) to include an #editTest return value to detect Flash 4 and 5 editable text fields. The Lingo hitTest method works much like the hitTest ActionScript method. For more information on Director’s hitTest method, refer to the Help➪Lingo Dictionary. Finally, Director 8.5 adds five new Lingo commands to work with Flash movies:
This Lingo code targets the nestedMovie Movie Clip instance located on the Main Timeline and sets its scale to 200 percent and moves its playhead to frame 2. Then, Director’s Score moves to frame 5.
Changing the size and rotation of Flash Sprites
The previous section listed the properties of internal Flash Movie Clips that can be manipulated with Lingo. You can also control the Flash Sprite properties with Lingo, which will affect everything in the Flash movie. With the crossButton.swf example used earlier, we can rotate and zoom the Flash movie in Director. Because the crossButton Sprite is a Flash button that already plays a 3D rotation sequence, we disable the Flash button by using a Lingo script in the first frame of the score:
The sprite(1) line of code refers to the Sprite occupying the first Sprite channel, which in our example is the crosshairs_button Flash Sprite. Adding the .buttonsEnabled property lets Director know what property we want to change with the Sprite in this case, Flash button activity. Setting this property to false means it is being turned off. Next, add the following behavior script to the Flash Sprite:
This Behavior causes the Flash Sprite to rotate a full 720 degrees two revolutions when the mouse enters the Flash Sprite. Here, the .rotation property is called and manipulated. Notice that when the mouse leaves the Sprite, the rotation is reset to 0.
To change this to a zooming behavior, simply change the script to the following:
For a cool effect, reenable the Flash button by removing the on enterFrame section, containing the sprite(1).buttonsEnabled line, from the frame 1 script. Now, as the Flash movie zooms, the button continues to rotate on a 3D axis. To view the current Flash Sprite properties in Director’s Message window, you can add the following line of Lingo to the Frame Script:
Then, on frame 2, create the following Frame Script:
The showProps() command shows you the current properties of the Flash Sprite and Cast Member, as shown below.
Director’s Message window, displaying the current Flash Sprite properties
Flash Related Interview Questions
|Adv Java Interview Questions||J2EE Interview Questions|
|Adobe Flex 3 Interview Questions||Dreamweaver Interview Questions|
|3D Animation Interview Questions||Adobe Flash CS6 Interview Questions|
|Dreamweaver CS3 Interview Questions||Adobe Flex Interview Questions|
|Adobe Flex Actionscript Interview Questions||Gif Animation Interview Questions|
|Adobe Fireworks Interview Questions|
Understanding The Flash Framework
Exploring The Interface: Panels, Settings, And More
Using Tools For Navigation And Viewing
Working With Selections And The Pen Tool
Working With The Drawing And Painting Tools
Working With Text
Exploring The Timeline
Checking Out The Library: Symbols And Instances
Drawing In Flash
Animating In Flash
Using Bitmaps And Other Media With Flash
Designing Interfaces And Interface Elements
Understanding Sound For Flash
Importing And Editing Sounds In Flash
Optimizing Flash Sound For Export
Understanding Actions And Event Handlers
Navigating Flash Timelines
Controlling Movie Clips
Sharing And Loading Assets
Planning Code Structures
Creating Subroutines And Manipulating Data
Understanding Movie Clips As Complex Objects
Sending Data In And Out Of Flash
Understanding Html And Text Field Functions In Flash
What Is Generator?
Revving Up Generator
Working With Third-party, Server-side Applications
Working With Raster Graphics
Working With Vector Graphics
Working With Audio Applications
Working With 3d Graphics
Working With Quicktime
Working With Realplayer
Creating Full-motion Video With Flash
Creating Cartoon Animation With Flash
Planning Flash Production With Flowcharting Software
Working With Authoring Applications
Publishing Flash Movies
Integrating Flash Content With Html
Using Players, Projectors, And Screensaver Utilities
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.