Learning ActionScript 2.0 in Adobe Flash |
|
|
|
| Working with Text and Strings > Using HTML-formatted text > About embedding images, SWF files, and movie clips in text fields > Embedding movie clip symbols | |||
To embed a movie clip symbol in a text field, you specify the symbol's linkage identifier for the <img> tag's src attribute. (For information on defining a linkage identifier, see Attaching a movie clip symbol to the Stage.)
For example, the following code inserts a movie clip symbol with the linkage identifier symbol_ID into a dynamic text field with the instance name textField_txt.
To embed a movie clip into a text field:
this.createTextField("textField_txt", 10, 0, 0, 300, 200);
textField_txt.html = true;
textField_txt.htmlText = "<p>Here's a movie clip symbol:<img src='img_id'>";
For an embedded movie clip to be displayed properly and completely, the registration point for its symbol should be at point (0,0).
|
|
|
|