Is there a way to take out a part of the text in a string? Like start 7 characters inti the string and end 2 from the end of string. Something like: string="hello how are you today?"; So when done weare done with it the things left in the text is: "how are you toda".
I want to add another short string inside it... (for example : 01 or something). But this short string always has to apear just before the dot, like:
image01,jpg picture01.jpg photo01.jpg
I already found out how i can add a string inside it... but when the first string is longer the second string ofcourse doesn't show up on the right place..
I'm creating Flash-based software that has text boxes where users write in the answers to questions. I want the text that the user types to be vertically aligned to the middle of the text box, so that even if the response is two or three lines, it is still centered in the box.
It doesn't appear that I can accomplish this through the properties window in Flash. Am I missing something? Or is it possible to set the properties of the text box with actionscript, and would that allow me to vertically align the text?
how can i middle a text in the Textfield that is 100px by 100px so that when i have 1 line its in the middle, when i have 2 lines its in the middle as well check attachment. when i do it right now it is always on the top i basically would need the same as when i have a HTML table by default so it is horizontal in the middle.
I have a problem with truetype font "DaxComp-Medi" and with some timeline and actionscript positioning. I have a mc in which I have another mc in which I have a circle in which I need to put the text in the center but that is not that easy.
Structure:
ActionScript Code: mc1.mc.mc.txt mc1.mc.mc.circle
[Code].....
So is there some way in as3 to get those numbers in the center of the (white) circles?
Do I need to convert the TextFields in to the BitmapData (how?), find positions of pixel that has some black color (How?), draw rectangle with that information, copy x and y point of the rectangle, center the rectangle in the circle, calculate offset x and y from the rectangles new position and add them the textfield x and y?
I am willing to use Macromedia Flash this year to make my physics project. Well, its going to be force resultant calculator. for ones dont know how it gets counted.
Well, I'll make 4 input text boxes, and a button in the middle. 1 text boxin the north, (power effect the body from the north) one on the south, one on the east and one on the west.(I've done that part).
Then, ill need it to subtract the north - south and east - west on(release), and display that on a dynamic box called Fx (east - west) and another called FY (north - south) Finally, I'll need it fethagorth the Fx and FY to give me the final force resultant. I've done the 4 input boxes and a button, I'll still need someone gimme the action script for subtraction and fethagorth (or atleast teach me how to do it).
If I want to align things vertically in a container, I'll use verticalAlign="middle", but this doesn't exactly solve the problem of truly aligning text vertically. Text is always too high vertically, so in the past, I've just adjusted paddingTop and paddingBottom to compensate, but that doesn't work as the font for _sans differs from operating system to operating system.
Given the following layout code, you'll see the problem:
What happens is pretty clear. The horizontal line gets aligned to the exact middle of the box, but the text is offset by some arbitrary amount. I assume that this is because of the text baseline alignment or something. Is there a way to fix this regardless of the font size and face? I'd like to have the line essentially go right through the middle of the text, ignoring the extra space possibly needed for below the logical line of text (ie: ignore the bottom part of "g's" and "j's" when laying things out).
I need to make the "rcheck2_txt" rotate 180. With this script it does what I need. But currently the centre point is in the top-left corner of the dynamic text box. How do i change the X Y cordinates so the centre point is in the middle of the dynamic text box?
I made an effect in swish and i saved it in to an swf file i want to load that swf file in to my flash movie in the middle in which i have some text's and pictures
Basically I'm trying to output the contents of an XML document into a dynamic text field (as loaded - not just its node values and content - the entire thing - into a variable called _root.log). The text field is set to show the variable value of _root.log.This is the actionscript...
PHP Code: var newProfileXML:XML= new XML("<contacts result='true'><contact name='John Doe'/><contact name='Jane Doe'/></contacts>");
I have a very general requirement that seemed very simple: Step 1: Load a new external JPEG image into a MC with a string var encoding a string caption in the URL link (VALUE="../fadeTest.swf?someTextVar=TestCaption") within the EMBED / OBJECT sections. I know how to do this and it semed to work fine. STEP2: When the JPEG is loaded I would like the substituted Text to Fade In over the JPEG. The JPEG should also fade in before the Text. The fade rate should be programmable.
i need to do a form composed by a text field and a button.on the press of the button i should output a string that is composed by a default part (ie: http:url...) and by the text inserted in the text form (ie: hello) in order to obtain a string like this one.
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.
i'm unsuccessfully attempting to assign a textFormat to two different parts of the same string, but the second time it doesn't register and remains the default text format. both styles (regular and bold) of the font are embedded.
On stage I have three input text boxes each with an instance name of w1, w2 and w3.On running this:[code]So, I'm trying to set up multiple input boxes and get each text string to concantonate in another string (like a MadLib)
I have an "input text" a "dynamic text" and a button.when I insert a string in input text box and click on button, my actionscript should search in string and if there is a character like "%20" should replace with character "K" and then the result shows in dynamic text.How should I use the action script for this target?
I have a dynamic text box called "tbNotes".I need to be able to see if the text box contains a website address. If it does contain a website address, I need to have a movieclip called "hilight" appear over that text.I have been messing around with this for a while but can't figure out how to search the text box to see if it contains "www." Then if it finds the "www." then make the "hilight" moviclip visible and start at the x position of the first w and the width end at the end of ".com".
I want to add a newline to a string text and I was wondering if there is a newline constant in actionscript 3? For example in .net there is an Environment.NewLine that is a string, containing " " for non-Unix platforms, or a string containing " " for Unix platforms.
I have a list control in a component mxml file. I have created a function in main mxml file, I want to input a text string and add it to this list. How can I do that. Currently using this code public function add(event:MouseEvent):void { var name:String = mytextinputid.text; currentState = 'ChatScreen'; mylist.____ } Note that this function is in main and the mylist list control is in component mxml.