Solved

Multi line text field

Posted on 2003-10-30
5
198 Views
Last Modified: 2010-04-03
I’m trying to display the details of the product from database. I put the details in textfiled dynamically. I used createTxtField and I specify the width and height. When I put the text, I want the text in multi line. I use textField.multiline = true but it doesn't want to be a multi line. The text keeps wrap to the left. I put textField.wordWrap = false as well, but it doesn't work.

_root.createEmptyMovieClip("prod_mc"+i, depth4);
var prodmc = eval("prod_mc"+i);
_root.prodmc.createTextField("desc_txt", 5, desc_xposition, desc_yposition, 100, 50);
_root.prodmc.desc_txt.border = true;
_root.prodmc.desc_txt.type = "dynamic";
_root.prodmc.desc_txt.text = details_array[i];
_root.prodmc.desc_txt.wordWrap = false;
_root.prodmc.desc_txt.multiline = true;
0
Comment
Question by:Cyber_Cus2
[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
  • 3
  • 2
5 Comments
 
LVL 27

Expert Comment

by:negatyve
ID: 9656106
1. wordWrap should be set to true:

_root.createEmptyMovieClip("prod_mc"+i, depth4);
var prodmc = eval("prod_mc"+i);
_root.prodmc.createTextField("desc_txt", 5, desc_xposition, desc_yposition, 100, 50);
_root.prodmc.desc_txt.border = true;
_root.prodmc.desc_txt.type = "dynamic";
_root.prodmc.desc_txt.text = details_array[i];
_root.prodmc.desc_txt.wordWrap = true; // true
_root.prodmc.desc_txt.multiline = true;

2. if you want your textfield to resize according to text length:

_root.createEmptyMovieClip("prod_mc"+i, depth4);
var prodmc = eval("prod_mc"+i);
_root.prodmc.createTextField("desc_txt", 5, desc_xposition, desc_yposition, 100, 50);
_root.prodmc.desc_txt.border = true;
_root.prodmc.desc_txt.type = "dynamic";
_root.prodmc.desc_txt.text = details_array[i];
_root.prodmc.desc_txt.wordWrap = true;
_root.prodmc.desc_txt.multiline = true;
_root.prodmc.desc_txt.autoSize = true;
0
 

Author Comment

by:Cyber_Cus2
ID: 9656516
I use no 2 it works, but I must click the text first to see the second line
0
 

Author Comment

by:Cyber_Cus2
ID: 9656563
how to fix that problem?
0
 
LVL 27

Accepted Solution

by:
negatyve earned 500 total points
ID: 9656608
>but I must click the text first to see the second line

i do not. something more about your fla situation?
0
 

Author Comment

by:Cyber_Cus2
ID: 9656841
ok2 it works. i've made a mistake. thanks anyway
0

Featured Post

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
flash cs6 4 355
Action Script commands 4 332
Embedded Video Download (Flash) 3 1,197
type of website 13 53
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

751 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