banner



How To Create An Animated Pattern Through Processing

Getting started with ActionScript

The ActionScript® scripting language lets yous add complex interactivity, playback command, and data display to your application. You can add ActionScript in the authoring environment by using the Deportment console, Script window, or an external editor.

ActionScript follows its own rules of syntax, reserved keywords, and lets yous use variables to store and retrieve data. ActionScript includes a big library of built‑in classes that permit yous create objects to perform many useful tasks. For more information on ActionScript, see the following Assistance titles:

Yous practise not accept to sympathise every ActionScript element to begin scripting. If you have a clear goal, you can start building scripts with unproblematic actions.

ActionScript and JavaScript are both rooted in the ECMA-262 standard, the international standard for the ECMAScript scripting language. For this reason, developers who are familiar with JavaScript can observe ActionScript immediately familiar. For more data most ECMAScript, become to ecma-international.org.

Which version of ActionScript can you lot employ?

Animate includes more than than 1 version of ActionScript to meet the needs of different kinds of developers and playback hardware. ActionScript 3.0 and ii.0 are not compatible with each other.

  • ActionScript iii.0 executes fast. This version requires more familiarity with object-oriented programming concepts than the other ActionScript versions. ActionScript 3.0 is fully compliant with the ECMAScript specification, offers better XML processing, an improved event model, and an improved architecture for working with onscreen elements. FLA files that use ActionScript 3.0 cannot include earlier versions of ActionScript.

  • (Deprecated with Animate just) ActionScript ii.0 is simpler to learn than ActionScript 3.0. Although Flash Player runs compiled ActionScript 2.0 code slower than compiled ActionScript three.0 code, ActionScript ii.0 is still useful for many kinds of projects. ActionScript 2.0 is also useful for the projects that are not computationally intensive. For example, more design-oriented content. ActionScript 2.0 is also based on the ECMAScript specification, but is not fully compliant.

  • (Deprecated with Animate) ActionScript i.0 is the simplest form of ActionScript, and is even so used by some versions of the Adobe Flash Calorie-free Player. ActionScript 1.0 and 2.0 can coexist in the same FLA file.

  • (Deprecated with Breathing) Flash Calorie-free 2.x ActionScript is a subset of ActionScript ii.0 supported past Flash Calorie-free 2.x on mobile phones and devices.

  • (Deprecated with Animate) Wink Lite 1.ten ActionScript is a subset of ActionScript 1.0 supported by Flash Calorie-free i.x on mobile phones and devices.

Using the ActionScript documentation

Due to multiple versions of ActionScript (2.0 and 3.0), and multiple ways of incorporating it into your FLA files, there are different ways to learn ActionScript.

You tin notice description virtually the graphical user interface for working with ActionScript. This interface includes the Deportment console, Script window, Script Assist way, Behaviors panel, Output panel, and Compiler Errors console. These topics use to all versions of ActionScript.

Other ActionScript documentation from Adobe guides you to learn about the private versions of ActionScript.

Ways of working with ActionScript

There are several means to work with ActionScript.

  • (Deprecated with Animate) Script Assist mode lets you add ActionScript to your FLA file without writing the code yourself. Y'all select actions, and the software presents you with a user-interface for entering the parameters required for each one. Learn a piddling about what functions to use to attain specific tasks, but yous don't accept to learn syntax. Many designers and not-programmers use this mode.

  • (Deprecated with Animate) Behaviors also let you add code to your file without writing it yourself. Behaviors are prewritten scripts for common tasks. You tin add together a behavior and and so easily configure it in the Behaviors panel. Behaviors are available only for ActionScript 2.0 and earlier.

  • Writing your own ActionScript gives you the greatest flexibility and control over your document. Just, it requires you to become familiar with the ActionScript language and conventions.

  • Components are prebuilt movie clips that enable you to implement circuitous functionality. A component tin can exist a simple user interface control, such equally a check box, or it can be a complicated control, such as a curl pane. You can customize a component's functionality and appearance, and you can download components created by other developers. Most components crave you to write some ActionScript code of your own to trigger or control a component. For more than information, run across Using ActionScript 3.0 Components.

When y'all write ActionScript code in the authoring environment, you lot utilise the Actions console or Script window. The Actions panel and Script window comprise a full-featured code editor that includes code hinting and coloring, code formatting, and syntax highlighting features. It too contains debugging, line numbers, give-and-take wrapping, and support for Unicode.

  • Utilise the Deportment panel to write scripts that are part of your Animate document (that is, scripts that are embedded in the FLA file). The Deportment panel provides features such as the Actions toolbox, which gives you quick access to the core ActionScript language elements. You get prompts for the elements that require to create scripts.

  • Use the Script window if you lot desire to write external scripts—that is, scripts or classes that are stored in external files. (You can likewise use a text editor to create an external AS file.) The Script window includes code-assistance features such equally code hinting and coloring, syntax checking, and auto-formatting.

