I'd like to know if it's possible to format the text for a variable. Basically, I'm grabbing data (which has no formatting), placing it in an array. Then displaying it in a dynamic text field.Before putting it into the array, the only formatting I've done are line breaks. I simply want to make the first line/variable bold-faced.Here's the pertinent sections of my code:
Trying to format input text fields using format buttons in Actionscript has been challenging. I've been able to put some pieces together, however I am still missing some things. Here's my code:
Code: function selectText() { startSelect = Selection.getBeginIndex();[code].........
I need the ability to click the Bold button and it bolds or unbolds at the cursor so if I hit the bold button what I type from that point on will be bold until I hit the button again and then it goes back to regular. I am able to change it to bold or unbold by selecting the text and clicking the button but I also need to do it without selecting.
//sample datetime var output: 2006-06-31 12:00:00 this is the output I get from the variable I'm importing via FlashVars they variable input format is: 2006-06-31 12:00:00 thats exactly what it looks like coming from the php sctipt
I need to break it up into the year, month, day, hour, mins and sec
how I can split it up to use here with these variables eventDate = new Date(yearDue, monthDue, dayDue, hourDue, minDue, "00");
When applying text formatting to a comboBox, the text formatting appears perfectly on the dropdown menu items but the textField text disappears.Removing the text formatting from the textField makes the textField text reappear but of course there is no text formatting. Is there a trick to this.
I need application with input text box and a button, user is able to write into the input text box, and when he press button, the written text will save on a text format file on server (like a notepad with .txt extension) and if this file exist before new information will over write!
Noob question, I hope. I need to create scrolling text areas with rich text format content. I know I can use the textArea component and set the htmlText property but converting all of my RTF to HTML is gonna be a major pain in the @$$. I keep getting into trouble thinking what's mindlessly easy in Director/Lingo is gonna be reasonably simple in Flash/AS3, I hoping this is just my inexperience with Flash getting in the way. Is there an easier way? I thought of embedding a PDF document but apparently that's not an option in Flash either (note: I know how to link a PDF doc, I need this text to display and scroll within the application, not just pop a new window on top).
While coding, I wondered if a plugin exists that I could highlight a series of variable declarations, hit some special keyboard shortcut and BAM! They would appear in alphabetical order.Is there anything that does this in Flash Builder? Or FlashDevelop even?So it would go from this:
private var _value:Number; private var _helloWorld:String; private var _foobar:Boolean;
To this:
private var _foobar:Boolean; private var _helloWorld:String; private var _value:Number;
I have a text field where user can type and few controls to customize the text properties like: font, size, color etc.If a user has typed say "Hello World", the caretindex is next to d of World. I want that if now the user makes some changes to the cusomization properties like: changes font size, then the text appearing next is of the font size set and not that of d. How can I do that?
I have one dynamic text field in the instance name my_text. I have set the Embed option in that file. because i need to rotate the text field. Now I need to change the font format of dynamic text field.[code]...
I'm reading text from a text file and displaying it into a text field. The problem is when i read it doesn't display the text as it is in a text file. For ex - See below imageNow , as you can see, second line in the text file starts right where first line ends.But flash doesn't display it like that. I have hundreds of lines and in most cases flash spaces consumes less space then a text file. The font in both text field in Flash and notpad is to Arial so the font shouldn't be a problem.
I have text that is in a scrollable box using the scroll bar component and I would like to be able to format headlines differently than the main body copy, etc. How do I do this? The text is dynamic, multiple line.Was hoping not to have to use external files.
I'm importing text via an XML file that will then be displayed in a dynamic text field. The text is about 1 sentence long but one of the words in the sentence must be bold and a different color. So I've added some HTML tags in the XML node to change the color and format but when I test the file the html tags show in the dynamic text field and the text is NOT formatted.
Here is my code:
I bring in the XML data with this AS3 code:
ActionScript Code: var _xml:XML; var _xmlList:XMLList; var _xmlLoader:URLLoader = new URLLoader();
[Code]....
Am I not using the CDATA tag properly? Or do I need to change something in the way I call up the data in the xml node ?
i have to set the text format for some tokens in a plain text. I'm trying to use the Text Layout Framework to improve the speed of the operation but i've founded that TLF is far slower (10X in my tests) than the old setTextFormat(). For each token i call this function:
public function setTextFormat(format:TextLayoutFormat, begin:int, end:int):void{ var selection:SelectionState = new SelectionState(this._textFlow, begin, end, this._normalFormat);
I am presently using the text tool to draw out a text box on stage (classic text, input text - the end user needs to be able to change the text inside the text box). the instance name for the text box will be called borderText. i need to use buttons to change the size of the text, the color of the text and also change the font style. have been playing around with it, but having mixed or no results. i need someone to help me get started.
found that code to display html format text to dynamic textfield in as3:
var url:String = "http://edeejay.dyndns.org:8000/currentsong?sid=1"; var loadit:URLLoader = new URLLoader(); loadit.addEventListener(Event.COMPLETE, completeHandler);
I'm using CS4 AS2. Should I just use CDATA tag within the XML is this the easiest way? I have 32 swfs which are each loaded to a holder at different times. Do I use code to format the text? The boxes exist in the swfs already.
i have read one of the tutorial about css in flash my dificulty is. instead of using this variable
[Code]...
that i put inside the fla like this output.htmlText= quick= my_xml.firstChild.childNodes[0].childNodes[0].childNodes; its put the right text but without css format.
I am struggling with TLF text, I searched and searched and can't find a GOOD tutorial or complete method on how to format TLF text with AS3, I need to:
- Load dynamic text into dynamic TLF text field
- Set custom fonts
- Set formatting including letter spacing, margins, leading, sharpness
- Set links, link hoover color, link decoration
- Get a method that supports HTML tags (those supported by Flash CS5)
Can you please suggest a good site, tutorial, book, e-book that explains all the steps needed to set, format and control TLF text? I need something that explains how to do this, logically, step by step, I'm a designer not a programmer
is there a way to format text within a text box? I put a dynamic text box on my page and I added the text through Actionscript 3(News_text.text = "this is my dummy text";). Can I add <b></b> to this text to make it bold or any of the other html codes?
how to publish live video feed from webcam in h.264 format non VP6 format with FMS 3.5.2 without using Flash Media Live Encoder, and how to set all parametersto have a good quality and smooth video without interruption, i have a server with 50Mbit bandwidth output enough for a publisher and 10 clients meunderstand this thing's been months since I try but the quality ugly
I have a textField inside a mc. When you roll over an event is triggered.
In the fuction I can do thisCode:event.currentTarget.getChildAt(0).text="fred";and the text changes - so its being targettedI want to change the format of the text so I thoughtCode:event.currentTarget.getChildAt(0).defaultTextFormat=mTitle_fmt;but, its doesn't work.it says "ReferenceError: Error #1037: Cannot assign to a method setTextFormat on flash.text.TextField.at index001_fla::MainTimeline/overHandler()"
I want to display text in textarea in two columns. [code]...
Depending on text width in Column1 text in Column2 will be shifted. So all rows in Column2 are going to be aligned. How can I do this without html <table>?
I have two arrays "array1" and "array2". I load the values in array1 by reading mages1.txt and load the values in array2 by reading images2.txt.The following is the code for reading the text from file "images1.txt" and loading into array1.Images1=a1.jpg|a2.jpg|a3.jpg|a4.jpg|a5.jpg|a6.jpg
m = new LoadVars(); m.load('images1.txt', this); m.onLoad = function(ok) {
ext format to a particular text field.and after some time i need to change the same text into another format...is there any way to do???i diid in the normal way..but was not working.the code is like..
Code: myDefaultHDecor = new TextFormat(); myDefaultHDecor.underline = true;
I have a static text box with headers in one color, text with other color, and in this text there is also bold text and normal text, some of which are hyperlinks.The problem is that, when i render the movie out, flash creates line spaces between paragraphs, when there aren any spaces, it put all the words in the same line with the same weight, when theres is two diferent weights, and theres a hyperlink that doens