Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Set dynamic text to bold using actionscript 2

Posted on 2010-09-02
2
613 Views
Last Modified: 2013-11-11
Experts,

Im struggling to set a dynamic text field to bold at run time. I have the following code:

on (rollOver) {
      this.ans1_txt.textColor = 0xff0000;
      this.ans1_txt.bold=true;
}

The first line successfully sets the color, but the second line fails to embolden...

Any suggestions would be appreciated.

Regards
Easynow
0
Comment
Question by:Dean OBrien
2 Comments
 
LVL 18

Accepted Solution

by:
Antonio Estrada earned 500 total points
ID: 33591637
Try the following instead:

<code>

-V
on (rollOver) {
	var textFormat:TextFormat = new TextFormat();
	textFormat.color = 0xFF0000;
	textFormat.bold = true;
	this.ans1_txt.setTextFormat(textFormat);
}

Open in new window

0
 
LVL 12

Author Closing Comment

by:Dean OBrien
ID: 33594967
Awesome thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question