HI gregory. Yes the htmlText is a pain.! The problems never end. And macromedia now adobe never fix those behaviors in the text field.
I think that you can check for flash 8 movie if you have filters available or other flash 8 functions like setTimeOut. if(_global.setTimeout() != undefined) return 8 else return 7; This is not a reliable solution because if you write a function in F7 called setTimeOut. It faill. I can't remenber if you have a object that tell this inside SWF but try a loop in the _root object. var ro = _root; for (var t in ro){ trace(t+" >> "+ro[t])} Flash player 9 can tell that.;) Best's On 11/29/06, GregoryN <[EMAIL PROTECTED]> wrote:
Marcelo and luchyx, thanks for replies. A few words about my case. This is a kind of "digest" page where "summary" blocks are followed by "click to see details" links. When user clicks such a link, details info will be displayed right below the link on this page. Click again - hide details. As you know, this is easy to do in html+javascript by element.style.display = "block"; (or "none" to hide) In flash, it's more tricky: I have placeholder tags (<tag_to_replace id="n">) in my text which will be replaced by details_texts_array[n] when user clicks a link. So, I can't use a button. However, rebuilding the textfield (if just redefining all params won't be enough) IS a solution. Frankly, I wouldn't like to rewrite well-working (in v7) code, but... > Flash ignore the unsupported html tags.! Well, seems it's only v8 and "by random" (i.e., depending on it's "mood" :-). The work-around is easy - just store html text in string variable and play with it instead of field.htmlText ... Also, I can't use "%_replaceme_%" because I need it to be a tag (not shown in html textfield). Also, my tags_for_css are not ignored! Thus, maybe it (player v8) just doesn't like valid XHTML tags (like <my_tag />) but feels ok to <my_tag> ? The worst thing here is that I don't know a way to determine at runtime if the movie was published for v7 or v8... So, I'll have to make two versions of the class OR probably make public static var publishedForPlayer:Number = 8; // or 7 to be set manually... ;-) A lot of fun, right? If there's anyone else who wants to suggest anything on the subject, I'd appreciate it very much. -- Best regards, GregoryN ================================ http://GOusable.com Flash components development. Usability services. > =========== "Marcelo Volmaro" wrote: > V8 of the player (i donA?t know 9) seems to have a BIG problem with > textfields. Anytime you modify the contents of an html text field from > WITHING the text field (ie: you are modifying the textfield using a link > on the textfield) the player start doing weird things with the content. > > I have the same problem in an html editor i made, where you can "click" on > the images. The player starts duplicating the image and you will end with > two, three or more images stacked. In your case, the player is duplicating > the link all over the textfield. > > Try doing the same but using a button... No problem and all works as > expected. > My solution (because i canA?t use a button to edit the image) was to > rebuild the area. Yes... each time you edit an image, i rebuild the entire > textarea... > > > =================== "l u c h y x" wrote: > First do a Trace of (my_text1.htmlText) and see what happens with the HTML > content. > Usually you can do this > my_text1.htmlText = my_text1.htmlText.split( tag2replace ).join( my_replace > ); > > But the string tag to replace string2replace:String = > "<br><br>*<tag_to_replace />*<br><br>"; > After you put on the htmlText area become in "<br><br>**<br><br>"; > Flash ignore the unsupported html tags.! > So I suggest you do something like var string2replate = "%_replaceme_%"; > And then use > my_text1.htmlText = my_text1.htmlText.split(string2replate).join( my_replace > ); _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
-- l u c h y x r i a e v o l u t i o n (r) [EMAIL PROTECTED] http://www.riaevolution.com Phone: +54 (11) 4931-7006 _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com