thanks Jonathan for some reason i get this error when i change to your code...

ReferenceError: Error #1069: Property formatter not found on 
flash.text.TextField and there is no default value.
  ----- Original Message ----- 
  From: jonathan howe 
  To: Flash Coders List 
  Sent: Thursday, April 03, 2008 4:04 PM
  Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]


  var formatter:TextFormat = _selectedBox.getTextFormat();

  On Thu, Apr 3, 2008 at 10:43 AM, Stuart (FunkDaWeb) <[EMAIL PROTECTED]>
  wrote:

  > Hi all im tring to write a button that changes the format of a textbox
  > from normal to italic and back again. I have written the below code but i
  > cannot seam to get it to work!
  >
  > var formatter:TextFormat = new TextFormat();
  >
  >   if (formatter.italic == false)
  >   {
  >    formatter.italic = true;
  >   }
  >   else
  >   {
  >    formatter.italic = false;
  >   }
  >
  >   _selectedBox.setTextFormat(formatter);
  >
  > So my question is how do i read the properties of a textbox in order to
  > create an if statment to change the properties?
  >
  > SM
  > _______________________________________________
  > Flashcoders mailing list
  > Flashcoders@chattyfig.figleaf.com
  > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  >



  -- 
  -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
  _______________________________________________
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to