Abbreviation DW) offerred a kind to call under Dreamweaver(" Behavior " (behavior) mechanism, help your compose advocate the alternant action in the page. Behavior, have a series of actions in the webpage namely, what realize user and page through these movements is alternant. Use the act of DW, you do not need to write a code, can achieve rich dynamic page result, those who obtain user and page is alternant.
An act is constituted by incident and movement. Incident is the result that the movement is sparked, and the movement is the has written beforehand JavaScript code that is used at finishing special job, such as opens window of a browser, broadcast sound to wait.
When using act to element of a page, you can appoint movement and the incident that spark. Had provided a few affirmatory actions in DW, you can apply them in page element.
One, inside a few main action of buy
1. Call JavaScript(Call JavaScript)
When this behavior allows your setting to be sparked when certain incident, call corresponding JavaScript script, in order to realize corresponding movement. When this behavior is installed, you can input JavaScript script directly or function.
2. Change attribute (Change Property)
This behavior allows you to change object property dynamicly, for instance the setting color of the size of image, layer is waited a moment. Those who need an attention is, the setting of this behavior depends on the support of the browser.
3. Check a browser (Check Brower)
The supportive ability of different browser has certain difference, use this act, we can check the version of the browser, turn in order to jump to different page.
4. Examine plug-in unit (Check Plugin)
The page that occasionally we make needs the support of certain plug-in unit, use the webpage that Flash makes for instance, be necessary to undertake checking to the plug-in unit of user browser so, saw it whether install designation plug-in unit. This behavior can come true this.
5. Control Shockwave or Flash(Control Shockwave Or Flash)
Shockwave and Flash are at present the webpage makes the target that often inserts, this behavior is used at controlling these targets namely. Broadcast with what it can control animation, stop, return, still can control jump directly turn to the a fewth frame.
6. Mobile and statified (Drag Layer)
"Mobile and statified " behavior can come true to move in the storied on the page, it is statified even the shift of content.
7. Jump turn to URL(Go To URL)
You can make the frame window that current browser window perhaps appoints be record in designation page.
8. Jump turn the table is simple (Jump Menu)
"Jump turn the table is simple " if be used at the editor to jump,give priority to all right turn the table is simple.
9. Shoot an information dialog box (Popup Message)
If you want to show an information dialog box on the page, perhaps give an user information of a clew, can use this act.
2, simple example
We are with dynamic picture below exemple, introduce what one be issued to lower levels is to use. Above all the picture that you want to make photograph of two pieces of size be the same as 1 with the picture 2. Concrete step is below.
1. Open DW to found a page, the graph is inserted in this page 1.
2. In DW editor window chooses good plan 1.
3. In menu " Windows " in choice " Behaviors " perhaps open Behavior face plate by F8. Attention, in Events For in playing menu giving form, "3.0 And Later Browsers " should be chosen.
4. By " + " date pushbutton adds a new act -- " Swap Image " (commutation picture) , can play at this moment piece " Swap Image " dialog box. In picture list, you will see the list of all pictures in the page, pitch on the picture that you should alternate 1, this is primitive picture, move when mouse finger above it when, the picture that it will be shown by a piece of Gao Liang is replaced 2 times.
5. Click Browse pushbutton, had chosen you to want to replace, pass " OnMouseOver " incident, the picture of the choice 2 replaced former picture 1.
6. The preliminary adjustments that chooses acquiescent setting to have a picture is used and store.
"Preload Images " when options expresses to download in whole page, put the picture that has alternating into the cache of the browser, when first time of the person that browse moves mouse finger to Our Story picture, he does not feel to Gao Liang the go outing of the picture has what delay almost. "Restore Images OnMouseOut " options expresses to become " OnMouseOut " (the mouse removeds) when incident happening, automatically the picture restorable.
7. After the setting is finished, click " OK " pushbutton is shut " Swap Image " dialog box, apply a moment ago setting.
At this moment the episode that Behavior face plate included you to a moment ago was installed for picture place and movement. "OnMouseOver " there is by incident " Swap Image " behavioral mark, it is above it still have " OnMouseOut " incident and corresponding " Swap Image Restore " movement (this Behavior is accept in Swap Image dialog box when you default option and the) that is defined.
8. Shut Behavior face plate. Preview a page by F12. Move mouse finger to the picture respectively when you 1 on, your meeting discovery has been replaced 2 times by the picture.
The example of above is example of a of the Behavior of DW simple application only. Utility still has a lot of, do not make here explained one by one. In addition, DW still allows an user to use patulous act, the homepage that is in Macromedia company can download

No comments:
Post a Comment