Solved

Formatting Dynamic Text

Posted on 2003-11-14
7
1,606 Views
Last Modified: 2010-04-03
Please tell me what each value means in the ( ) of this line of code, particulaly the falses and the blank ones

var style1_fmt = new TextFormat("textFont", 13, 0x000000, false, false, false, "", "", "center");
0
Comment
Question by:madasczik
[X]
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
7 Comments
 
LVL 5

Expert Comment

by:zenlion420
ID: 9750739
This may help you along:

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

aloha,

j
0
 
LVL 5

Expert Comment

by:Calron
ID: 9751171
This link is to the online version of the API docs:

http://livedocs.macromedia.com/flash/mx2004/main/12_as726.htm
0
 
LVL 22

Accepted Solution

by:
rascalpants earned 500 total points
ID: 9751666
here is the information that you are looking for....

from MM:

Usage
new TextFormat([font, [size, [color, [bold, [italic, [underline, [url, [target, [align, [leftMargin, [rightMargin, [indent, [leading]]]]]]]]]]]]])

Parameters
font The name of a font for text as a string.

size An integer that indicates the point size.

color The color of text using this text format. A number containing three 8-bit RGB components; for example, 0xFF0000 is red, 0x00FF00 is green.

bold A Boolean value that indicates whether the text is boldface.

italic A Boolean value that indicates whether the text is italicized.

underline A Boolean value that indicates whether the text is underlined.

url The URL to which the text in this text format hyperlinks. If url is an empty string, the text does not have a hyperlink.

target The target window where the hyperlink is displayed. If the target window is an empty string, the text is displayed in the default target window _self. If the url parameter is set to an empty string or to the value null, you can get or set this property, but the property will have no effect.

align The alignment of the paragraph, represented as a string. If "left", the paragraph is left-aligned. If "center", the paragraph is centered. If "right", the paragraph is right-aligned.

leftMargin Indicates the left margin of the paragraph, in points.

rightMargin Indicates the right margin of the paragraph, in points.

indent An integer that indicates the indentation from the left margin to the first character in the paragraph.

leading A number that indicates the amount of leading vertical space between lines.

Returns
Nothing.

Description
Constructor; creates a TextFormat object with the specified properties. You can then change the properties of the TextFormat object to change the formatting of text fields.

Any parameter may be set to null to indicate that it is not defined. All of the parameters are optional; any omitted parameters are treated as null.



rp
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 27

Expert Comment

by:negatyve
ID: 9751672
var style1_fmt =

new TextFormat

("textFont", // font name (that one linked from the library)

13, // font size

0x000000, // font color

false, // boolean for bold

false, // boolean for italic

false, // boolean for underline

"", // string for url, if "" there's no url

"", // string for target window, if "" it doesn't care

"center"); // text align
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 9751686
just follow the line above...  the ones that are not being used are:

[leftMargin, [rightMargin, [indent, [leading]]]]


so in order of appearance:

font name = textFont
font size = 13
text color = 0x000000
bold = false
italic = false
underline = false
url = ""   //which means no url
target = ""  //which means no target
text alignment = center

let me know if you have any more questions...

rp
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 9751728
just beat you to it Stallion  :)


rp
0
 
LVL 27

Expert Comment

by:negatyve
ID: 9751849
>just beat you to it Stallion  :)

hehe, you did it.. :)
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

615 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