Results 1 to 8 of 8
Thread: <img> from Library in textField?
-
May 13th, 2009, 12:20 PM #12Registered User
posts<img> from Library in textField?
The AS3 documentation for the <img> tag in htmlText says:
So you can stick images from your library in html textFields... the question is how?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.
I've got this lovely flash interface that's going on a CD-Rom. It's entirely contained in one file-- and I'd rally rather not have a "resources" folder just for three lousy icons.
Does anyone have an example of how this worked, even under AS2?
-
May 13th, 2009, 02:17 PM #2
©2006-11 GlosRFC - Searching 8,168,684,336 brain cells
-
May 18th, 2009, 04:06 PM #32Registered User
postsSo basically... despite the AS3 documentation telling you you can add an IMG from the library... you can't.
Because the only method for doing so (linkage identifiers) requires you to migrate the entire project back to AS2.
-
May 18th, 2009, 04:38 PM #4
myTxt.htmlText = "some html stuff and <img src="anImage.jpg"/> the image";
-
May 18th, 2009, 04:39 PM #5
oh, linkage identifiers, scratch that last one, you can use linkage in AS3, say you have a movie clip with the linkage name goCart
Code:addChild(new goCart());
-
October 1st, 2009, 11:40 PM #61Registered User
postsActually the trick is to wrap the bitmap image in the library inside a Movieclip and give THAT a Linkage Class name (eg "myLibraryImage"). Then in your html textfield just use that name in the src attribute :
<img src="myLibraryImage" width="100" height ="50"/>
Cheers
-
May 27th, 2010, 03:08 AM #71Registered User
posts
-
November 4th, 2011, 06:19 AM #81Registered User
postsBut also there's no need to bother ourselves and use embedding or library to have a simple MovieClip inside of our TextField.
Checkout www.doitflash.com
the site provided a new OOP class named "TextArea" which is an extention to the original TextField.
It allows us to have any MovieClip and SWF file in line of our texts and also provides lots of more features. we can communicate easily between our MovieClips and our project live and import them with our own tags rather than using only <img> tag! let us to have animated GIF images.... more and more!
you'll love it and it will be a great help
Downloading the platform is also free

Reply With Quote


Bookmarks