var theHTML='<ul><li>stuff</li><li>some green text: <span class="almostblack"> </span><span class="green">Green!</span></li><li>more stuff</li></ul>'
theField_txt.htmlText = theHTML
will show up like this:
If you uncomment the almostblack style then the green bullet will look black.
If you make the almostblack style color really black 000000 instead of almost black, then the bullet will be green.
I'm assuming this will get fixed at some point and when that happens the almostblack hack won't really do anything other than be extra code that needs to be removed.
If/when it gets fixed then any pretty colored bullets made by doing this
var theHTML='<ul><li>stuff</li><li> <span class="green"> </span>black text with a green bullet</li><li>more stuff</li></ul>'
will suddenly be black.
there's also this
var theHTML='<ul><li>stuff</li><li><span class="green"> </span>black text with a black bullet</li><li>more stuff</li></ul>'
which makes a jumbo sized black bullet.
I'm doing some experimenting and trying to update some very old projects and getting kind of off the beaten track and finding some weirdness in Flash CS3 IDE..
If I open a custom panel that I've made and dropped into the windowswf folder, or if I open a panel someone else has made, I can right click somewhere on it and I get the full Flash Player context menu (Zoom In, Zoom Out, 100%, Show All, Quality, etc) and I can even add to that context menu via my code in the windowSWF. Now in other panels such as Window>Other Panels>Accessibility that are from Adobe you don't get that context menu.
So that breaks the user experience some.. but it gets even more broken. In my custom panels if I try using the "flyout" menu in the upper right corner of that panel all I see is "Help" in the menu. Clicking that takes me to the Help page for the Movie Explorer panel. Huh? I've tried this with custom panels from other folks and see the same thing.
I would expect if I specify a custom context menu from a WindowSWF that the menu items would show up in that little flyout menu but that is not what is happening. There might be some secret way of adding to that flyout menu and also disabling the "flash player" context menu that shows up in my windowSWFs. If you know that secret please share it.
The installer for Central is broken.. I reported it on Friday, but unfortunately the tech support feature on the Adobe site doesn’t list “Central” so I had to report it as a problem with the closest thing on the list “Flash Player”.. so it might not have gotten noticed or if it was noticed it’s just a very low priority. Central is a lame duck since Apollo has been discussed quite a bit and is supposed to be out before the end of the year, but I can’t recall seeing anything saying that Central should no longer be installed. I’m assuming that since the installer badge is still there that something is just temporarily broken.
Why do I care? I had an app that I developed last year to demo things at a conference. It’s conference time again and I was asked if the little Central app could be used again. I checked if it could be installed (it could..at the time) and said sure. Now I have to scramble to find another solution that will do what I need. Central has always been a “beta” so it’s always been a gamble and it looks like I got stung by it. Ugh. Luckily it’s easy enough to port it over to a standard SWF, publish as EXE, etc.. so the code isn’t totally lost.
Just a note to self sorta.. the text field and TextArea in Flash almost can't be used if you want to display images in them via standard HTML text. It seems so easy. You have some HTML text that contains a little IMG tag. Flash should act like a browser and display the image and the text in a normal, predictable way. But it doesn't.
Most folks are upset about the TextArea component, but I include the old text field, as you can see below it doesn't act like it should.
Here's just one example.. The Flash Player 8 [edited to add also seeing this with Flash Player 9] should be smart enough to see that the textField and TextArea are only 190 pixels wide and the image is too.. so text should wrap down below the image instead of just partially disappearing off to the right of it. [edited to add clarification.. the two examples below are in Flash. The top one is a TextArea and the bottom one is a text field. The problem is you see "ront of a wall" below the images and the rest of the text is hidden away somewhere to the right of the image.]
code in the SWF:
myTextArea.text = '<img src="http://oddhammer.com/blog/images/samplenewsimage.jpg" width="190" height="102" />Guys in front of a wall';
myTextField.htmlText = '<img src="http://oddhammer.com/blog/images/samplenewsimage.jpg" width="190" height="102" id="myimage"/> Guys in front of a wall';
Here's the same thing in plain old HTML..
guys in front of a wall
<table width="190" border="1" cellspacing="0">
<tr>
<td width="190"><img src="/blog/images/samplenewsimage.jpg" width="190" height="102" />guys in front of a wall </td>
</tr>
</table>
Note that the browser realizes that text can't be beside the image so the text is moved below the image. As you saw above, Flash would do that weird sortawrapping thing.
And it's not so much that the Flash Player 8 is broken, but it doesn't handle images in HTML the same way a browser would. For instance, if you have a bunch of HTML that contains images via the IMG tag and they happen to have align="bottom"... look out. It's going to get ugly. Flash Player 8 only supports "left" and "right". Things like baseline, top, middle, bottom, etc. are just tossed.
I've tested with Flash Player 9 (published for Flash Player 8 though since it'll be ages before I can publish for 9) and see the same thing.
So you can use Flash to display images and text in a somewhat HTMLish fashion if you are careful and creative with the old BR tags and "& nbsp;"s. You can trick Flash into putting images wherever you want. Just hope you don't have a ton of standard HTML text with images that needs to get displayed dynamically in Flash.
And here's some info (added to LiveDocs, yes) that might be of interest...
myTextField.htmlText = '<img src="sampleimage.jpg" width="190" height="102" id="myimage"/>';
trace("width of image = "+myTextField.myimage._width); // width of image = 190
I'm hoping somebody can come along with an easy solution..