Rajdeep
Rajdeep

Reputation: 85

movieclip in textfield's text

I've a text-field into that I have to add small text which is inside a movieclip. So finally it becomes.

text part1 + movieclip + text Part2

I want text part1 and text part2 to be single textfield. So that when I remove/delete movieclip between them the text can be continuous. Can it be done in flash with Actionscript 3.0??

NOTE : I am not talking about text inside movieclip. I want small movieclip to be fit among textfield. just like the image can be set to be inside text in any Word-processor program.

Upvotes: 1

Views: 1031

Answers (1)

Simon McArdle
Simon McArdle

Reputation: 893

TextField.htmlText and <img src='filename'/> should do the trick though it offers few options as to formatting. Depends on the size of the picture really but used like:

textField.htmlText = "Example text" + <img src='pic.jpg'/> + "example text.";

..will insert the picture in the middle of the string.

Update: This can be used to insert a movie clip in line with a textfield using the movie clips linkage identifier:

textField.htmlText = "Example text" + <img src='myMC'/> + "example text.";

More info (and examples) http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#htmlText Load MovieClip inline in TextField

Upvotes: 1

Related Questions