Skip to content

code-examples-for-scriptui

Code examples for ScriptUI

The sample code distributed with the Adobe ExtendScript SDK includes code examples that specifically demonstrate different ways of building and populating a ScriptUI dialog.

Building ScriptUI dialogsDescription
SnpCreateDialog.jsxCreates a very simple, modeless dialog (a palette) with OK and Cancel button behavior.
SnpCreateUIAddMethod.jsxShows how to add controls to a dialog using the add method.
SnpCreateUIResourceSpec.jsxShows how to define a resource string that creates the control hierarchy in a dialog.
SnpCreateTreeView.jsxShows how to create a hierarchical list with subitems.
SnpCreateProgressBar.jsxShows how to create, initialize, and update a progress bar.
SnpCreateSlider.jsxShows how to create and handle input from a slider control.
UsingFlashPlayer.jsxShows how to create a Flash® Player, and use it to load a play back a movie defined in an SWF file.
ActionScriptDemo.jsxShows how to communicate between the Adobe application scripting environment and the ActionScript™ scripting environment of the Flash Player.
ColorSelector.jsxShows how to use the graphics objects to change colors in a window.
ColorPicker.jsxA more complex version of the color-selection dialog shows how to use additional graphics objects, including fonts and paths.
SnpAlignElements.jsxShows how to align elements along two dimensions in order to control the relative positions of controls within rows and columns.
SnpCreateDynamicScriptUI.jsxShows how to use automatic layout, switching component layout between “row” and “stack” orientation.
AlertBoxBuilder1.jsxShows a way to use resource specifications. Uses the add() method to build a dialog that collects values from the user, and creates a resource string from those values. Saves the string to a file, then uses it to build a new dialog. See Using resource strings.
AlertBoxBuilder2.jsxShows another way to use a resource specification, building the same user-input dialog itself from a resource string. See Using resource strings.
SnpCustomLayoutManager.jsxShows how to create a customized layout manager. See Custom layout-manager example.