This is a very geeky technical post. If you are not a very geeky technical person, feel free to skip it. If you are a very geeky technical person, but you're too l33+ for Flash, also feel free to skip it.

Macromedia sez here:

To embed a JPEG or SWF file in a text field, specify the absolute or relative path to the JPEG or SWF file in the <img> tag's src attribute. For example, the following code inserts a JPEG file that's located in the same directory as the SWF file:

textField_txt.htmlText = "<p>Here's a picture from my last vacation:<img src='beach.jpg'>";

This thing I am doing exactly as written. However, a trace performed on textField_txt.htmlText immediately afterward reveals that it has the value:

<P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="12" COLOR="#000000">Here's a picture from my last vacation:</FONT></P>

And that the img tag has vanished completely.

Does anyone know what's happening here? My forehead will soon be bruised from being beaten against the desk.

From: [identity profile] smarriveurr.livejournal.com


Hm. I think you can get away with singles... but yeah, maybe he should try escaping in double quotes for the string - I imagine Macromedia would catch something like that, though...
ext_34769: (Default)

From: [identity profile] gothwalk.livejournal.com


They break the string if you use them unescaped, and it makes no difference when they're used escaped.

From: [identity profile] smarriveurr.livejournal.com


Well, I don't know if you used the exact same string text as listed above, but I assume so... that being the case, that would mean the paragraph tag too has been eaten (unless, actually, you put in the paired paragraph and font tags to replace, in which case, I'm an idjit, ignore me) - perhaps there's something somehow dropping a token trying to parse the tags when the value is set or reproduced? Or, could it be possible (and I don't know, cuz I haven't played with such things in a while...) that you it doesn't trust the paragraph tag as an atomic, and refuses to parse the HTML because it considers the tags malformed/unclosed? It would explain the only two tags in the text going AWOL with everything else the same...

Sorry, I'm only a half-and-half webdev these days, and my codemonkey skills are getting mighty rusty from years of disuse... but it's a theory.
ext_34769: (Default)

From: [identity profile] gothwalk.livejournal.com


The paired paragraph and font tags appear as a sort of side benefit of the htmlText function. I tried sticking in some bold tags, and they survived the change, and displayed correctly. I'll keep poking.

From: [identity profile] smarriveurr.livejournal.com


I know it's a stupid question, but I find with niggling errors it's the dumb questions that matter... you're viewing with Player 7+ installed, right?
ext_34769: (Default)

From: [identity profile] gothwalk.livejournal.com


Yep. Checked that in a flash of inspiration this afternoon, which came to nothing.

From: [identity profile] smarriveurr.livejournal.com


Well... not for nothing... every possible conflict you rule out is one step closer to a possible fix. And it's better to rule out dumb stuff up front, so you don't jump out a window after spending 8 hours on "high concept" to find out you skipped a delimeter or forget a semicolon.

Of course, now, at this point, I can be of absolutely zero further help, cuz I don't know nothing 'bout no Flash in no textfields... Good luck.

From: [identity profile] dmh.livejournal.com


Macromedia bought me lunch yesterday.

This does not help you in any way, but I still want you to know it. :o)

*Nyom* *nyom* *nyom*!

From: [identity profile] dmh.livejournal.com


Well, I do hope they buy you a nice meal too so you can tell them face-to-face about the bugs making your life a misery. :o)

As it was, we chomped away and complained about bugs in different MM products instead. :o) But I do think they're a fantastically customer-focused company, and hope this don't change once they've become "Macrobe"...

From: [identity profile] loupblanc.livejournal.com


Did you have a look at the comments at the bottom of this macromedia page? Lots of people seem to complain about their disappearing as well.

So to quote them: "It's a bug"...

From: [identity profile] loupblanc.livejournal.com


their disappearing as well

their <img> disappearing as well

aka "LJ ate my tags"...
ext_34769: (Default)

From: [identity profile] gothwalk.livejournal.com


That gets the code showing in the textfield, which is the expected behaviour - I think.
.