• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

htmlText: <img src= from Library?

New Here ,
Feb 23, 2011 Feb 23, 2011

Copy link to clipboard

Copied

Hello Guys

I have a htmlText Field, and I wanna embed a Movieclip from my library into the text.

I've tried everything for about 5 hours, nothing worked, even though the Adobe Help stated that it's possible:

src: Specifies the URL to an image 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, GIF, PNG,     and SWF files) do not show until they are downloaded completely.

So you can stick images from your library in html textFields... the question is how?

Thank you in advance.

Kenji

TOPICS
ActionScript

Views

3.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 24, 2011 Feb 24, 2011

Copy link to clipboard

Copied

*bump* please help me.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 24, 2011 Feb 24, 2011

Copy link to clipboard

Copied


var tf:TextField= new TextField()
    tf.width=700
    tf.height=300
    tf.htmlText=" <img src='me.png'>"

    addChild(tf)

replace me.png with an image you have in the same location as your swf

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 24, 2011 Feb 24, 2011

Copy link to clipboard

Copied

There seems to be a bug that the  <src needs a character before it to display

"_<scr...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 24, 2011 Feb 24, 2011

Copy link to clipboard

Copied

For a symbol just replace me.png with the linkage name Symbol1 or whatever


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 24, 2011 Feb 24, 2011

Copy link to clipboard

Copied

Can you show what you tried already?  I would have said it can't be done, but if the docs are correct (they rarely aren't, but it happens) then you should have been able to use a linkage that you specify for the library object.  Did you specify a linkage?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 24, 2011 Feb 24, 2011

Copy link to clipboard

Copied

Can you show what you tried already?  I would have said it can't be done, but if the docs are correct (they rarely aren't, but it happens) then you should have been able to use a linkage that you specify for the library object.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 24, 2011 Feb 24, 2011

Copy link to clipboard

Copied

you can't specify a linkage id with as3 - use the class:

tf.htmlText="<img src='YourClass' />";

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 25, 2011 Feb 25, 2011

Copy link to clipboard

Copied

Well, I was using the linkage and everything correctly. I found out my fault. I was using a TLF-Textfield which doesn't support the embedding of library images (or does it??)

It works in classic textfields though, but in classic textfields, the textflow is totally broken with images. Instead of inserting it into the textline, it creates a new line, only for the picture. But for my purpose (chat smileys) that's of no use. I need my pictures right in the text line where they have to be...

Like <-- this.

And not like <--- this, as it is with classic textfields.

Does anyone know how to embed library movieclips into a TLF-Text??

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 25, 2011 Feb 25, 2011

Copy link to clipboard

Copied

LATEST

Of Course you can use a linkage ID.   That stands for the idendification of the link, hence where you assign a class.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines