ActionScript 3.0 :: Label Or A Control To Simply Display Text
Oct 5, 2010In AS3 do you have a label or a control to simply display text.Not a textbox type where you can enter text.
View 4 RepliesIn AS3 do you have a label or a control to simply display text.Not a textbox type where you can enter text.
View 4 RepliesHow can the text in a Label control (or a similar control) be wrapped in Flex 4 beta? In Flex 3 I could use the Text control but this is no longer available in Flex 4.
View 1 RepliesI have successfully loaded and parsed the XML data that I need. I would now like to build a dynamic symbol that displays the data. It is a list of managers. I would like to display their names, organizations, etc... I assume a label would be best, binding the appropriate XML node to the text attribute of a label? I'm not sure, but that sounds the most reasonable. I can't seem to find and examples of doing this in AS3 however. Does anyone know how I would accomplish this task?
View 6 RepliesDoes anyone know what I need to do to get a flex text control to display cyrillic characters for example. [wvxvw? hebrew?] In addtion to the main .swf (.mxml) file there are font libraries loaded that are also in a seperate .swf The text control is subclassed from Flex.Text and in a seperated .AS file. Then to top it, the actual text in cyrillic is coming from an .xml file.I've tried "<?xml version="1.0" encoding='UTF-8' " in the main .mxml file and the xml file. I believe I've put Byte Order Marks (BOM's) for utf-8 in the .AS file and maybe some of the other files. I've compiled everything with specifying the utf-8 encoding as well. I get nothing where the characters are supposed to be.
View 0 RepliesI feel like every time I need to use TextField or anything else related in AS3, it becomes a giant mess of code just for a few lines.I have tried using css as well for text but have encountered some issues where it isn't rendered the same on different servers/clients. Are there any text handling libraries that I don't know of or some other way to manage text in AS3?
View 3 RepliesHow would I go about appending (not just changing the entire text area to this img, actually appending) a simple 25x25 image sprite into a text area in a flex project? using actionscript? (not mxml)
(it has to be a spark text area component, mostly because this is a flex mobile project and thats all thats optimized for mobile)
edit: I guess I should have said this, i know html text is the way to go about it. But my real confusion lies with first it being a Sprite, so i dont have a url to link to. It's an actual sprite var (it would be a file sent over the network in bytes, and saved in a sprite object.) and then the second part where im lost is APPENDING it to the text inline, so it doesnt replace any of the text already in the text area, and will be scrollable in the text area.
also, remember im trying to append this to a SPARK TEXT AREA component. I know i could just make a text field instance and thats it, but i cant find any information about appending this to a text area
EDIT AGAIN:
SInce there was some confusion about the sprite im trying to append, this is how the image is being transmitted,
it's starting out as just a standard cameraphone image, then..
var fs:FileStream = new FileStream();
fs.open(new File(imageURL), FileMode.READ);
var bytes:ByteArray = new ByteArray();
[Code]....
So then finally I have the image in imageSprite... and that brings us to my main problem appending this image in a TEXT AERA spark component. With an end result that will have the look of a picture message sent on an android or iphone.
Got a client that says that Flash ( a panel that is pulling information from a database and simply displaying it in text field.) is not working in IE7. I told them that this is impossible as Flash is completely crossbrowser compatible. Am I missing something?? Is it a possibility?
View 2 RepliesI have created a textArea element but cannot display my HTML content. If I just display regular text it works or if I change the textArea element to a RichEditableText element it works fine. Since this is for a mobile app I would prefer to use the textArea element as recommended by Adobe.Here is the MXML code for the textArea. All I get is the border and no content displayed.
<s:TextArea id="myHelp" editable="false" width="100%" height="100%">
<s:textFlow>
<s:TextFlow>[code]..........
I have a flex project where I uses the spark RichText control quite extensively, there are places where it is possible for me to replace RichText with the Label control - (The rich text occurred due an import from Flash Catalyst). My question is, is there any space/performance advantage in using Label over RichText, since Label seems like a much lighter option, I am building a web app, size matters.
View 3 Repliesi'm in a situation where i need to iterate through each item in the list control and get the data from it.
how would i get a handle to an item at a specific index? I've tried getItemAt() but it throws error 1061.
appears to be a problem with masking text. Trying to embed it now. So, I have a button that I want to display a label movieclip on mouseover, yeah? -and the clip contains a blank dynamic textField with an instance name of "label_text". So, I have one of these clips as a private variable in the button's class definition, and the constructor passes the button's instance name to the label's constructor to set the text field.Unfortunately, the text will only show if I actually open up the label's clip in the library and type something in. Not very dynamic!
[Code]...
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);
[code].....
Is it possible to catch flash label's mouse click event?
mylabel.addEventListener(MouseEvent.CLICK, OnButtonClick);
Does not work
Or can it be done via an extends like
public class MyLabel extends fl.controls.Label {
// how to catch and dispatch mouse event? }
Is there a way in flex 3 chart component to display both the date and time using horizontal DateTimeAxis?
Currently the DateTimeAxis element has an attribute dataunits which allows to set the value to any of "milliseconds|seconds|minutes|hours|days|weeks|months|years" but I want to display the label as "2009/09/15 06:00:00" which includes the day and the time too.
[Code]...
I'm instantiating a group of RadioButton components into a Sprite and then later adding it to the display list. When the latter occurs, I can visibly see the font of the RadioButtons' labels changing from a serif to sansserif—but I have NO code to that effect anywhere. This occurs long after the components are actually instantiated, when they (via their parents) are added to the displaylist.
In Question_UI.answersContainer.answer:
answerUI = new RadioButton();
answerUI.group = rbg;
answerUI.label = text;
[Code]....
I've triple-checked the obvious, but there's NO code regarding the font of the label at all. It seems to only have to do with being added to the displaylist.
I want to make some buttons and use the buttons.fla library. The button is inserted and given an instance name. A second button is inserted (same kind) and given a new instance name. But when I am trying to change the label text in one of my buttons the text is changing on the other button as well. I believed they where separate instances?
[Code]...
I have some text selected in a text areacomponent. I get a callback from another program (externalinterface included) to remove the selection. How do i deselect theselected text and retain the text without selection? I have read onthe .selected, .editable, .setSelected etc, but Im not getting it.This same prob exists with a normal text input type, it doesntdeselect there too.
View 2 RepliesI have an AS3 flash movie and each page is a new frame. On my pages are dynamic scrollable text boxes that I created with the text tool. I would like to be able to make a piece of text a link (ex. click here for prices) so that it will direct the view to another page (label). I cannot figure out how to do so.
View 2 RepliesWhen you select text in a Text or Label or TextArea (or other) control in a Flex application, the selection is shown in white text on a black background. Always.
I have a request to change that — and it seems to be a simple enough thing to want — but I can't find a style (or property) anywhere that permits that. Any ideas out there about how to do this, or reasons why it definitively can't be done?
I imported an FLV video and selected a Skin via the Video import wizard. The Under... skin did not display. The Over... skin shows just a sliver of it at the bottom of the published video. There is also a black border about .38" high at the top and bottom of the video. The sliver of the playback control is over the lower border. I've tried resizing the video in the Publish Video dialog, using No Borders and nothing helps. Using Flash CS4 on Win XP. I used the AMEncoder to convert the MPG to FLV.
View 1 RepliesI have XML files formatted with XSL. They look great on IE.
Now how do I do the same with Flex (not AIR)? I would like to use something like TextArea and not data grid.
Flex's text-editing controls (mx:TextField, mx:TextArea) offer functions for doing "stuff" with the selected text (selectionBeginIndex, selectionEndIndex, setSelection), but the text-displaying controls (mx:Label, mx:Text) don't seem to offer anything of the sort.After some tinkering, I've tried subclassing Label then writing functions which give access to the underlying TextField instance... But even then, setting the selection didn't work![code]So, is there any better way to access/change the text which is selected in mx:Label and mx:Text controls? Are there "better" controls to use?
View 2 RepliesI am a complete rookie in ActionScript2.0/Flash.I just started learning regarding a project. My problem is I want to display data from MySQL in a DropDown Menu in Flash. the SendAndRecieve functionality only aids us to receive any responses,right?(Please correct me If I am Wrong.
View 2 RepliesI'm using the MX DateField control in Flex and want to display the date as 01 Jul 2011 or 01 July 2011. Does anyone know how to do this? I tried setting the formatString to "DD MMM YYYY" but it didn't work.
View 1 RepliesI am building an AIR application and I was planning to include the mx:HTML control but I can't seem to get the control to display. Here is the code:
var tmpHtml:HTML = new HTML();
tmpHtml.htmlText = "<a>This is the sample </a>";
tmpHtml.x = 48;
[code].....
I know how to display data in a List control using dataProvider but what about control that don't have dataProvider e.g. TextInput, Label contorl?[code]Try to use {dp.ID} and {dp.getItemAt(0).ID} on TextInput but nothing being display?How to make TextInput id=" first Name" able to display the SQL data?
View 1 Repliesi have made a list control. i want to display the name of the objects in it in a text control box
the code i am using here is
public function add(event:MouseEvent):void
{
var str:String;
str = mylistcontrol.dataProvider.getItemAt(0).toString();
[Code]....
The problem with this code is i am using index value of 0. however i want to display the name of object on which i have clicked or which is highlighted.
In one of the application I am working, List has been used. I am required to display items in the form of tiles. I do not want to change the component as of now. Is there any way to achieve this layout in list only.
View 3 RepliesWhat is the advantage of using mx:Text over mx:Label in Flex?
View 1 RepliesWhen a Validator (i.e. StringValidator, NumberValidator, etc) dispatches an invalid event due to validation failure, the errorString property of the source control (i.e. TextInput) is set to a non-empty string which creates a red border around the control and shows an toolTip (errorTip) ONLY when the mouse hovers over the control. Question: Can you force immediate display of the toolTip (errorTip) rather than waiting for the user to hover over the control? If so, how?
View 2 Replies