Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-30-2006, 06:48 AM   #1
fahadbht
Registered User
 
Join Date: Mar 2006
Posts: 3
Default Controlling Dynamic Text length

Hi Guys

I have two dynamic text bars which needs to come one after another and the text is coming from the text file as variables.

Can we Control the dynamic text's length to be exactly the same as text coming in from the variable of the text file? in thsi way whatever the text comes in my dynamic text bars can flexibly arranged according to that and there would be no gap in animation between two dynamic text bars.

The Dynamic text bar's length which i am giving is 500 and the next one is also 500 but as teh text in the text is not getting completely into the text bar so i increased the length to 1000 for each text bar, but as for the next time when i put a very short text in the variable of my text file, it creates the gap in between both the text lines offcourse, and that is a problem.

IF any one can help suggesting a better solution would be really appreciated.

Thansk
F.
fahadbht is offline   Reply With Quote
Old 03-30-2006, 07:00 AM   #2
astgtciv
Resu Deretsiger
 
astgtciv's Avatar
 
Join Date: Jul 2005
Location: St-Petersburg, Russia
Posts: 2,329
Default

Set TextField.autoSize to "center" (or "left" or "right" depending on which side of text you want fixed).
__________________
overstream.net: add subtitles to online videos (youtube, vimeo, blip.tv...).
astgtciv is offline   Reply With Quote
Old 03-30-2006, 01:41 PM   #3
pasteur
Obsesif Kompulsif Kisilik
 
pasteur's Avatar
 
Join Date: Feb 2006
Location: Istanbul
Posts: 37
Send a message via MSN to pasteur
Default

I will create a new thread but here it is...

I am setting my text autosize as left:

Code:
my_text.autosize = "left";
But when i load an XML into it, it is acting like i hadn't set it like "left". Just a few lines appear as difference, but not whole XML file. Here is the code i used:

Code:
var my_xml:XML = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success:Boolean):Void  {
	if (success) {
		my_text.text = my_xml;
		my_text.autoSize = "left";
	}
};
my_xml.load("sample.xml");
By the way, "my_text" is placed in a scrollable area that is created manually. When i put it out, it works but i need it in that area. Any ideas?
pasteur is offline   Reply With Quote
Old 03-30-2006, 05:48 PM   #4
astgtciv
Resu Deretsiger
 
astgtciv's Avatar
 
Join Date: Jul 2005
Location: St-Petersburg, Russia
Posts: 2,329
Default

Make sure it's "autoSize", not "autosize" if using FP7+. Also,

Quote:
If the value of autosize is "left" and the text field line type is set to Multiline in the text Property inspector, then the text field expands or contracts its right and bottom sides to fit all contained text.
If the value of autosize is "left" and the text field line type is set to Multiline No Wrap in the text Property inspector, then the text field expands or contracts only its right side to fit all contained text.
So make sure you don't have "No Wrap" set in the property inspector - otherwise the bottom side will not expand.
__________________
overstream.net: add subtitles to online videos (youtube, vimeo, blip.tv...).
astgtciv is offline   Reply With Quote
Old 02-02-2007, 02:36 PM   #5
RolloTomasi
Registered User
 
Join Date: Mar 2005
Posts: 51
Default

Is there a way to get a text field to the right of the autoSized field to stay flush against it?
RolloTomasi is offline   Reply With Quote
Old 02-02-2007, 11:14 PM   #6
astgtciv
Resu Deretsiger
 
astgtciv's Avatar
 
Join Date: Jul 2005
Location: St-Petersburg, Russia
Posts: 2,329
Default

No, you'll have to do it yourself - put some code that continuously gets the width of the autoSized field and sets the _x of the field to right appropriately.
__________________
overstream.net: add subtitles to online videos (youtube, vimeo, blip.tv...).
astgtciv is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML.txt ----> dynamic text box jerryCLEMENT ActionScript 2.0 3 09-23-2009 05:56 PM
calling a PDF file in Flash AudryLucy Projectors and CDs 20 12-30-2006 01:43 PM
UI Scrollbar and Dynamic Text Jason129 Components 7 07-28-2006 01:52 PM
Length of Dynamic Text Not Adjusting Scroll Bar skillet ActionScript 1.0 (and below) 1 03-11-2005 08:44 PM
dynamic text, anchors, and images spoonyg ActionScript 1.0 (and below) 7 11-26-2002 09:08 PM


All times are GMT. The time now is 11:39 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.