Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing text property with action script 1

Status
Not open for further replies.

eili

Programmer
Mar 16, 2001
5
CH
Hi,

does anybody know, whether it is possible, to change the properties of a text-field in a flash-movie ?

E.g. I would like ot set dynamically a text-field as "input text" or not editable "dynamic text".

Any hint will be appreciated...

Cheers
eili
 
if you create the text-field, make it dynamic, and select the HTML check button, you can then use te following HTML tags to change the text:

<b>
<i>
<font type=...>
<font color=...>
<font size=...>

etc, etc (i'm at work at the moment so can't remember all of them) check the Help section in Flash for the full list of accepted HTML tags.

So if your text-field variable is /:text and you wanted (on the press of a button) to make the text size 5, the color white, and italicise the word &quot;davdesign&quot;, you're actions would be:

On (release)
SetVariable: /:text=&quot;<font size=&quot;5&quot; color=&quot;FFFFFF&quot;><i>davdesign</i></font>&quot;
End On

Couldn't be simpler. Of course if you only want to change the height and colour, it might be just as easy to put the text in a movie-clip and use the SetProperty action to manipulate the text.

dave dave@davdesign.co.uk

^^^^^^^^^^^^^^^^
 
... and what's the property name for changing a text-box from editable to non-editable (from input text to dynamic text) ???

Cheers
eili
 
... I want to change the type of a text-box with action script. I guess this has to be done trough modification of a text-box.property ?!?

cheers
eili
 
Don't think it's possible! I may be wrong!

What's this for? Looking to stop further manipulation once the input is done?

B-)
 
why not have 2 movie-clips, one with each of the text-field states you require. When one is required, set the visibility of the other to zero, & vice-versa.

dave dave@davdesign.co.uk

^^^^^^^^^^^^^^^^
 
yeah sure Old, I'm getting sick of your plagerising antics!

JOKE LOL !! ;-) dave@davdesign.co.uk

^^^^^^^^^^^^^^^^
 
I'm gonna switch off the internet and get back to work, I'll see you chaps later.

dave dave@davdesign.co.uk

^^^^^^^^^^^^^^^^
 
example of this in action posted on thread250-64881

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top