View Full Version : browse for images, load into TextArea
dColumbus
09-26-2007, 10:33 PM
Hello,
I've been looking around for it seems ages, and I can't find exactly what I'm trying to do... variations, yes... or maybe I've just been looking for too long that everything is now a blur.
I want to be able to browse a folder on my server and get a list of all of the images in that directory, select one, and then load the selected image into a TextArea.
I would really appreciate your thoughts on this! ;)
drkstr
09-27-2007, 12:06 AM
What do you mean by load it into a TextArea? Do you mean as a background image? Which part are you having trouble with? Do you need help with getting the image locations into flash, or with setting the backgroundImage style property (if that's what you meant)?
Best Regards,
...aaron
dColumbus
09-27-2007, 08:03 AM
I mean literally load an image into a text area. I've done it before, just took a vacation from it all and am new to AS 3.0.
Daedalus
09-27-2007, 10:49 AM
There are two ways as far as I know of putting an image in a text area.
You can either do as drkstr said and set the background of the textarea to be the image you want by setting the backgroundImage style property with the text being overlaid on top.
http://livedocs.adobe.com/flex/2/langref/mx/core/ScrollControlBase.html#style:backgroundImage
If you want the image to be displayed as part of a article with sourrounding text (like a newspaper column) then you can load it by setting the html text property of the text area.
http://livedocs.adobe.com/flex/2/langref/flash/text/TextField.html#htmlText
dColumbus
09-27-2007, 06:51 PM
Ah yes... htmlText. Thank you.
So, with that in mind, is there a way to browse a directory on a server similar to how you can browse your computer for uploading files? Or will I have to create an XML file with all of the image names and paths and then load them in from that?
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.