Solved

Multi line text field

Posted on 2003-10-30
5
175 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
  • 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

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

Title # Comments Views Activity
Rotating Adobe pdf document 4 310
Flash player updates using SCCM 2012 and SCUP 2011 3 391
System Center Configuration Manager 2012R2 7 80
embedding a media live encoder stream 3 119
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
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 what frame rate is, how to control it and what effect it has on the video.

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

15 Experts available now in Live!

Get 1:1 Help Now