Flash: Loading Image into TextField
- Started
- Last post
- 6 Responses
- autonoma
I'm loading an image into a dynamic textfield with:
img align='right' src='image.jpg' width='200' height='124' hspace='0' vspace='0'
I want to create a little preloading animation to play until it's fully-loaded. How do I target the image in the textfield to check and see if it's fully-loaded?
Thank you.
- CyBrain0
Maybe I'm crazy, but I don't think you can load an image into a text field.
You can load in image into an empty movie clip and place it at the _x, _y, _width, _height of the text field, underneath it instead.
- UndoUndo0
you can load an image into a text field with an img tag
- mikotondria20
yeah, you can include it just like a regular img tag within the htmlText that goes in your textfield.., non-pregressive jpgs, but *may* now include pngs if Im not mistaken.
It can be a right, time-sucking, deadline-busting bitch, however, as only Flash knows how - I've sweated blood over why the images don't always align properly.
If you are wanting to know about them preloading, then you can actually just use a symbol identifier that you stick in your library, and you could have that do the preloading then let the main movie know when it's done.
I've actually never had success with getting the images to consistently align properly - would be interested to hear if you do :).
Bests.
- autonoma0
Thanks. Yeah - I just don't know how to target the image inside the text field, though.
- UndoUndo0
you can do it like this
_root.myText.htmlText = "[p] and these [img src='images/round.jpg' /]are the nicest pair ive ever seen [/p]"
swap [ for < and ] for >
(NT strips out code)