CHanging text state using a button

  • palvin_225
  • Born
  • Born
  • palvin_225
  • Posts: 3

Post 3+ Months Ago

Hello friends,

I know that in javascript we can use

Document.execCommand("xxx")

Where xxx is the command you want to execute. For example, to set selected text to be bold, you would replace xxx with Bold. To set selected text to italic, replace xxx with Italic.

I want to know how can I do the same thing in flash? I want to make a button by pressing which the text property is changed in a text field and is posted in the same state in the message window.

Thank you.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Posts: 861
  • Loc: BKNY

Post 3+ Months Ago

not sure about what you're asking about in that last part, but...

you need to give your text box an instance name and then you can have your button affect that instance name...

here's a whole bunch of formatting stuff you can use...
AS Dictionary

hope that helps..
  • palvin_225
  • Born
  • Born
  • palvin_225
  • Posts: 3

Post 3+ Months Ago

I am making an instant messaging window. Right now only send button is functioning and when I click it, the text from _Message instance(Which has Input Text Type) is posted to _display instance(Which had dynamic Text type) field.

What I want to do is to give user an option so that they can change their text to bold state by clicking a button as is done in most of the instant messaging programs.

Thank you
  • Tchuki
  • Mastermind
  • Mastermind
  • Tchuki
  • Posts: 1774
  • Loc: Edinburgh

Post 3+ Months Ago

http://actionscript-toolbox.com/flashmx_createtext.php

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.