ActionScript 3.0 :: Can't Change Text Format?
May 27, 2009In the fuction I can do this
Code:
event.currentTarget.getChildAt(0).text="fred";
and the text changes - so its being targetted
[code]......
In the fuction I can do this
Code:
event.currentTarget.getChildAt(0).text="fred";
and the text changes - so its being targetted
[code]......
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]...
View 1 Repliesext 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;
[code]....
I need to change the format of my Data Grid text (change the color, and the size, and so on). I was trying to use the CellRenderer class, creating a new one and assigning it to one DataGridColumn, but didn't work...When I try this code, some celds dissapear, and nothing is show but the last row. I just wanna change the text look in the DataGrid.
Code:
import fl.controls.DataGrid;
import fl.data.DataProvider;
import fl.controls.dataGridClasses.DataGridColumn;
import fl.controls.listClasses.CellRenderer;
//New TextFormat object...
[Code] .....
I need to use TLF textFlow to change the format of my text, I have links, italics, bold, paragraphs, etc. Is there a way to PUT the textFlow inside a textField so I can scroll the text inside the textField?
View 0 RepliesI need to use TLF textFlow to change the format of my text, I have links, italics, bold, paragraphs, etc. Is there a way to PUT the textFlow inside a textField so I can scroll the text inside the textField?
View 1 RepliesThe movie I am working on has a dynamic text field which I setup and format in the constructor of the ActionScript 3.0 class code for the movie - I am working with CS3 Flash. I do not reformat the text field anywhere in the code after the constructor.The text displays in the text field perfectly as long as I do not highlight the text when running the movie.
If I highlight the text in the text box as if I were going to copy and paste, the next time text is written to the text field the font type and size changes. The only way to reset the font formatting is to restart the movie.
Is there a solution or workaround? Of course I can reformat the text everytime I write new text to the textfield, but during the course of the movie text is rewritten to the textfield many times.
I have a master MC named "bodynews" with inside some texfields and loaders without instance names
Then i want to manage the color of every TexField nested in it. I don't know their positions and instance names, then i've wrote[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.
when sending a stream (stream - ns.publish ("livestream")) how to change settings, say the format for VP6?
View 1 RepliesI am making a website for a restaurant and i made a reservation form with a dateForm that sends the manager an email with the registration details. It all works fine, but when the date shows up on the email it shows like this: Mon Sep 27 00:00:00 GMT-0400 2010, but I want it to look like this: 9/27/2010.
View 0 RepliesOk here's the deal, I'm working with Flash MX and wrote this script:
Code:
timeDataObj = new Date();
localtime = timeDataObj.getDate();
[code]......
I bought a template and couldn't figure out the AS. The player_btn can load 4Songs but only in swf format and I'd like to change the the script to load as mp3 format but how to do I edit the script?
Here's the script written
sound_but7
on(release) {
gotoAndStop(2);
[Code].....
I have a number of graphical called "Arms1", "Arm".... "ArmsN".
I would like to change the colour of all the objects.
I have a _global.armColour variable that I would like to access and all the graphics to change to that colour.
How do I great a for loop to create N number of these:
armsColor = new Color(_root.ArmsN);
and set N number of these.
armsColorN.setRGB(0x000099);
N = say 10.
I have a number of graphical called "Arms1", "Arm".... "ArmsN".I would like to change the colour of all the objects.I have a _global.armColour variable that I would like to access and all the graphics to change to that colour.How do I great a for loop to create N number of these:
armsColor = new Color(_root.ArmsN);
and set N number of these.
armsColorN.setRGB(0x000099);
N = say 10.
I have been trying to solve this for a week now, sadly to no avail. I need to change the box format that this code puts my buttons into. I would like it just to be one line of buttons.[code]I have tried to change the btn.x to btn.x = i * 100 + 15; which put a second menu up for 1 sec before it disappears and leaves me with the original.
View 2 RepliesWhen 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!
View 2 RepliesNoob 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).
View 6 RepliesI 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?
View 1 RepliesI'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.
View 8 Repliesim using a custom component for date time, it is 12 hours and am/pm format,Now i wat to show 24 hour format in numeric stepper and am/pm should be disabled.heres my code
<mx:Script>
<![CDATA[
[Bindable] private var _selectedDate:Date = new Date();
[code].....
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.
View 1 RepliesI'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);
[code].....
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.
View 3 Repliesfound 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);
[code].....
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.
View 10 Repliesi 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