How do I go about adding (not just changing the entire text area to this img, actually adding) a simple sprite of 25x25 images to the text area in the flex project? using actionscript? (not mxml)
(it should be a component of the spark text area, mainly because it is a flexible mobile project and everything that is optimized for mobile devices)
edit: I guess I should have said this, I know that html text is a way to go about this. But my real confusion is that it is Sprite first, so I have no link to the link. This is the actual sprite var (this will be a file sent over the network in bytes and stored in the sprite object.), And then the second part, where im lost, Takes it into a text file, so it does not replace any text already in text area and will scroll in the text area.
also remember that i am trying to add this to the SPARK TEXT AREA component. I know that I can simply create an instance of a text field, but it is not, but I cannot find any information about adding this to the text area.
EDIT AGAIN: SInce there was some confusion that the sprite im trying to add, so the image is transmitted,
, ..
var fs:FileStream = new FileStream();
fs.open(new File(imageURL), FileMode.READ);
var bytes:ByteArray = new ByteArray();
fs.readBytes(bytes);
fs.close();
if (bytes == null)
{
trace("Image bytes is null!");
}
else
{
var message:Object = new Object();
message.type = "pic";
message.bytes = bytes;
netGroup.post(message);
trace("Picture sent!");
}
var loaderContext:LoaderContext = new LoaderContext();
loaderContext.allowCodeImport = false;
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onPicLoaded,false,0,true);
loader.loadBytes(message.bytes, loaderContext);
imageSprite = new Sprite();
imageSprite.addChild(loader);
, , imageSprite... , TEXT AERA. , , iphone.