• 1. Best Development Tool for Actionscript?
    Hi, Currently which (free or opensource) development kit for AS is the best? I have owned a Flash MX 2004, but the IDE suck! Thanks.
  • 2. Help! Remove Movie Clips
    OK...here's my problem... I am making a portfolio site and I have my thumbnails being created dynamically through XML...very similar to the galleries example in the Sample and Tutorials. Only problem is that I have multiple keyframes with different thumbnails that need to be displyed through a different XML file. I got it to work but the thumbnails from the first frame are still showing on the second frame...How do I remove the dynamically created movie clips?
  • 3. 256 Levels Or Recursion?
    I am creating a maze game which uses a random maze generator which has the attached code in it Unfortunately,this generates the following error [Q]256 levels of recursion were exceeded in one action list.[/Q] I have measured the program (i originally made it in javascript, in which it works), and it can reach upto 1100 levels of recursion. Is there anyway of bypassing the error? Thanks [hr] function ClearPoint(myarrGrid,x,y) { newx = 0; newy = 0; intCount = 0; g_intDepth = g_intDepth + 1; arrGrid[(y*W)+x] = 1; intCount = ValidCount(arrGrid, x, y); while (intCount > 0) { switch(Math.round(Math.random() * 1234) % 4) { case 0: if (ValidMove(arrGrid,x,y-2) > 0) { arrGrid[(y-1)*W+x] = 1; ClearPoint(arrGrid,x,y-2); } break; case 1: if (ValidMove(arrGrid,x+2,y) > 0) { arrGrid[(y*W)+x+1] = 1; ClearPoint(arrGrid,x+2,y); } break; case 2: if (ValidMove(arrGrid,x,y+2) > 0) { arrGrid[(y+1)*W+x] = 1; ClearPoint(arrGrid,x,y+2); } break; case 3: if (ValidMove(arrGrid,x-2,y) > 0) { arrGrid[(y*W)+x-1] = 1; ClearPoint(arrGrid,x-2,y); } break; default: break; } intCount = ValidCount(arrGrid, x, y) } g_intDepth = g_intDepth - 1 }
  • 4. Dynamic Buttons
    I am new to Flash/ActionScript. I have a MySQL database. I want to build buttons depending on choices available in MySQL table. Please let me know how to do this.


Postby kleio78 » Thu, 17 Aug 2006 05:56:51 GMT

I'm trying to create a multiline textbox in actionscript. See code
below. The text I'd like to wrap is "this.description" a string read in
from an XML node that contains linebreaks. However, Flash truncates
text after the linebreaks, and will also not wrap long lines of text.
But when I do a trace() on the text at the end, it's returning the
entire string correctly. Any suggestions? Thanks in advance.


this.textBox2=this.createTextField("tb2", this.getNextHighestDepth(),
this.screenWidth/2, this.shell._y+this.captionOffset+boxFormat1.size*2,
this.screenWidth/2, this.captionSize);

var boxFormat2:TextFormat = new TextFormat();
boxFormat2.color = 0xCCCCCC;

this.textBox2.multiline = true;
this.textBox2.wordWrap = true;

var tempText:String = clean(this.description);

Similar Threads:

1.Safari dynamic text wordwrap problems

I'm having issues with dynamic text fields in safari.  The text does not seem 
to be wrapping correctly.  Most of the text wraps but on some lines there are a 
few words off to the right of the text box that can't be seen.  Yes, the text 
box is set to wordwrap. Has anybody ever heard of this happening before.  I 
don't think it's a known issue because i can't find any info searching google. 
This only happens on the safari browser, every other browser displays the text 

 Please help.

2.textField.autoSize/wordWrap question


Quick question. I'm trying to right justify various sentences, 1-3 lines of 
text each in a separate text box, and then
position the text boxes, dynamically. Here's what I have, but the syntax of 
the actionscript is messing me up.

myText.autoSize = 'right';
myText.wordWrap = true;
this._y = [previous item]._y + [previous item]._height;
myText = [text goes here];

For one line of text, it works fine. For more than one line of text, it only 
shows the first line, and then adds another half line to the text box, but 
doesn't display more text. Any ideas?


3.Wordwrap does not work

Hi !

 I have a dynamice text field which uses a variable which is set externally.  
The problem is that the words do not wrap round the text box, so that only 

 "There has been a dispensing error and he is tak" appears whereas 

 "There has been a dispensing error and he is taking the wrong dose" should 

 Any help would be much appreciated


4.Problem WordWrap in dynamically scrolling text

5.Setting the wordWrap on the Checkbox component

Anyone know how to get a flash quiz template checkbox to set to multi line? I 
have tried:

 onClipEvent (load) {
 this.checkbox.labelPath.multiline = true;
 this.checkbox.labelPath.wordWrap = true;

 and also on the keyframe that contains the checkbox text fields:

 checkbox1.labelPath.multiline = true;
 checkbox1.labelPath.wordWrap = true;

 Any ideas?

6. Wordwrap in List component

7. Problem with getTextExtent and wordWrap

8. Gretting true text width from wordWrapped textField?

Return to FLASH


Who is online

Users browsing this forum: No registered users and 48 guest