Dreamweaver calls the canAcceptBehavior() function in each Action file to see whether this action is appropriate for the document or the selected element.
If the return value of this function is false, Dreamweaver dims the action in the Actions pop-up menu. For example, the Control Shockwave action is dimmed when the user’s document has no SWF files. If the return value is a list of events, Dreamweaver compares each event with the valid events for the currently selected HTML element and target browser until it finds a match. Dreamweaver populates the Events pop-up menu with the matched event from the canAcceptBehavior() function at the top of the list. If no match exists, the default event for the HTML element (marked in the Event file with an asterisk [*]) becomes the top item. The remaining events in the menu are assembled from the Event file.