MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Guía de usuario Pagina 61

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 256
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 60
The Flex programming model 61
The following example is an MXML application that uses a Button control to trigger a copy
of the text from a TextInput control to a TextArea control:
<?xml version="1.0" encoding="utf-8"?>
<!-- ?xml tag must start in line 1 column 1 -->
<!-- MXML root element tag. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<!-- Flex controls exist in a container. Define a Panel container. -->
<mx:Panel title="My Application">
<!-- TextInput control for user input. -->
<mx:TextInput id="myInput" width="150" text=""/>
<!-- Output TextArea control. -->
<mx:TextArea id="myText" text="" width="150"/>
<!-- Button control that triggers the copy. -->
<mx:Button id="myButton" label="Copy Text"/>
</mx:Panel>
</mx:Application>
The first line of this application specifies the XML declaration and must start in line 1,
column 1 of the MXML file.
The second line begins with the
<mx:Application> tag, the root element of a Flex
application. This tag includes the Flex namespace declaration. The content between the
beginning and end
<mx:Application> tags defines the Flex application.
The following figure shows this application running in Flash Player:
As it is written, this example lays out the user interface, but does not yet contain the
application logic to copy the input text from the TextInput control to the TextArea control.
Adding ActionScript to a Flex application adds that logic.
Vista de pagina 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 255 256

Comentarios a estos manuales

Sin comentarios