» in my experience...
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Elsewhere...
·8bit joystick ·a list apart ·amishrobot ·arcadezen ·antipixel ·boxes and arrows ·black belt jones ·curiousLee ·daring fireball ·design interact ·design not found ·everything hurts ·forwarding address: osx ·gridface ·info design ·izzywizzy ·jon madisons ·joshua kaufman ·k10k ·kalsey ·kelake ·kuro5hin ·the lion's web(log) ·louise ferguson ·memepool ·metafilter ·quinn macdonald ·railhead design ·rentzsch ·surfin' safari ·the onion ·winterspeak ·web-graphics ·xblog ·zen haiku Here at IMX
Recent posts...
·Unreal 2 is... uh, not so great. ·Video Game legitimization. ·Random access info architecture. ·Too soon. ·I want my P2P. ·Detecting alphanumeric characters in JavaScript. ·Having some copyright fun with GarageBand. ·Are five minute compositions worth anything? ·Yeah, GarageBand is cool. ·Taking the plunge (again).
Categorically speaking...
·AOL
·Apple and Mac OSX ·Books and Reading ·Business Technology ·Design ·Design Technology ·Effort ·Gaming ·Information Architecture ·Interaction Design ·Internet Consulting ·JavaScript ·O'Reilly Emerging Tech Conference ·Personal ·Photography ·Random ·Software ·U and I ·UI Programming ·Usability ·User Experience ·Web Browsers ·Weblogs and Blogging ·When Bad Things Happen to Good BMW's Memes R' Us
|
|||||||||||||||||||||||||||||||||||||||||||||
|
The Flash TextArea component doesn't support 'condenseWhite.'
[ Posted by Dan on November 19, 2003 | 4 Comments ] As of this writing, and as far as I know, in the Flash MX 2004 TextArea component, Macromedia missed an important detail when they created the TextArea component properties. You can say that the text area can be formatted by HTML, but that HTML formatting inherits the whitespace formatting as though a supersetted 'pre' tag was present. It makes for ugliness, and requires ugly workarounds (AFAIK). I sent email to the author of a good article that mentions this issue. In the article he said... Now, a quick note on ignoreWhite: this normally excludes all spaces, linebreaks and carriage-returns from being counted when our XML is brought in to Flash (parsed), however I must admit I can't get it to work in my example or the Macromedia example I looked at earlier - you can see this for yourself by inserting a carriage return after one of the opening tags and then viewing the results in Flash - if anyone knows why this happens then please email me so I can amend this tutorial. I've left it in for the time being :]I've been playing around with this, and have a few notes. First, condenseWhite would probably be the property to use/set as that is what is available in a dynamic text box (as opposed to ignoreWhite). Unfortunately, it looks as though Macromedia did not implement that property in the TextArea component (and because components are compiled, you can't add that property support). If you remove all white space from the original xml doc (and you still have to use ignoreWhite while loading the XML) you can fix some of the display weirdness. That's a less than optimal solution though. I may have to figure out how to write my own component, but that looks like it's out of my league right now. <update when="November 22, 2003"> I wrote a function that deals with this problem...
// This function kills any characters in the passed in string
// that are considered to be white space. White space is defined
// as anything *below* ASCII/Unicode character code 32.
// We want code 32 because that's a space, and we want words separated, right?
function killWhiteSpace(theData) {
var myNewString:String = '';
var j:Number;
for(j = 0; j < theData.length; j++) {
if(theData.charCodeAt(j) > 31) {
myNewString += theData.charAt(j);
}
}
return myNewString;
}
Use this function before you place your HTML into a TextArea component.
|
|||||||||||||||||||||||||||||||||||||||||||||
|
Copyright © 2001 - 2003 by Daniel Kapusta | ||||||||||||||||||||||||||||||||||||||||||||