AS3: Flex: Work with text
----------------------
----------------------
Note: this is intended for those who are already well versed in AS3 code
a project without using text may not be possible, text is present in almost all games and applications, and therefore you need to learn how to work with text, let's create a regular project:
<?xml version="1.0"?> <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"> <fx:Script> <![CDATA[ ]]> </fx:Script> <s:Label text="Simple Label"/> </mx:Application>
if you run the project, you will find a Label on the screen, in order to convey what will be written in it, you need to use the text="" attribute or write in teg
RichText
but perhaps you want to create text that can have many different fonts, shapes and much more, here is an example:
<s:RichText>Hello <s:span fontWeight="bold">World!</s:span></s:RichText>
TextArea
but I think you will want to make large text fields where you can write text, here is an example TextArea:
<s:TextArea>Hello World</s:TextArea>
TextInput
You will also need to do single-line text inputs:
<s:TextInput>Hello World</s:TextInput>
RichTextEditor
And the most interesting thing at the end, the text editor:
<mx:RichTextEditor></mx:RichTextEditor>
all many elements in which you can write text have Scroll
Summary
in this lesson you learned about text elements that can be used in your projects
That's all for now, thanks for your attention, this is made for AS3 Main: Tutorials and Resources