MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Manuel d'utilisateur Page 16

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 124
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 15
TUTORIALS POINT
Simply Easy Learning Page 11
Public resources
These are helper files referenced by Flex application, such as Host HTML page, CSS or images located under
html-template folder.It contains following files
S.N.
File Name & Description
1
index.template.html
Host HTML page, with place holders. Flash Builder uses this template to build actual page
HelloWorld.html with HelloWorld.swf file.
2
playerProductInstall.swf
This is a flash utility to install Flash Player in express mode.
3
swfobject.js
This is the javascript responsible to check version of flash player installed and to load HelloWorld.swf in
HelloWorld.html page.
4
html-template/history
This folder contains resources for history management of the application.
HelloWorld.mxml
This is the actual MXML/AS (ActionScript) code written implementing the business logic of the application and that
the Flex compiler translates into SWF file which will be executed by flash player in the browser.A sample
HelloWorld Entry class will be as follows:
<?xml version="1.0" encoding="utf-8"?>
<s:Applicationxmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="100%"height="100%"
minWidth="500"minHeight="500"
initialize="application_initializeHandler(event)">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
protected function btnClickMe_clickHandler(event:MouseEvent):void
{
Alert.show("Hello World!");
}
protected function application_initializeHandler(event:FlexEvent):void
{
lblHeader.text = "My Hello World Application";
}
]]>
</fx:Script>
<s:VGrouphorizontalAlign="center"width="100%"height="100%"
paddingTop="100"gap="50">
<s:Labelid="lblHeader"fontSize="40"color="0x777777"/>
<s:Buttonlabel="Click Me!"id="btnClickMe"
click="btnClickMe_clickHandler(event)"/>
</s:VGroup>
</s:Application>
Vue de la page 15
1 2 ... 11 12 13 14 15 16 17 18 19 20 21 ... 123 124

Commentaires sur ces manuels

Pas de commentaire