Flash Course

Theoretically, you can cut or copy graphic elements from any other program you have open, and paste them into Flash.
For example, an image opened in Microsoft Paint, you can copy it with "Ctrl+C". Then, in Flash, you can choose Edit -> Paste in Center to transfer the image from Microsoft Paint to your Stage, and then edit it using Flash.


Another way to add images into a Flash document (formats: ai, bmp, gif, jpg, png, psd) is with the Import option.
- Click File -> Import, then choose Import to Stage (or Import to Library).
The "Import to Stage" will add the image in the Library and places a copy on the Stage, while the "Import to Library" will add the image in the Library only.
When you import or paste an image onto the stage, Flash stores a copy in the Library panel.

Importing image

Importing image

If the graphics files have sequential names like img_02.jpg, img_03.jpg, img_04.jpg, and so on, Flash can import the entire series (each picture in a Frame).
In this case, Flash recognises the sequential names and display a dialog box to asks if you want to import the entire series.
Importing sequential files


Importing ".ai" graphics (made with Adobe Illustrator) and ".psd" files (made with Photoshop) fits well with Adobe Flash CS5, becouse these programs use layers much like the layers in Flash. When you import Photoshop and Illustrator files in Flash, you can choose which layers you want to import, and the program converts them into Flash layers.
In the Preferences window (which is opened from Edit -> Preferences) you can set various options (to PSD File Importer and AI File Importer categories) to customize the way Adobe Flash imports Photoshop and Illustrator files.

Also, Flash works very well with graphics made in Fireworks. You can retain Fireworks filters, blend modes, and text, and continue to modify them using Flash. When you import Fireworks files into Flash, PNG file graphic properties remain intact.

- You can drag and use from the Library on the stage multiple copies of an image.
- If you delete an image on the Stage, it still remains in the Library, but when you delete an image from Library, all of its copies will be deleted.
- Adding graphic files in Flash it increments considerably the size of the Flash file (the SWF presentation).

Modifying imported images

The simplest changes that can be applied to an imported image is resizing and rotation, with the "Free Transform tool".
Drawings made ​​directly in Flash, with "Drawing Object" mode, use vector graphics. If Adobe Flash recognizes the imported image as a "vector image" (such as those made ​​with Adobe Illustrator) with distinct lines and shapes, it can still be edited with the Flash's tools.
If the image is a "Bitmap" type (jpg, gif, bmp), Flash recognizes it as a "spot" of undefined pixels. Adobe Flash has several options to work with "bitmaps", it can convert the image into a "shape", divide it in vector graphics or convert it into a Symbols.

1. Convert a bitmap into a shape

To convert a bitmap into a shape, select the image on the stage, then click Modify -> Break Apart. The image becomes a selected fill, and you can edit it with the Flash's drawing tools.

2. Turning bitmaps into Vector Shapes

Flash provides a procedure to convert bitmaps into vector art. Select the image on the stage, then click Modify -> Bitmap -> Trace Bitmap. Flash will open a window with several parameters in it.
Trace Bitmap
The results can be unpredictable in quality and have unwieldy file sizes if the bitmaps are very complex.
Adobe recommends using the following settings in the Trace Bitmap dialog box:
      Color Threshold = 10  , Minimum Area = 1 pixel  , Curve Fit = Pixels  , Corner Threshold = Many Corners

3. Convert bitmaps into symbols

You can not modify brightness, contrast, or transparency to an image directly imported, but you can apply these settings to a Symbol.
To convert a bitmap into a symbol, select the image on the stage, then click Modify -> Convert to Symbol.
In the "Convert to Symbol" dialog box, type in a name for the Symbol, choose "Movie Clip" from the dropdown menu, and then click OK.
The image becomes an instances of a Movie Clip symbol, and you can apply to it various Color Effects and Filters from the "Properties panel" (see the Movie Clip Symbols lesson).

Optimise Bitmap Properties

When you import and use images into a Flash presentation, they will increase considerably the file size. An indicated way to try to reduce the file size is to optimise de image properties.
To do this, first you must import the picture into the Library only (from File -> Import -> Import to Library).
Then, in the Library panel, right-click on the picture name, and choose Properties. This will open a "Bitmap Properties" window (like in the image below) with options for compression and optimization.
Bitmap Properties
• If you want to use multiple copies of an image, it's better to drag each one from the image stored in the Library, and not use Copy-Paste. The "Copy-Paste" method increments the file size.

When an image is imported in the Flash document, it is also added in the Color Palette, next to the Gradients, and can be used for stroke and shape colors, like you can see in the image below.
Images in color palette

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
Importing images

Last accessed pages

  1. Making DIV Contents Scroll Horizontally, with multiple Div`s inside (59589)
  2. querySelector and querySelectorAll (30124)
  3. sPBM - Simple PHP Backup Manager (3402)
  4. Vue JS - Transition and Animation (490)
  5. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (141749)

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)