Solved

Formatting Dynamic Text

Posted on 2003-11-14
7
1,580 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
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

920 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now