ActionScript 2.0 :: [Flash8]Input TextField Align - Put Information Dynamically?
Jan 11, 2007
I have an input text field, with only one character and aligned to left, where i put information dynamically. If i put the character from actionscript, it doesn't align as it should. If i manually enter a character then it aligns well. After i manually added the character, if i try to add it from actionscript too, it aligns correctly. The font i use is created by me, and all the letters are aligned the same way. I embedded the font.
I have a web page with a couple of Flash Input TextFields. When I press a button on my web page, I am using javascript (jQuery) to get all the values from the text fields and checkboxes etc on the page.
In order to get a value out of my Flash TextField, I understand that I have to use the ExternalInterface API. I am using ActionScript 3.0 and Flash CS4.
In the flash IDE, I have a layer with just the textbox instance and another layer 'actions', which has all the actionscript.
As soon as I put: import flash.external.ExternalInterface
in my code, then the textfields full functionality does not seem to work on the webpage.
I assumed what I had to do was something like:
import flash.external.ExternalInterface; ExternalInterface.addCallback("getFlashFieldText", getText); function getText():String { return myTextField.text; }
then I thought that perhaps I had to call a javascript function to return the textfields value like so:
function getText():void { var word:String = myTextField.text; ExternalInterface.call("alert", word); }
but nothing is working, and I think it is strange that the textfields functionality (some letters being styled) does not work as soon as I import the ExternalInterface class. I have tried putting the ActionScript 'actions' layer in a package, but it didn't help. As you can probably tell I am new to Flash and Actionscript, and I would be very greatful if someone could point me in the right direction.
I have some text that says go to page with a input textfield box and a go button. This is a flash cs4 file.I want to have the user input the page number and have it go to that frame.I am using actionscript 3.0 and have bought 4 books and researched online and still can't find what I am looking for.I can make the go button go to whatever page I want I just don't know how to get the information the user put in the box.
We have a for loop creating text fields from arrays.
We have four arrays.
First three arrays create dynamic textfields getting their data values from a xml file.
The last array creates empty input textfields where the user enters the data.
What I'm trying to do is to send the values of these textfields to a PHP file.
The problem here is that I'm not being able to get the updated data of dynamically created input fields,which is the data that the user(visitor) enters.
I'm creationg a full screen projector presentation and i'm havin issues with the stage align on full screen. it opens in the middle of the stage and is chopping off the top of the large stage. does anyone know the as2 for Stage.align="T"; ?
I am reletively familiar with XML and how to load them in flash, but I have a new kind of file, XMP, and I was wondering if it could be loaded and used in flash similar to XML. My XMP's are automaticly generated by the new Adobe Lightroom software and look similar to XML's - a copy of a file below
All the XMP's are created the same with just the information changed and have the same name as the image the information is about. So can flash phase this kind of file? I want to use some of the information in an XML gallery with details of the pic shown from the AutoGenerated XMP file (current relevent info highlighed). Has anyone attemped to use XMP metadata in flash?
To simplify what I said above Every pic has an xmp file of the same name in the same folder as the pic. I want to use the generated information to display details about the image in an information box I am yet to create . The highlighted information is what I need to load at the moment but other information may come in handy when i get the page developed.
Let me see if I can explain this clearly. What I am trying to do is pull information from a seperate file into Flash to be used as variables. I have read several places that Flash cannot pull info from Excel, so that is problem number 1: How can I store the information in a spreadsheet-like file so that Flash can access it. Then I would like the program to use combo boxes to access that information. Say I am going to draw a shape, the first box would choose the shape (ie Square, Circle, Rectangle, ect); this would then determine what would be in the next box.
So if my squares could only be red, purple, or green and my circles could only be blue, pink, or orange and my rectangles could only be black, white, or yellow. If I choose rectangle in the first box, I need the second box to list the three colors available for that shape.
I am loading an image into an html textfield. The image loads fine, my problem is that Flash keeps wrapping the image in a <p> tag, so the image is never aligned to the top of my textfield.
In a card game I use a TextField in the middle to display the playing table number, but also to detect if a playing card has been played - using myTextField.hitTestObject(myCard) - which means the TextField's position and dimensions may not change:
My current AS3 code is:
var format:TextFormat = new TextFormat(); format.color = 0xFFFFFF; format.size = 30;
[Code]......
However the TextField's content (the String "#2029" in the above screenshot) is not in the center of it.
I can not set _middle.autoSize = TextFieldAutoSize.CENTER because this changes the width of the border (and breaks hitTestObject()).
Is there another way to align the text in the middle?
I'm trying to make a Dynamic TextField and set align to 'Justify'.I tried use align propriety from TextFormat but doesnt work.Until now, it only works with Static Texts, that I know.
I'm trying to make a Dynamic TextField and set align to 'Justify'. Anyone knows some tip to do it? I tried use align propriety from TextFormat but doesnt work. Until now, it only works with Static Texts, that I know.
I am making an array and I would like for the array to gather the information from an input box inside the array. How would I get the so called array to add the information from name_txt? Actionscript Code: var word = new Array("Hello" + _root.name_txt,"How are you today?");
I'm working on a project so as to hopefully learn AS3 a bit more, and for it what I have for it currently is that it looks at the time, and if its between 8 pm and 8 am it imports one mc, or if its between 8 am and 8 pm it imports another. My problem at the moment is that I can get it to import it and align it at the needed x coordinates, but not the needed y coordinates. I'm not sure what the exact y coordinates are, but as in the future they might change, I was trying to find a way to align it so that the very top side of the mc to the top side of the stage, but so far I have had no luck, as I can't think of what would be needed. I've seen references to a "StageAlign._______" before, but either I'm not using it right or it isn't the right thing to use.
Here is my code right now: ActionScript Code: import flash.events.* import flash.display.StageAlign; import flash.display.StageScaleMode; var time:Date = new Date(); [Code] .....
How do I snap/align objects dynamically? For instance, if I have an image loading dynamically and a text box directly below, I want the text box to always touch the edges of the image loaded (regardless of the image's size).
I've made a flash page with user input for email and comments. The thing is I am working with a aspx.net server. The programmer has written out a aspx coding for the server side. Now all i have to do is write a script in the input fields in flash to connect to the aspx server. The progammer said that I would have to create variables inside the flash program to call to the aspx page he created. I am faily new to aspx and have no clue to writing a script with variables.
I have created a slideshow, in which image is loaded dynamically from a xml. the issue is the images gets aligned to left ,top position by default. i want it to center align.
I have created a slideshow, in which image is loaded dynamically from a xml. the issue is the images gets aligned to left ,top position by default. i want it to center align.
Have an Input textfield and write e.g. 123 in it (This is on frame 1).Then later in frame 3 I want that number to be shown in a Dynamic textfield.How do I do that?
I want to load small thumbnails in my project, and each thumbnail presents a button.When I click on thumbnail bigger picture should show.I put information about picture in each thumbnail movie clip but when I click on thumbnail flash can�t see that information?
I have a movieclip (named "checklist")with a great number of input text boxes in it. This clip is used early in the my movie (frame 1) and again at frames 20 and 30. The problem is that in the later frames the information the user typed in the first frame is no longer there. Now I could use the var parameter and set it to _root for all of the boxes, but I've been told that the var parameter is a bad way to go. Rather, I should use the name option instead, i.e. "myText_txt". I tried experimenting with objects, but I am not a programmer and so I am probably doing this wrong.
[Code]....
So, I am looking for a best practice. Should I just use the var parameter? That way all of the text fields update when the movie hits frames 20 and 30.
I am going nuts here. I've searched exhaustively, and cannot seem to find anyone else experiencing my issue, so it must be something elementary I am not grasping. I'm creating TextFields dynamically, for use as input boxes:
Code: function makeText(whatParent, whatText, whatFormat, input){ var thisTextField:TextField = new TextField();
I need to create a login page in my flash site that relates to information input to a mysql database. after the submit their information we want to send them a link to a differnt flash page with a login screen they will use their first name and a password (already in our database) to gain access to this "new" page. on that page there will be a welcome message that says "Welcome, User First Name" so I guess i have two questions
1: how do i set up a login page?
2: how do i pull that login info to a welcome page?
This all works well, but if I've updated a user(s) information, I'd like for my scrollpane to be updated as well. Is it possible to update a scrollpane's source attribute?
I have an array of images and an input text box. I want to type something in the text box which will be different for each picture. For example the first picture may be an apple and the correct answer will be apple and so on. How do I check to see if the input is correct against the picture that is shown?