Put A Dynamic Text Field In Center Stage?
Mar 23, 2009I've managed to put a text field onto the stage using AS2 but now I'm trying to make it stay in the center of the stage. [code]...
View 1 RepliesI've managed to put a text field onto the stage using AS2 but now I'm trying to make it stay in the center of the stage. [code]...
View 1 RepliesI've managed to put a text field onto the stage using AS2 but now I'm trying to make it stay in the center of the stage. Here's the code I used;
Code:
this.createTextField("dynamic_txt",1,(Stage.width/2),(Stage.height/2),1,1);
dynamic_txt.text = "This is just a test to see if this works.";
var textstyle:TextFormat = new TextFormat();
textstyle.size = 18;
[Code]...
How do I center text in within the border of a multiline Dynamic text field?
View 3 RepliesI 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?
I was wondering if there is a way to auto resize the swf to fit a dynamic text field. I am doing a site and have text coming in from XML. some of the pages have a couple paragraphs where as some are much longer so when it is published the pages that have more text gets cut off.
View 4 RepliesI have been looking around for a long time to find a way to create a dynamic text field added to stage using as3 that is arched.I have seen this done in other sites but have had a hard time figuring out. Does anyone know of a component other than Text2Curve that is available? Has anyone already written something that arches a textfield that they would share?Arched text in flash seems to be impossible.
View 2 Repliesi have a dynamic text field on the stage called texter, how can i make this work?:
ActionScript Code:
texter.text = "change case";
texter.toUpperCase();
I am using a gallery written in AS3.0 called SlicedCubeGallery. It used Flex to publish the gallery.I can edit the functions for the SlicedCubeGallery, and the one I am targeting is the one that swaps the images (which I have running on a timer).I am loading the whole gallery SWF onto my stage using this code:
var request:URLRequest = new URLRequest("slicedCubeGallery.swf");
cubeGallery_mc.load(request);
addChild(cubeGallery_mc);
[code]......
- I put 3 dynamic text field to stage. I selected Verdana both of them and select bold and italic for other 2 field. after that I created a textfield.
.embedFonts = true;
assigned "Verdana" font as TextFormat.
and when I assigned a htmlText to my field like that :"<b>this is bold</b> this is normal". I use Flash CS4, AS3
I'm trying to access a text input that I've already placed on the stage (inside a movie clip) but with no luck.I've defined an instance name for this dynamic text field which is currentUserCount.I've got something like this set up in the document class actionscript file:
package {
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;[code].......
What am I missing? When I run this I get:
1120: Access of undefined property currentUserCount.
1120: Access of undefined property movieClipName.
1119: Access of possibly undefined property movieClipName through a reference with static type flash.display:DisplayObject.
1120: Access of undefined property currentUserCount.
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 RepliesI'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]....
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.
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 RepliesI am having a problem with my text alignment and I can't figure out a way to correct this. Unfortunately, I'm using a mac with CS3 and a Windows computer with CS4, so it could either be an OS difference, a version difference, or a software bug which I can't figure out.
For some reason, the text on my Mac with CS3 are not in the vertical center of the text fields. This causes a problem with my "align vertical centers" alignments, meaning I've had to do the alignment by hand to get it to look right. When I moved my file to my laptop to keep working on my project at home, I noticed that the text alignment was correct on my laptop, causing all of the text placement throughout my document to be off. This means that I can only work on the one computer and can't bring the project home to work through the weekends.
I have made an image showing the difference of how the text is aligned on the two versions, and a sample of how it affects my project when i bring it between computers.
I made the file on the mac (CS3) first, and so the alignment is designed to look correct on there. When i bring it to the PC (CS4) the text shifts down, placing it back in the center of the text boxes and ruining the alignment.
When I publish the file it keeps the formatting of each system. IE - publishing on the mac makes the final product look like it does on the mac, and publishing on the windows computer makes it look like it looks on the windows computer. The file published from the mac has the mac alignment on both computers, and the file published from the pc has the alignment of the pc on both computers.
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??
I got a video background where I have a button (which is a movie clip) inside the button I need to have a movieclip to be centered on the stage. My stage is dynamic and therefore changes according to the browser of the user.
I tried the following:
notice.x=stage.stageWidth/2
notice.y=stage.stageHeight/2
but it places it almost out of the stage...
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]....
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 RepliesI've used the following code to create a textField and style it with a little CSS my problem is the textFeild is as wide as the stage and I want to center the text so its in the middle of the stage but when i use the css attribute textAlign the text is almost all the way to the right instead of centered
PHP Code:
var msg19:TextField = new TextField();
msg19.width = stage.stageWidth;
msg19.height = stage.stageHeight;
[code]....
I was wondering how to center dynamic text in a text box?I tried setting the TEXTINSTANCENAME.html object to true, and then setting the TEXTINSTANCENAME.htmlText to text wrapped in the <center> and </center> html tags, but it didn't work. The text is still too far to the left.
View 1 RepliesI have this news scroller for work - Vertical member (160 X 600) And the idea is that it has 3 text fields (Headlines). These fields are lined up vertically (one at the top of the scroller, one at the middle, and one at the bottom.). I load them dynamically from XML, and after about 5 seconds, I have them all move up. (the top one goes up the top, and comes back from the bottom, the other two move up). The problem is that I am trying to center justify them, and it is giving me problems. When they're loaded I can center justify them, using this code:
Code:
MovieClip.prototype.centerFunction = function() {
format = new TextFormat();
format.align = "center";
[code]....
Now, when they are first center justified by the code, they look slightly off, and once they move they arrange themselves correctly.
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.
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]....
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.
In Flash 5, How can we center the text in dynamic text box with html property selected? I used center tag and also align attribute in font tag, but I couldn't get text in center.
View 3 RepliesI have this news scroller for work - Vertical member (160 X 600) And the idea is that it has 3 text fields (Headlines). These fields are lined up vertically (one at the top of the scroller, one at the middle, and one at the bottom.). I load them dynamically from XML, and after about 5 seconds, I have them all move up. (the top one goes up the top, and comes back from the bottom, the other two move up). The problem is that I am trying to center justify them. When they're loaded I can center justify them, using this code:
Code:
MovieClip.prototype.centerFunction = function() {
format = new TextFormat();
format.align = "center";
_root.news2.headline2_txt.setTextFormat(format);
_root.news3.headline3_txt.setTextFormat(format);
_root.news1.headline1_txt.setTextFormat(format);
}
Now, when they are first center justified by the code, they look slightly off, and once they move they arrange themselves correctly.
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 RepliesI 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 RepliesIm 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