More recommended customs content

The following articles and tutorials provide more detailed information about working with ActionScript:

Overview of the Output panel

When you execute any doc type, the Output panel displays information or warning related to operations such as document conversions and publish. To display this information, add trace() statements to your code or employ the List Objects and Listing Variables commands.

If yous utilise the trace() statement in your scripts, you lot tin can ship specific information to the Output console when the SWF file runs. It includes notes virtually the status of the SWF file condition or the value of an expression.

The Output panel consists of the following menu items:

  • Copy: Copies all the contents of the Output panel to the clipboard of computer. To re-create a selected portion of the output, select the surface area you want to copy and then select Copy.
  • Clear: Clears the content of the output panel.
  • Prove Output: Displays the content of the output console.
  • Lock: Locks the console. You lot can simply resize the panel but you cannot move or elevate the panel.
  • Help: Loadsthe online Help for the output panel.
  • Close: Closes the output panel.
  • Close Group: Closes the whole console grouping. Yous tin simultaneously dock multiple panels such equally timeline, output panel, and compiler errors console.

To brandish or hide the output console, select Window > Output or press F2.

Deportment panel

Looking for the Language Reference?

To observe reference documentation for a specific ActionScript language element, do one of the following:

  • Open up the ActionScript 3.0 Language Reference, and search for the linguistic communication element.

  • Type the language element in the Actions panel, select it, then press F1 (Press F1 immediately).

Learning ActionScript

To learn about writing ActionScript, use these resources:

 ActionScript 3.0 and 2.0 are non uniform with each other. Choose only one version for each FLA file yous create.

Overview of the Actions panel

To create scripts embedded in a FLA file, enter ActionScript directly into the Deportment panel (Window > Actions or printing F9).

The Deportment panel consists of two panes:

Script pane

Lets yous type ActionScript code, which is associated with the currently selected frame.

Script navigator

Lists the scripts in your Breathing document, and lets you move apace between them. To view the script in the Script pane, click an item in the Script navigator.

The Deportment console lets you admission the code-assistance features that simplify and streamline coding in ActionScript. You can add non-frame specific global and third-party scripts that can be applied to the whole animation from within Animate. For more information, run across Adding One thousandlobal and Third-party scripts section in this page.

  • Run Script: Runs the script
  • Pin Script: Pins the script to the pivot tabs of individual scripts in the Script pane and motion them accordingly. This characteristic is useful if y'all have non organized the code within your FLA file into one central location. Or, it is useful if you are using multiple scripts. You can pivot a script to retain the open location of the code in the Deportment panel and toggle between the diverse open scripts. This feature can exist useful when debugging.
  • Insert Instance Path and Name: Helps yous prepare an absolute or relative target path for an activity in the script.
  • Observe: It finds and replaces text in your script.
  • Format Lawmaking: Helps to format the code.
  • Code Snippets: Opens the Code Snippets panel that displays sample code snippets.
  • Add using sorcerer: Click this button to add actions using an easy-to-employ wizard without having to write code.
  • Help:Displays reference information for the ActionScript element that is selected in the Script pane. For example, if you click an import statement and then click Assist, the reference information for import appears in the Assistance panel.

Using actions code sorcerer

You lot tin add interactivity to HTML5 compositions with the Add using wizard options in Deportment panel. Add using sorcerer is a simplified user interface to add code to your compositions.

  1. Create an HTML5 sail certificate and clickWindow > Actions.

  2. ClickAdd using wizard in Actions console as shown in the following screenshot.

    Deportment console with Add using wizard button
  3. Select an action for which y'all want to create code using the code sorcerer.

    A sample screenshot displaying action lawmaking wizard options for actions

    In the above screenshot,Get frame number action is selected and the corresponding code has been updated in activeness window.

    Based on the activity type you select, you can also cull the corresponding object for which you want to apply the action. You tin can search for specific objects on stage if the object has an case name. Also, you can use the action on the current selection.

    List of objects on which to utilize action
  4. Click Next to choose a triggering event. A ready of trigger events are listed in the window based on your action type and object type selection in previous steps.

    List of triggering events
  5. Choose an appropriate trigger consequence followed by its respective triggering objects, if any, and clickCease and add together button.

Y'all can choose the Current Selection option from the carte du jour when you select an object in the phase and run the deportment code wizard. You can also choose the timeline and components deportment for the code.

