Solved

Formatting Dynamic Text

Posted on 2003-11-14
7
1,567 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
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.

708 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

14 Experts available now in Live!

Get 1:1 Help Now