Using Behaviours:
Behaviors allow the user to interact with your web page, to change
the web page in various ways or to cause certain tasks to be performed.
- A Behavior:
- A combination of an Event with an Action triggered by that event.
- Behaviors Panel:
- Allows you to add behaviors to a page by specifying an Action
and then specifying the Event that triggers that action.
- Events:
- Messages generated by browsers indicating that a visitor has
done something.
- Action:
- Pre-written JavaScript code that performs a specific task, such
as opening a browser window, showing or hiding a layer, playing
a sound or stopping a Shockwave movie.
- DW4 has several Actions to access and use in your development,
which can be accessed through the Behaviors Panel.
There are many Behaviors and once you understand JavaScript, you will
be able to write your own Behaviors and implement them.
The following are a few examples of Behaviors:
Open
Browser ( <a href="class10_open_browser.htm"
onclick="NewWindow(this.href,'browserwindow','320','161','no','center');return
false" onfocus="this.blur()"><b>Open Browser</b></a>)
- Select Text
to become the link to open the a New Browser Window.
- Type in the Link field on the Properties Inspector, the statement:
javascript:;
- This will allow Text to become a link with a behavior attached.
- When using an image/rollover you do not need to type the statement
as suggested above.
- Window > Behaviors, brings up the Behaviors Panel (it is also
found in the bottom right of the screen, 3rd icon in, the wheel).
- Click the "+" to add a Behavior.
- From the Actions pop-up menu, choose Open Browser Window.
- From there, selected the html page to appear in the New Browser
Window by browsing locally for that page.
- Enter the Width of the New Browser Window.
- Enter the Height of the New Browser Window.
- Select the Attributes as needed.
- Lastly, type a Window Name - without spaces, special characters
or caps (e.g.: window_1)
- OK.
- Test by Previewing in the Browser.
- <a href="javascript:;" onMouseOver="MM_openBrWindow('class1.htm','thisone','width=500,height=400')">Text</a>
Applying sound to a button: |
|
Sound can be attached to an image with Behaviors:
- Place image.
- Select the image.
- Open Behaviors Panel.
- Click "+" to add Behavior.
- Choose Play Sound from the Actions pop-up menu.
- Click Browse to select the sound file, locally.
- OK.
- Test by Previewing in the Browser.
Pop up Messages:
- Image or text, you can create pop up windows that have custom
messages.
- Select the text or image.
- Type in the link field: javascript:;
- In the Behaviors Panel, choose the + sign, select
Popup Message.
-
|
Customizing DW4
DW4 can be customized in many ways, allowing you to work in a manner
that's familiar and comfortable.
- Check Out these possible customizable sectors of DW4:
- For everything from colour schemes to highlighting to site configurations
and browers.
- Add third-party extensions.
- Rearranging the object in the Objects Panel.
- Change the names of Menu Items, add New Commands and remove
existing commands.
- Edit the source formatting profile, controlling the HTML DW4
creates.
- Control/Change how third-party tags appear in the Document Window.
- Create your own commands and floating Panels
- Let's try one:
- Modify the Objects Panel:
- Through Window Explorer (Windows Key > "E")
locate the program files for Macromedia > DW4 > Configuration
> Objects > Character.
- Select the related file(s) for the Object, right mouse click
and Copy.
- Navigate to the Common Category folder and Paste the files
for the object.
- You must restart DW4 for the changes to take effect.
|