Enhance the interactivity of an Blitheness

Interactivity is an essential part of an animation that boosts the visual experience of the audience. Desire to learn how to introduce actions to the video without any codes? Watch the tutorial at the finish of this instance and follow these steps.

  1. In theTimeline, select the action clip.

  2. Click Add together using wizard in Actions pane.

  3. In Current Frame, select the following options:

    • Select an action: SelectPlay.
    • Object on which to apply the action : Select the required object.

How to add interactivity to your animations

Watch the video to learn about more than actions like play, motility vertically, and position the object.

Using script window

The Script window lets you lot create external script files that you import into your application. These scripts can be ActionScript or Animate JavaScript files.

You can too add Global and Third-party scripts in HTML5 canvass documents. For more than information, see Adding Global and Third-political party scripts department in Create and publish HTML5 Sheet documents in Animate

If y'all have more than than one external file open up, filenames are displayed on tabs across the top of the Script window.

In the Script window, you can utilise PinScript, find and supercede, syntax coloring, format lawmaking, code hinting and commenting, and lawmaking collapse features. You tin can besides use debug options (ActionScript files merely), and word wrap. The Script window also lets yous brandish line numbers and hidden characters.

Create an external file in the Script window

  1. Cull an intent of your choice from the tabs at the top of the screen such every bit Grapheme Blitheness, Social, Game, Education, Ads, Web, and Advanced. Select the type of external file you desire to create (ActionScript file or Animate JavaScript file).

Edit an existing file in the Script window

  • To open an existing script, select File > Open, and then open up an existing AS file.

  • To edit a script that is already open, click the document tab that shows the script'due south proper noun.

The Actions console permit you admission the code-assistance features that simplify and streamline coding in ActionScript.

Find

Finds and replaces text in your script.

Insert Target Path

(Actions panel only) Helps you set an absolute or relative target path for an action in the script.

Assist

Displays reference data for the ActionScript element that is selected in the Script pane. For instance, if yous click an import statement and so click Help, the reference information for import appears in the Aid console.

Code Snippets

Opens the Code Snippets panel that displays sample code snippets.

Add using sorcerer

Helps you to add lawmaking for deportment using an interface without having to write code.

Accessing context-sensitive Help from the Actions panel

  1. To select an item for reference, do any of the following:

    • Select an ActionScript term in the Actions panel toolbox pane (on the left side of the Actions panel).

    • Select an ActionScript term in the Actions panel in the Script pane.

    • Place the insertion signal before an ActionScript term in the Actions panel in the Script pane.

  2. To open the Aid panel reference page for the selected particular, do one of the post-obit:

    • Press F1.

    • Right-click the item and select View Aid.

    • Click Help above the Script pane.

Ready ActionScript preferences

Whether y'all edit code in the Actions panel or the Script window, you tin can set and modify a unmarried set of preferences.

  1. Select Edit > Preferences (Windows) or Animate > Preferences (Macintosh), and then click Code Editor in the Category list.

  2. Set any of these preferences:

    Automatic Indentation

    When automatic indentation is turned on, the text you blazon after an opening parenthesis "(" is automatically indented to the Tab Size setting. This behavior is also applicable when yous use opening curly bracket "{".

    Tab Size

    Specifies the number of characters a new line is indented.

    Code Hints

    Enables lawmaking hinting in the Script pane.

    Delay

    Specifies the delay (in seconds) earlier code hints are displayed. The option is deprecated with Animate.

    Font

    Specifies the font used for your script.

    Open/Import

    Specifies the character encoding used when you open or import ActionScript files.

    Salvage/Export

    Specifies the graphic symbol encoding used when you save or export ActionScript files.

    Reload Modified Files

    Specifies what happens when a script file is modified, moved, or deleted. Select Always, Never, or Prompt.

    Always

    No warning is displayed, and the file is automatically reloaded.

    Never

    No warning is displayed, and the file remains in the current state.

    Prompt

    (Default) A warning is displayed, and yous can choose whether to reload the file.

    When you build applications with external scripts, this preference enables you to avoid overwriting a script. Or avoid publishing the application with older versions of scripts. The warnings let you automatically close a script and reopen the newer, modified version.

    Syntax Colors

    Specifies code coloring in your scripts.

    ActionScript 3.0 Settings

    These buttons open the ActionScript Settings dialog boxes, where y'all tin set source path, library path, and external library path for ActionScript 3.0.

Source: https://helpx.adobe.com/animate/using/actionscript.html

Posted by: vasquezsubmis.blogspot.com

0 Response to "How To Create An Animated Pattern Through Processing"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel