# Images in dynamic textbox

**URL:** https://forum.kirupa.com/t/images-in-dynamic-textbox/38502
**Category:** flash
**Created:** [December 23, 2003, 11:26pm UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502 "2003-12-23T23:26:45Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![CoDe\_ReD](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/code_red/32/336_2.png) [@CoDe\_ReD](https://forum.kirupa.com/u/CoDe_ReD)
#### Post date: [December 23, 2003, 11:26pm UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/1 "2003-12-23T23:26:45Z")

</div>

Is it possible to add a small image using html or something like that to a dynamic textbox (Like litte emoticons)…?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 24, 2003, 2:52am UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/2 "2003-12-24T02:52:54Z")

</div>

nope, but you can load a jpg via loadMovie into a empty movie clip and use some strategic positioning.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 25, 2003, 9:52pm UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/3 "2003-12-25T21:52:58Z")

</div>

see\> help | working with text | working with text overview

\<quote\>ActionScript also provides several ways to format your text at runtime. The TextFormat class lets you set character and paragraph formatting for TextField objects (see Using the TextFormat class). Flash Player also supports a subset of HTML tags that you can use to format text (see Using HTML-formatted text). Flash Player 7 and later supports the \<img\> HTML tag, which lets you embed not just external images, but also external SWF files, as well as movie clips that reside in the library \*see Image tag (\<img\>)).\</quote\>

i’ve got little problem to loadVars in MX2004 so haven’t success yet…

anybody so kind to send his to others?? 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 25, 2003, 10:57pm UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/4 "2003-12-25T22:57:20Z")

</div>

:h:  
[http://www.macromedia.com/support/flash/ts/documents/htmltext.htm](http://www.macromedia.com/support/flash/ts/documents/htmltext.htm)

indo- what kinda of problem are you having?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 25, 2003, 11:20pm UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/5 "2003-12-25T23:20:49Z")

</div>

It’s for flash 5 :h: we are in MX2004 isn’t it??

\<B\>read flashMX2004 \> help | working with text | using HTML-formatted text \</B\>

& ma problem is  
[AS]loadText = new loadVars();  
loadText.load(“news.txt”);  
loadText.onLoad = function() {  
news.html = true;  
news.htmlText = this.content;  
};[/AS]

it works fine in MX & so in MX2004, but I get this output

“ **Warning** Scene=Scene 1, layer=action, frame=1:Line 1: Case-insensitive identifier ‘loadVars’ will obscure built-in object ‘LoadVars’.  
loadText = new loadVars();”

i wonder why?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 25, 2003, 11:28pm UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/6 "2003-12-25T23:28:51Z")

</div>

yea, in MX2k4 you have to use a capital L:  
This topic is ALL over the forums. I even got in a debate with someone about this.

```auto
my_lv = new LoadVars();

```

When you try and post formatting code in the fourms use brackets ‘[]’ instead of angle-backets ‘\<\>’

And, yes it DOES say Flash 5, but if they would have changed the htmlText policy, don’t you think they would have updated the page :h: :beam: Trust me, the only way you can load pics dynamically (with out importing to flash) is to use loadMovie. Trust me. 😉

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 25, 2003, 11:29pm UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/7 "2003-12-25T23:29:33Z")

</div>

I GOT IT!!!

[COLOR=red]loadVars[/COLOR] must typed [COLOR=red]LoadVars[/COLOR] !!

it’s really buggin me!!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 25, 2003, 11:31pm UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/8 "2003-12-25T23:31:18Z")

</div>

yea it pays off to actually READ the warnings

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 25, 2003, 11:35pm UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/9 "2003-12-25T23:35:31Z")

</div>

btw for the Supported HTML tags… this text is copied from the help if u don’t believe me…

**Image tag (\<img\>)**  
The \<img\> tag lets you embed external JPEG files, SWF files, and movie clips inside text fields. Text automatically flows around images you embed in text fields. This tag is supported only in dynamic and input text fields that are multiline and wrap their text.

To create a multiline text field with word wrapping, do one of the following:  
In the Flash authoring environment, select a text field on the Stage and then, in the Property inspector, select Multiline from the Text Type pop-up menu.  
For a text field created at runtime with MovieClip.createTextField(), set the new text field instance’s TextField.multiline and TextField.wordWrap properties to true.  
The \<img\> tag has one required attribute, src, which specifies the path to a JPEG file, a SWF file, or the linkage identifier of a movie clip symbol. All other attributes are optional.

The \<img\> tags supports the following attributes:

src Specifies the URL to a JPEG or SWF file, or the linkage identifier for a movie clip symbol in the library. This attribute is required; all other attributes are optional. External files (JPEG and SWF files) are not displayed until they have downloaded completely.  
Note: Flash Player does not support progressive JPEG files.

id Specifies the name for the movie clip instance (created by Flash Player) that contains the embedded JPEG file, SWF file, or movie clip. This is useful if you want to control the embedded content with ActionScript.  
width The width of the image, SWF file, or movie clip, in pixels.  
height The height of the image, SWF file, or movie clip being inserted, in pixels.  
align Specifies the horizontal alignment of the embedded image within the text field. Valid value are left and right. The default value is left.  
hspace Specifies the amount of horizontal space that surrounds the image where no text will appear. The default value is 8.  
vspace Specifies the amount of vertical space that surrounds the image where no text will appear. The default value is 8.  
For more information and examples of using the \<img\> tag, see Embedding images, SWF files, and movie clips in text fields.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 25, 2003, 11:49pm UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/10 "2003-12-25T23:49:16Z")

</div>

you better save this thread or something,… ok, i’ll admit it, you’re … you’re… ggrrr… [SIZE=1]right[/SIZE]

I’m never wrong, with the execption of this time. … you got lucky 😉

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 25, 2003, 11:55pm UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/11 "2003-12-25T23:55:34Z")

</div>

lol… this forum isn’t about for losing from someone… it’s about winning for everyone 😃

anyone wanna post some fla here?? to clear this…🙂

or maybe write tutorial for this new HTML supported tags…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 27, 2003, 12:16am UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/12 "2003-12-27T00:16:29Z")

</div>

Hey I gave this a go and it worked fine.  
It doesn’t work with .gifs tho.

Make the text box dynamic and ensure that multiline is on. (just like indo said to do).

Then inside your external file throw in \<img src=“myfolder/mypic.jpg”\>

So that is two of us that got it to work, so it must be true 😉

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 27, 2003, 6:09pm UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/13 "2003-12-27T18:09:11Z")

</div>

This has been bothering me. :h: Is there any way to make the image thats loaded to stay in bettwen a bunch of text… instead of always skooding to the side of the text box?

-Aditya

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 28, 2003, 7:44pm UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/14 "2003-12-28T19:44:31Z")

</div>

You could do a three column approach and just have the pics load in the middle column.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 29, 2003, 5:31pm UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/15 "2003-12-29T17:31:12Z")

</div>

I dont mean like middle as in middle aligned… I mean more like

if I have code like this…

```auto

blah blah blah... <img src='image.jpg'> more text...

```

I want to it show up as

blah blah blah… [image will show up here] more text…

I am trying to do this for a chat thing. So the image is bascially an emoticon…

Thanks in advance,  
Aditya

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 31, 2003, 4:22am UTC](https://forum.kirupa.com/t/images-in-dynamic-textbox/38502/16 "2003-12-31T04:22:10Z")

</div>

someone? :h:
