PDA

View Full Version : Loading images into a dynamic textbox


BrokenHope
12-15-2004, 11:59 PM
Im wondering how you would go about doing that, I tried <img src=""> but it skipped the code everytime I used it... so how else can you do it?

uten
12-16-2004, 01:37 AM
textfield should be html enabled. then your img html tag should work...

myTextField.htmlText = "<b>the</b> quick brown <img src='fox.jpg'>";


jon :)

BrokenHope
12-16-2004, 01:41 AM
I do have html enabled, and the images are loaded up from a variable in the textfield which is defined from loading up the php file which gets the tag from the database, and then has the html in it. Anyways I will try again, and Flash can load up jpgs from local and public jpgs (so it can open up images uploaded on other sites) right, just like on a website.

BrokenHope
12-16-2004, 02:51 AM
Ok this is really gay, I started all over and made a brand new flash file, made a text box, enabled html, named var and instance to myTextBox then added the actionsctipt:

myTextBox.htmlText = "This is a picture of my best feature: <img src='http://www.actionscript.org/images/men_u/links.gif'>";

Which when I test the movie all it shows is the text. "This is a picture of my best friends feature:" And whenever the url to the image is wrong it pops up a gay error saying the url cant be found. What the heck is going on?

uten
12-16-2004, 05:17 AM
dude, you cant load gifs. only jpegs.

jon :)

BrokenHope
12-16-2004, 10:57 PM
Ok I got it working, can SWF's be loaded into dynamic textboxes? because im trying to do transparency of the images, and if I have the swf transparent when its saved, it should come up transparent when loaded in the main swf right?

esoterica
05-22-2005, 11:44 AM
I'm having the same problem, the actionscript that's loading in my text is as follows:

myLoadVars = new LoadVars();
myLoadVars.onLoad = function(success) {
if (success) {
mytextbox.htmlText = this.daTextBox;
}
};
myLoadVars.load("http://eso1.com/thefool/testing.php");

which loads in the text/images from:
http://eso1.com/thefool/testing.php

But the jpg's don't then appear in my dynamic html enabled text box (only the text, please see here):
http://eso1.com/thefool/fool.htm

... any help would be wicked!

How did you get yours working in the end BrokenHope?

Edit* I've been doing som rummaging and I think it's cos I'm using MX not MX2004, I'm gonna have a go with the scrollpane now... cheers!