RE: [Flashcoders] embedFonts vs. setTextFormat
N0 actually it doesn't affect the entire string, if you use the optional params. setTextFormat takes optional index parameters for the index to start the format and end the format. You can go mytf.setTextFormat(startIndex,endIndex,textFormat) I use that all the time to format something bold, smaller, etc and haven't found a need to use setNewTextFormat. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas Sent: Wednesday, July 05, 2006 9:34 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] embedFonts vs. setTextFormat That would affect all the text currently in the field. Ian On 7/5/06, Marcelo de Moraes Serpa <[EMAIL PROTECTED]> wrote: > But couldn´t I just set a new TextFormat using the setTextFormat() method? > > On 7/5/06, Andreas Rønning <[EMAIL PROTECTED]> wrote: > > > > Because it allows you to use several different text formats along one > > text string. Especially useful for a chat program, where you'd like the > > user's name to be in a different text style than his chat output. > > > > - A ___ 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 ___ 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
Re: [Flashcoders] embedFonts vs. setTextFormat
That would affect all the text currently in the field. Ian On 7/5/06, Marcelo de Moraes Serpa <[EMAIL PROTECTED]> wrote: But couldn´t I just set a new TextFormat using the setTextFormat() method? On 7/5/06, Andreas Rønning <[EMAIL PROTECTED]> wrote: > > Because it allows you to use several different text formats along one > text string. Especially useful for a chat program, where you'd like the > user's name to be in a different text style than his chat output. > > - A ___ 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
Re: [Flashcoders] embedFonts vs. setTextFormat
But couldn´t I just set a new TextFormat using the setTextFormat() method? On 7/5/06, Andreas Rønning <[EMAIL PROTECTED]> wrote: Because it allows you to use several different text formats along one text string. Especially useful for a chat program, where you'd like the user's name to be in a different text style than his chat output. - A Marcelo de Moraes Serpa wrote: >> just don't get why that AS term exists. > > > Neither do I > > On 7/5/06, Mendelsohn, Michael <[EMAIL PROTECTED]> wrote: > >> >> Hi all... >> >> Thanks for the responses. It was indeed a case of setNewTextFormat. I >> just don't get why that AS term exists. >> >> Thanks! >> >> - MM >> >> ___ >> 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 >> > ___ > 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 -- - Andreas Rønning --- Flash guy Rayon Visual Concepts, Oslo, Norway --- ___ 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 ___ 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
Re: [Flashcoders] embedFonts vs. setTextFormat
Because it allows you to use several different text formats along one text string. Especially useful for a chat program, where you'd like the user's name to be in a different text style than his chat output. - A Marcelo de Moraes Serpa wrote: just don't get why that AS term exists. Neither do I On 7/5/06, Mendelsohn, Michael <[EMAIL PROTECTED]> wrote: Hi all... Thanks for the responses. It was indeed a case of setNewTextFormat. I just don't get why that AS term exists. Thanks! - MM ___ 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 ___ 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 -- - Andreas Rønning --- Flash guy Rayon Visual Concepts, Oslo, Norway --- ___ 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
Re: [Flashcoders] embedFonts vs. setTextFormat
just don't get why that AS term exists. Neither do I On 7/5/06, Mendelsohn, Michael <[EMAIL PROTECTED]> wrote: Hi all... Thanks for the responses. It was indeed a case of setNewTextFormat. I just don't get why that AS term exists. Thanks! - MM ___ 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 ___ 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
RE: [Flashcoders] embedFonts vs. setTextFormat
Hi all... Thanks for the responses. It was indeed a case of setNewTextFormat. I just don't get why that AS term exists. Thanks! - MM ___ 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
Re: [Flashcoders] embedFonts vs. setTextFormat
Order of operation does matter for this kinda thing, you have to embed fonts before setting the text and set the textFormat after, I believe. For example, I know this works: Hmmm... Maybe that´s the reason why I´m having inconsistencies... oh Flash programming and it´s little hidden tricks... sometimes I feel like I´m going crazy. On 7/5/06, Stacey Mulcahy <[EMAIL PROTECTED]> wrote: Try setting your textFormat after you apply the text. Also, I try to make sure the linkage name of the font is the same as the actual font for the purpose that its easier to read and self descriptive. Order of operation does matter for this kinda thing, you have to embed fonts before setting the text and set the textFormat after, I believe. For example, I know this works: var myTF=new TextFormat(); myTF.color=0x66; myTF.font="DINNeuzeitGroteskLight"; myTF.size=10; this.createTextField("tf", 2, 0, 0, 100, 0); tf.autoSize = "left"; tf.embedFonts=true; tf.multiline = true; tf.selectable=false; tf.wordWrap = true; tf.text = "Testing this out"; tf.setTextFormat(myTF); -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mendelsohn, Michael Sent: Wednesday, July 05, 2006 8:23 AM To: Flashcoders mailing list Subject: [Flashcoders] embedFonts vs. setTextFormat Hi list... The embedFonts line seems to prevent the setTextFormat line from working. What am I missing? The font "univ" is in the library, and its linkage is "univ." Thanks, - Michael M. private function createSlideWatcher():Void { var tf:TextFormat = new TextFormat(); tf.font = "univ"; tf.color = 0xFF; tf.size = 30; _root.createTextField("slideWatcher", _root.getNextHighestDepth(), 10, 10, 150, 150); _root.slideWatcher.background = true; _root.slideWatcher.backgroundColor = 0x66; _root.slideWatcher.embedFonts = true; _root.slideWatcher.setTextFormat(tf); _root.slideWatcher.text = "hi"; } ___ 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 ___ 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 ___ 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
RE: [Flashcoders] embedFonts vs. setTextFormat
Try setting your textFormat after you apply the text. Also, I try to make sure the linkage name of the font is the same as the actual font for the purpose that its easier to read and self descriptive. Order of operation does matter for this kinda thing, you have to embed fonts before setting the text and set the textFormat after, I believe. For example, I know this works: var myTF=new TextFormat(); myTF.color=0x66; myTF.font="DINNeuzeitGroteskLight"; myTF.size=10; this.createTextField("tf", 2, 0, 0, 100, 0); tf.autoSize = "left"; tf.embedFonts=true; tf.multiline = true; tf.selectable=false; tf.wordWrap = true; tf.text = "Testing this out"; tf.setTextFormat(myTF); -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mendelsohn, Michael Sent: Wednesday, July 05, 2006 8:23 AM To: Flashcoders mailing list Subject: [Flashcoders] embedFonts vs. setTextFormat Hi list... The embedFonts line seems to prevent the setTextFormat line from working. What am I missing? The font "univ" is in the library, and its linkage is "univ." Thanks, - Michael M. private function createSlideWatcher():Void { var tf:TextFormat = new TextFormat(); tf.font = "univ"; tf.color = 0xFF; tf.size = 30; _root.createTextField("slideWatcher", _root.getNextHighestDepth(), 10, 10, 150, 150); _root.slideWatcher.background = true; _root.slideWatcher.backgroundColor = 0x66; _root.slideWatcher.embedFonts = true; _root.slideWatcher.setTextFormat(tf); _root.slideWatcher.text = "hi"; } ___ 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 ___ 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
Re: [Flashcoders] embedFonts vs. setTextFormat
Try using setNewTextFormat() instead.. Mendelsohn, Michael a écrit : Hi list... The embedFonts line seems to prevent the setTextFormat line from working. What am I missing? The font "univ" is in the library, and its linkage is "univ." Thanks, - Michael M. private function createSlideWatcher():Void { var tf:TextFormat = new TextFormat(); tf.font = "univ"; tf.color = 0xFF; tf.size = 30; _root.createTextField("slideWatcher", _root.getNextHighestDepth(), 10, 10, 150, 150); _root.slideWatcher.background = true; _root.slideWatcher.backgroundColor = 0x66; _root.slideWatcher.embedFonts = true; _root.slideWatcher.setTextFormat(tf); _root.slideWatcher.text = "hi"; } ___ 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 ___ 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