
TUTORIALS POINT
Simply Easy Learning Page 89
Following is the content of the modified mxml file src/com.tutorialspoint/client/CustomLogin.mxml.
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300">
<s:Form>
<s:FormItem label="UserName:">
<s:TextInput width="200" />
</s:FormItem>
<s:FormItem label="Password:">
<s:TextInput width="200"
displayAsPassword="true" />
</s:FormItem>
<s:FormItem>
<s:Button label="Login" />
</s:FormItem>
</s:Form>
</s:Group>
Following is the content of the modified mxml file src/com.tutorialspoint/client/CustomButton.as.
package com.tutorialspoint.client
{
import spark.components.Button;
public class CustomButton extends Button
{
public function CustomButton()
{
super();
this.setStyle("color","green");
this.label = "Submit";
}
}
Create a project with a name HelloWorld under a package com.tutorialspoint.client as explained in the Flex -
Create Application chapter.
Modify HelloWorld.mxml as explained below. Keep rest of the files unchanged.
Create CustomLogin.mxml and CustomButton.as component as explained above. Modify these files as
explained below. Keep rest of the files unchanged.
Compile and run the application to make sure business logic is working as per the requirements.
Kommentare zu diesen Handbüchern