SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 1932 | Next

Joseph W. Lowery

"Dreamweaver CS3 Bible"

The action chosen must be located in the Dreamweaver
9\Configuration\Behaviors\Actions subfolder. For example, code to call the Play Sound behavior might look
like this:
var goPS = dreamweaver.popupAction(???Play Sound.htm???,???MM_controlSound(,,)???);
To call an action in a subfolder of the Actions folder, specify the path. For example, if you want
to call one of the standard actions under the Set Text submenu, such as Set Text of Layer??”
these actions reside in the Actions\Set Text subfolder??”it??™s necessary to state the action name as Set
Text\Set Text of Layer.
The general function call can be found near the end of the applyBehavior() function, where the return
value is specified, or as the behaviorFunction() return value. The popupAction() function returns
the completed function call, including whatever parameters are selected by the user. In the previous example,
if the user had chosen ???Play??? and selected ???brazil.mid??? as the file, the result (goPS) would be
similar to the following:
???MM_controlSound(???play??™,document.CS911946210190.??™brazil.mid??™)???;
The second argument is a unique name generated by Dreamweaver as part of the function. NOTE NOTE
TIP TIP
CAUTION CAUTION
NOTE NOTE
BC 49
Creating a Behavior
Everything is written into the user??™s page, except the event handler and its corresponding function call, both
of which are handled by the calling object, command, or Property inspector.


Pages:
1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944