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

x
?
Solved

Multi line text field

Posted on 2003-10-30
5
Medium Priority
?
213 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 1500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
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 select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

926 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