Macromedia dreamweaver 8-extending dreamweaver 사용자 설명서

다운로드
페이지 504
124
User Interfaces for Extensions
You might want to keep a text box and a color picker synchronized. The following example 
creates a text box that synchronizes the color of the text box with the color of the color picker:
<input type = "mmcolorbutton" name="fgcolorPicker" 
onChange="document.fgcolorText.value=this.value">
<input type = "test" name="fgcolorText" 
onBlur="document.fgColorPicker.value=this.value">
In this example, when the user changes the value of the text box and then tabs or clicks 
elsewhere, the color picker updates to show the color that is specified in the text box. 
Whenever the user selects a new color with the color picker, the text box updates to show the 
hex value for that color.
Adding Flash content to Dreamweaver
Flash content (SWF files) can display in the Dreamweaver interface either as part of an object 
or command. This Flash support is especially useful if you build extensions that use Flash 
forms, animations, ActionScript or other Flash content.
Basically, you leverage the ability for Dreamweaver objects and commands to display dialogs 
(see 
 for more information about building 
objects and 
 for information about commands) using 
the 
form
 tag with the 
object
 tag to embed your Flash content in a Dreamweaver dialog box.
A simple Flash dialog box example
In this example, you use Dreamweaver to create a new command that displays a SWF file 
called myFlash.swf when the user clicks the command in the Commands menu. For specific 
information about creating commands before trying this example, see the information about 
commands in Extending Dreamweaver.
NO
TE
This example assumes you already have a SWF file called myFlash.swf in the 
Configuration/Commands folder of your Dreamweaver application installation folder. To 
test this with your own SWF file, save the SWF file to the application Commands folder, 
and substitute your filename in all instances of myFlash.swf.