ActionScript 2.0 :: Dynamic Text Field AutoSize Not Working?
Mar 23, 2010
I have a dynamic text field populated by xml which doesn't seem to like the autoSize property. The field populates correctly but doesn't auto size at all. The purpose of this text field is to inform the user of the url for an ad they can click on as they roll over it.
ActionScript Code:
popUpmc.popUpTxt.autoSize = true;
Setting autoSize while inside the XML onLoad() function and outside it made no difference. Please help, I'm sure I must be forgetting something? Does this have to be applied with a new text format or something?
View 0 Replies
Similar Posts:
Oct 7, 2007
I've been banging my head against the wall, on something that should be straight forward..granted Im a novice at this....
I have a text field that is fed by an array of titles. The longer title are geting cuttoff in the field box, and Ive tried to autoscale.
View 4 Replies
Aug 18, 2009
I'm trying to load an XML file and place the content into a dynamic text field. The XML nodes contain content within CDATA sections that have basic <b> and <i> tags. Once I have the content loaded into a variable and trace it, I can see all my tags within.
I then place the content into a dynamic text field with html set to true but for some reason it doesn't show any formatting, the tags appear to have been rendered because they don't show up inline. I thought maybe this was due to embedded fonts but i have all of my bold, bold italic, italic and regular font's within a text field embedded so I wouldn't think thats an issue. Is there something I'm overlooking?
View 6 Replies
May 13, 2011
I have a dynamic text on the stage which gets updated (shows numbers) when some buttons are pressed.I just need to know if it is possible to show the first dynamic textfield in another dynamic textfield.Lets say the first dynamic textfield called "price" and the second one called "price2". when a button is pressed, the first dynamic textfield "price" will show a number. is it possible to show whatever is shown in the "price" in "price2" ?
View 1 Replies
Dec 8, 2010
I'm creating an XML-driven pie chart in AS3 with 2 text boxes in each pie slice. Both text fields are dynamic in the sense that they are populated by the XML doc and then told where to place themselves in the AS3. I've got them both using the same x and y position to place themselves at the moment (which of course puts them right one top of each other), but I'd like to make one of the fields (which acts like a label or a title to the larger number and % text field) place itself in a particular spot around the other text field. The result I'm looking for is to have the smaller "title" text field appear approximately 5 pixels above and left-justified to the larger "percentage" field.
Anyway, here are two sections of code that I've currently got. The first chunk, for the Tags portion, sets the position for the "percentage" text field using a good old x and y method. The second chunk, for Titles, is setting the position for the smaller "title" text.
//evaluate tags
private function evaluateTags():void{
for (s=0; s
[Code]....
View 1 Replies
Feb 3, 2007
Currently I'm using javascript which works fine to pass text from textfield A to textfield B:
Code:
window.onload=function()
{
document.forms.form1.shirtText.value=document.forms.form1.KitGroupID_16_TextOption_38.value
}
Is there a way to pass the textfield A text to a dynamic text input (flash) as I'd like to use the font embedding flash offers. I can make it work when loading a value from a txt file but I'm not sure how to access the value identified above as KitGroupID_16_TextOption_38 and make it appear in a dynamic input box. Eventually I might want to have 3 font choices for the user but I'd like to just see if I can get this working properly first.
View 1 Replies
Jul 17, 2003
Is it possible to login through flash using one Dynamic Text Field and one Input Text Field and no buttons? If so how? I have seen many tutorials dealing with logging in to PHP using flash but it requires you to make your own php scripts which i am not familiar with. Can some one tell me how to do this with PHPBBs existing php scripts... I want to be able to login thorugh a Input Text Field box and have it verify it in PHP and also be able to register and view other PHP info such as users online and FAQ..
View 2 Replies
Jun 8, 2009
i have a problem with the line space flash creates when a dynamic text is loaded in a dynamic text field on the stage i put a dynamic textFild with istance name "profile_text". then im loadin in it a text. my text is written in the Notepad like this
[Code]...
i already set a Textformat to my dynamic text with i tryied to play with the "Leading".. but i think it something dealing with paragraph. how i can decrease spacing between paragraphs??
View 4 Replies
Oct 14, 2011
All I want to do is add text from my string to dynamic text field when I click dynamic buttons. What should the as code be for this? Here is my code. Right now I just have the click returning another shape.
[Code]....
View 2 Replies
Dec 16, 2010
What I'm trying to do is to write something in an input field and then it should show up in a dinamic field. I can make this happen, but the problem is that the dinamic field shows its new text in the same format as the Input field. For example, the input text is written in TimesNewRoman and the dinamic text is in Arial, but when the dinamic text shows the input, the text is still in TimesNewRoman when I want it to be in Arial.
View 11 Replies
Feb 10, 2011
I am facing problem related to TextArea auto wrap. I used the following code I found on net to fix this however it is not working.
addEventListener(FlexEvent.CREATION_COMPLETE,onCre ationComplete);
protected function onCreationComplete(event:FlexEvent):void {
//textAreaControl is the id of the control you want to resize to contain it's text.
updateSize();
} protected function updateSize():void {
if(mx_internal::getTextField() != null) {
[Code] .....
View 2 Replies
Feb 10, 2011
I am facing problem related to TextArea auto wrap. I used the following code I found on net to fix this however it is not working.
[Code].....
View 6 Replies
Feb 10, 2011
I am facing problem related to TextArea auto wrap.
I used the following code I found on net to fix this however it is not working.
[Code]...
View 3 Replies
Sep 28, 2010
I have 2 input textfields on the stage and 1 dynamic textfield.
-input1 is for quantity
-input2 is for page count
When a user enters a number into the page count it makes a calculation and places the outcome into the dynamic textfield. This textfield is for the individual price.All of this so far works. What I want to do now is create another dynamic textfield for the total. So the individual price is multiplied by the quantity and this result is put in the new dynamic text field. I have the code for that working but here is where it gets tricky (for me anyway).The total price is to start off invisible. When I roll over the individual price the total price is to appear (For a test lets just say when I roll over an area the total price appears).To stop cursor flickering this should be done inside a movieclip. So... I have create a movieclip and placed a dynamic textfield inside it. They all have instance names BUT how do I reference it in script?I need to tell the resulting calculation to be placed inside the textfield which is inside the movieclip. If it isn't inside a movie clip I can do it. But how to I reference it when inside one?
View 1 Replies
Apr 24, 2010
Problem: I am trying to get a very simple text resize going, for my main content area in a flash website. My aim is to get a button, that on click, increases the text size of a dynamic text field.
[Code]....
This is what I tried, I am very new to Action Script, so excuse the futility of my code.
View 1 Replies
Jul 17, 2010
I'm trying to input a dynamic text field into many dynamic movies. I use a for loop to successfully create 18 movies. I can't seem to get the text to be input dynamically however. The dynamic text field in the dynamic movies is named eventText. This code in the for loop successfully creates 18 movies:
[Code]....
View 1 Replies
Mar 21, 2009
I am using buttons with a dynamic textfield and a function to set the label for various different buttons:
public function setLabel(thisLabel:String) {
visibleLabel.text = thisLabel;
}
I set a label for each button:
btn_mc.button1.setLabel("2 | Al Sabkha Bus Station - Al Qusais Police Housing");
I have a dynamic textfield ... myText ... which I would like to use as a page title ... so once the button has been clicked, the dynamic textfield should update with the label of the button clicked.
View 1 Replies
Nov 14, 2010
I have the following code to populate a dynamic text box:
Code:
myData = new LoadVars();
myData.onLoad = function() {
trace ("The text box before autosize is: " + sailing_txt._height);
sailing_txt.htmlText = unescape(this.myVariable);
sailing_txt.autoSize = true;
trace ("The text box after autosize is: " + sailing_txt._height);
};
myData.load("sailing.txt");
The output of this is:
The text box before autosize is: 388.25
The text box after autosize is: 712.5
My problem is that I need to get the autosized height instead of the regular height of the text box before autosize. In a parent movie clip I have the following code to do some custom scrolling:
Code:
contentHeight = _parent.scrolledMC.sailing_txt._height;
trace("The content height is: " + contentHeight);
The output of this is:
The content height is: 388.25
So it's getting the size of the text box before it's autosized.
View 2 Replies
Jul 26, 2005
I have a project where i am using a dynamic text feild that loads up text i hard-code into AS (since it wont be updated). My problem is the field wont load up the text.I should also state that this project i am using is using screens (?). It wasnt created by me so i dont know how to go about fixing this problem.
A thought would be coding the AS to make the text field work in a sub-timeline (by using _root or _level0?) I just dont know enuff about AS to change it.Here is the AS i have on my movie clip that contains the text field that loads up the text:
onClipEvent (load) {
daTextBox = "Insert text here";
scrolling = 0;
[code]....
what to change to make it work.
View 4 Replies
Nov 3, 2011
What code can I use to shrink a piece of text in a dynamic text field to fit within a certain height and width.
View 1 Replies
Sep 1, 2007
I have a text inside a xml file and i would like to display this text in a dynamic text field, using the xmlConnector.The files are at the following address:[url]............
View 1 Replies
May 16, 2010
How do I center text in within the border of a multiline Dynamic text field?
View 3 Replies
Jun 10, 2010
Im using a standard font (Gotham rounded) within a dynamic text field. As soon as I embed the numerals within this text field the text lowers within the text field.Double clicking the field then renders the text higher up! It seems that the height it shows when I double click is the height it compiles atThe other strange and annoying thing is that my colleague working on the same project is using the exact same font and same file but this doesnt happen to him and so the font redners out differently when he compiles
View 1 Replies
Oct 26, 2010
I'm trying to use a dynamic text field to pull in html text that contains a bulleted list. Easy enough, that works. But the bullets dont take on the color assigned to the field. I've tried putting it in the html text and also using NewTextFormat and neither work. Can someone help me. This should be a simple fix, but I can't find it... I just want my text and bullets to both be white.
Simple code below. Using html text inside the flash document and having a dynamic field on the screen named txt. Code should turn text and bullets green, but it doesn't work, only text turns green
this.txt.html = true;
var my_fmt:TextFormat = new TextFormat();my_fmt.color = 0x00FF00; // hex value for green
this.txt.htmlText = "<P> This is the first paragraph</P><BR><UL><LI>Bullet 1</LI><LI><BR>Bullet 2</LI><LI><BR>Bullet 3</LI><LI><BR>Bullet 4</LI><LI><BR>Bullet 5</LI></UL>";this.txt.setTextFormat(my_fmt);
View 7 Replies
Jan 16, 2011
So, I have some basic actionscript code. It's a legacy site, so I'm using AS2. The line of code simply does this:
myField.text = "some text"
So, I select the text field on the stage, then ensure the font is embedded. All the glyphs I want are checked, but then when I compile and test, the fonts don't show up when the code is executed. Instead, the textfield is blank! What happened?! Where did the text go?
I should mention that the .swf which I compile is loaded into another parent .swf during runtime. If that parent .swf does not contain embedded fonts, is that why it's broken?
View 1 Replies
Jan 30, 2012
I made a scrollbar, but now I have a problem, need to read the number of lines of Dynamic text field and if it is greater than x show the scrollbar and hide if is less. Like this:
if(text.instance>7){
scrollbar._visible = true;
}
else{
scrollbar._visible = false;
}
My problem is how do I count the total lines of dynamic text field after load a external text.
View 20 Replies
Mar 2, 2011
I am working in Flash CS5 and I have placed a text field (dynamic, classic text) on the stage. I am accessing it through Actionscript on the same frame like this:
var ct:TextField = TextField(getChildByName("Temperature"));
ct.text = "Hello world";
What ACTUALLY appears is this: So... The H, Ls, and D are gone. Mysteriously. Without warning. I am sitting here utterly confused. Is this just me?
PS. The text field is set to Myriad Pro Bold, a font on my computer, so it isn't like it's a font problem.
View 3 Replies
Mar 18, 2011
I have many countries like netherland,italy,beligum etc.. I am creating empty movieClip, inside that empty movieClip am creating dynamic text field and assigning the different countries text.. but that font is not dispalying as such in the text Field..
View 9 Replies
Nov 9, 2003
I know this is a tutorial on this site but I'm having trouble finding it, and its been a while so I can't remember exactly how to do it. I just need to make a dynamic text field that you can edit via text file.
View 12 Replies
Feb 14, 2005
I have a dynamic text field that displays text from an external file. The text file has lists of text such as a1=(text here)&w1=(text here)& etcI want to be able to make a button so that will add one to the word count, such as, a button that says "Next" and when i do that, it loads the text string A2, when i click it again, it loads A3
View 1 Replies