Flash Course

Motion Presets are saved Motion Tween animations, that can be reused and applied to a Symbol or text field on the Stage.
These Tweens are stored in a Motion Presets panel, that can be opened from the menu Window -> Motion Presets. This panel comes with two folders: Default Presets and Custom Presets.
In "Default Presets" you can find animations that are included in the Adobe Flash program, and in "Custom Presets" you can save you're own animations.

Motion Presets panel

Motion Presets panel
Here's what the options from this panel do:
- Motion Presets can be used only in ActionScript 3.0 documents
- The animations from the Motion Presets panel can be imported and exported in XML files.

Applying Motion Presets

When an animation from "Motion Presets" is applied to an object, it works as a "Animation Template", that will be transfered/ added to that object. Only Frames, Motion and Path are transfered; keeping the form and colors of the object.
- Only a single preset animation can be applied to an object. If another Motion Preset is added to the same object, it will replace the previous tween.
- The presets with 3D Animation can only be applied to Movie Clip Symbol instances, which is the only object for 3D effects.

The following steps show how to apply and modify a motion preset called small-bounce:

  1. Open a new Flash document and draw a rectangle on the Stage (with "Rectangle Tool").
  2. Convert this rectangle into a Movie Clip Symbol (you can use any other type of Symbol), from Modify -> Convert to Symbol.
  3. Make sure the Movie Clip instance is selected, open the Motion Presets panel (from Window -> Motion Presets).
  4. Double-click on "Default Presets", choose the small-bounce preset and press the button Apply.
      - The motion, frames, and the path of the Preset Animation will be added to the object on the Stage.
  5. Test this animation by pressing the Enter key (or "Ctrl+Enter"); you will see an animation similar to this:
- In the following presentation you can see how to do this example (click the image below).

Using Motion Preset

tutorial_motion_presets_steps
- The FLA file with this example can be downloaded from: small-bounce Motion Presets.

- The animation created with motion preset can be edited, modified like any Motion Tween animation; you can add and delete frames in the Timeline, its path can be modified, color effects can be applied, etc.

Creating Motion Preset

A Motion Preset is created from a Motion Tween animation on the Stage, with the purpose of reusing it anytime with other Symbol and text fields.
Once you have created a Motion Tween animation on the Stage, right-click the animated object (or its frames in the Timeline), and then choose Save as Motion Preset. A dialog box opens where you name the preset, and then click OK. Once that's done, your newly named preset appears in the Custom Presets folder in the Motion Presets panel.
- Your custom preset won't have an animated preview like the ones that come with Flash.

To make it possible to preview the animation saved in Motion Presets, proceed in the following way:
- After the animation was saved in Motion Presets, without doing any changes, click on the menu File -> Export -> Export Movie and export the animation in SWF file, with the same name used to save it in Motion Presets. Then place the SWF file in the folder that stores the Adobe Flash motion presets.
For "Windows 7" and Windows Vista", the folder's path is:
        <Local Disk>/Users\<a_name>\AppData\Local\Adobe\Flash CS5\<en_US>\Configuration\Motion Presets.
In that folder should be a XML file with the same name as the SWF file.

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which tag is used to add lists into <ul> and <ol> elements?
<dt> <dd> <li>
<ul>
 <li>http://coursesweb.net/html/</li>
 <li>http://coursesweb.net/css/</li>
</ul>
Which value of the "display" property creates a block box for the content and ads a bullet marker?
block list-item inline-block
.some_class {
  display: list-item;
}
Which instruction converts a JavaScript object into a JSON string.
JSON.parse() JSON.stringify eval()
var obj = {
 "courses": ["php", "javascript", "ajax"]
};
var jsonstr = JSON.stringify(obj);
alert(jsonstr);    // {"courses":["php","javascript","ajax"]}
Indicate the PHP class used to work with HTML and XML content in PHP.
stdClass PDO DOMDocument
$strhtml = '<body><div id="dv1">CoursesWeb.net</div></body>';
$dochtml = new DOMDocument();
$dochtml->loadHTML($strhtml);
$elm = $dochtml->getElementById("dv1");
echo $elm->nodeValue;    // CoursesWeb.net
Tutorial Motion Presets

Last accessed pages

  1. sPBM - Simple PHP Backup Manager (3402)
  2. Vue JS - Transition and Animation (490)
  3. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (141749)
  4. Node.js Move and Copy file (28420)
  5. MouseEvent - Events for Mouse (2909)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (473)
  2. CSS cursor property - Custom Cursors (79)
  3. The Mastery of Love (70)
  4. PHP-MySQL free course, online tutorials PHP MySQL code (62)
  5. CSS3 2D transforms (46)