Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Formatting Dynamic Text

Posted on 2003-11-14
7
Medium Priority
?
1,616 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 2000 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
Technology Partners: 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

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!

Question has a verified solution.

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

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
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.

772 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