Flex¶Ë´úÂ룺
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
>
<fx:Script>
<!--[CDATA[
import mx.controls.Alert;
/////////////////////////////////
//private member
private var xmlsocket:XMLSocket= new XMLSocket();
private var alert:Alert;
private var tmpStr:String;
/////////////////////////////////
//Á¬½Ó·þÎñÆ÷
private function ConncetServer():void
{
xmlsocket.addEventListener(DataEvent.DATA,OnRecived);
xmlsocket.addEventListener(Event.CONNECT , onConnected);
this.xmlsocket.connect(this.txtIP.text,int(this.txtPort.text));
}
private function onConnected(evt:Event):void
{
xmlsocket.send(this.txtTrueName.text+" has connected");
this.txtContent.text=this.txtContent.text+"Á ......
AnyChart Flash Charting Component ÊÇÒ»¸ö»ùÓÚ Adobe Flash µÄÁé»î½â¾ö·½°¸£¬¿ÉÓÃÓÚ´´½¨Íâ¹Û¾«ÃÀµÄ½»»¥Ê½ flash ͼ±íºÍָʾ°å£¨dashboard£©¡£ËüÊÇÒ»¸ö¿çä¯ÀÀÆ÷ÇÒ¿çƽ̨µÄÖÆͼ½â¾ö·½°¸£¬¿ÉÓÃÓÚ´´½¨Ö¸Ê¾°å¡¢±¨±í¡¢·ÖÎöͼ±í¡¢Í³¼Æͼ±í¡¢²ÆÎñͼ±íÒÔ¼°ÈκÎÆäËû¿ÉÊÓ»¯½â¾ö·½°¸¡£
Çë·ÃÎÊÒÔÏÂÁ´½Ó²é¿´ÓÐ¹Ø AnyChart µÄ¸ü¶àÐÅÏ¢£º
AnyChart ¸ÅÊö
ͼ±íÑùÀý¿â
È«ÃæµÄÓû§Ö¸ÄÏ
Ö§³Ö¿ª·¢ÈËԱʹÓûùÓÚ Flash µÄ²úÆ·µÄ¼¼ÊõÖڶ࣬µ«Ã¿ÖÖ¼¼Êõ¶¼ÓÐÆä¸÷×ÔµÄÎÊÌâ¡£AnyChart ÍŶÓŬÁ¦³ÉΪһ¸öµä·¶£¬Å¬Á¦Èà AnyChart µÄʵÏÖ±äµÃ¸ü¼ÓÈÝÒס¢¸üÒ×ÓÚÀí½â¡£±¾ÎĽâÊÍÁËÈçºÎ½« AnyChart Flash Chart¡¢µØͼ¡¢¼ÆÁ¿Æ÷ºÍָʾ°åÓë Adobe Flex ÅäºÏʹÓá£
¼ò½é
ÈçºÎÏòÏîÄ¿ºÍ¹¤×÷ÇøÌí¼Ó×é¼þ
µÚÒ»¸öͼ±í
´¦ÀíÊý¾Ý
¶¯Ì¬Í¼±íË¢ÐÂ
´¦Àíͼ±íʼþ
¹¤×÷ÇøµÄ¶à¸öͼ±í
ÔÚָʾ°åÖÐʹÓÃÏòÏÂ×êÈ¡
ʹÓõØͼ
ʹÓüÆÁ¿Æ÷
ºó¼Ç
¼ò½é
Flex Ó¦ÓóÌÐòµÄÓ¦Ó÷¶Î§·Ç³£¹ã£¬µ«¸Ãƽ̨×î´óµÄЧÁ¦¾ÍÊÇÒýÈëÁË Business Analytics¡£Í¨¹ýʹÓà Flex£¬Business Analytics Äܹ»Îª BI ´´½¨±ã½ÝµÄ½»»¥Ê½Ö¸Ê¾°å¡£Ö¸Ê¾°åµÄÒ»¸ö¹Ø¼ü²¿·ÖÊÇͼ±í£¬Í¼±íµÄ¹¦ÄܺÍÒ׶ÁÐÔÓ°Ïì×ÅÕû¸öָʾ°åµÄÊÊÓÃÐÔ¡£AnyChart Ñϸñ×ñÊØÕâЩ±ê×¼£¬¸Ã×é¼þÔÚ¹¦ ......
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
width="550" height="400">
<mx:Script>
<![CDATA[
import mx.utils.ObjectUtil;
import mx.collections.*;
[Bindable]
private var dp:ArrayCollection=new ArrayCollection([
{Artist:'Pavement1', Album:'Slanted and Enchanted',
Pr ......
Ñо¿E4XÓëFlexµÄ¹Øϵ£¬ËùÒÔ´òËã×ܽáһϣ¬ÓÐ˵µÄ²»¶ÔµÄµØ·½£¬»¹Çë´ó¼Ò¶à¶àÔÁ¡£
Ò»¡¢×î¼òµ¥Ä£Ê½£ºFlexͨ¹ýhttpserviceºÍdataProvider½øÐÐÊý¾Ý´«Êä
Xml¸ñʽÈçÏ£º
<?xml version="1.0" encoding="utf-8" ?>
<Result>
<NodeA>value1</NodeA>
<NodeB>valve2</NodeB>
……………………………………………
……………………………………………
</Result>
ÔÚFlexÖÐÓÐÒ»¸öDataGrid£¬ÕâÑù¾Í¿ÉÒÔÓÃhttpserviceÀ´Ê¹DataGrid»ñÈ¡xmlµÄÊý¾ÝÁË¡£
Flex¶ËÈçÏ£º
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
title="Blog Details">
<mx:HTTPService showBusyCursor="true" url="http://localhost:8080/text.xml"/ id=”xmlRecord”>
<mx:DataGrid w ......
Ñо¿E4XÓëFlexµÄ¹Øϵ£¬ËùÒÔ´òËã×ܽáһϣ¬ÓÐ˵µÄ²»¶ÔµÄµØ·½£¬»¹Çë´ó¼Ò¶à¶àÔÁ¡£
Ò»¡¢×î¼òµ¥Ä£Ê½£ºFlexͨ¹ýhttpserviceºÍdataProvider½øÐÐÊý¾Ý´«Êä
Xml¸ñʽÈçÏ£º
<?xml version="1.0" encoding="utf-8" ?>
<Result>
<NodeA>value1</NodeA>
<NodeB>valve2</NodeB>
……………………………………………
……………………………………………
</Result>
ÔÚFlexÖÐÓÐÒ»¸öDataGrid£¬ÕâÑù¾Í¿ÉÒÔÓÃhttpserviceÀ´Ê¹DataGrid»ñÈ¡xmlµÄÊý¾ÝÁË¡£
Flex¶ËÈçÏ£º
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
title="Blog Details">
<mx:HTTPService showBusyCursor="true" url="http://localhost:8080/text.xml"/ id=”xmlRecord”>
<mx:DataGrid w ......
±¾ÎĹ²Á½¸öÎļþ£ºtranslate.mxml ºÍ mapmarking.xml
1¡¢translate.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
minWidth="1024" minHeight="768">
<fx:Script>
<![CDATA[
//xml translate array
public function xmlToArr(xmlObj:XML):Array{
var toArr:Array = new Array();
for(var i:uint = 0; i < xmlObj.site.length(); i++){
toArr.push({pid: xmlObj.site[i].id,
province: xmlObj.site[i].province,
city: xmlObj.site[i].city,
updName: xmlObj.site[i].station,
......
±¾ÎĹ²Á½¸öÎļþ£ºtranslate.mxml ºÍ mapmarking.xml
1¡¢translate.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
minWidth="1024" minHeight="768">
<fx:Script>
<![CDATA[
//xml translate array
public function xmlToArr(xmlObj:XML):Array{
var toArr:Array = new Array();
for(var i:uint = 0; i < xmlObj.site.length(); i++){
toArr.push({pid: xmlObj.site[i].id,
province: xmlObj.site[i].province,
city: xmlObj.site[i].city,
updName: xmlObj.site[i].station,
......
subject of application domain of flash and air.
ÔÚflash»òflexÖУ¬³ÌÐò¼ÓÔØÍⲿswfÎļþ£¬¸ÃÎļþµÄ³ÌÐòÓòĬÈÏΪÖ÷³Ì ÐòÓòµÄÒ»¸ö×ÓÓòÖС£±ÈÈçÄãʹÓÃA.swf¼ÓÔØB.swfÎļþ£¬B±»¼ÓÔغ󣬳ÉΪA³ÌÐòÓòµÄÒ»¸ö×ÓÓò£¬×ÓÓòÊÇÉêÃ÷ÀàµÄʱ£¬²»Äܸ²¸Ç¸¸ÀàÒÑÉêÃ÷ÀࣺÈç¹ûAÖж¨ ÒåÁËÀàcom.sogou.MapÀ࣬ͬʱBÖÐÒ²¶¨ÒåÁËcom.sogou.MapÀ࣬µ«Êǵ±B¼ÓÈëµ½AµÄ³ÌÐòÓòʱ£¬Ïȼì²éA³ÌÐòÓòÖÐÊÇ·ñÒÑ´æÔÚÒ»¸öÀà¡£ Èç¹û´æÔÚ£¬ÔòʹÓøÃÒÑ´æÔÚÀ࣬·ñÔòÉêÃ÷ÊôÓÚB×Ó³ÌÐòÓòµÄÀà¡£µ±È»Ò²¿ÉÒÔ½«B²»¼ÓÔص½Ä¬ÈÏÓòÖУ¬¶øÊÇн¨Ò»¸öÓò£º
var loader:Loader = new Loader();
var context:LoaderContext = new LoaderContext();
context.applicationDomain = new ApplicationDomain();
loader.load(new URLRequest(”B.swf”), context);
ͬʱ£¬A¿ÉÒÔʹÓÃB³ÌÐòÓòÖеÄÀࣺ
var bDomain:ApplicationDomain = loader.contentLoaderInfo.applicationDomain;
if (bDomain.hasDefinition(”com.sogou.map::JustForB”)) {
//ÅжÏÒ»¸ö³ÌÐòÓòÖÐÊÇ·ñÒѶ¨ÒåÒ»¸öÀà
var bc:class = bDomain.getDefinition(”com.sogou.map::JustForB”) as class;
var bcInst:Object = new bc();
}
È»º ......
subject of application domain of flash and air.
ÔÚflash»òflexÖУ¬³ÌÐò¼ÓÔØÍⲿswfÎļþ£¬¸ÃÎļþµÄ³ÌÐòÓòĬÈÏΪÖ÷³Ì ÐòÓòµÄÒ»¸ö×ÓÓòÖС£±ÈÈçÄãʹÓÃA.swf¼ÓÔØB.swfÎļþ£¬B±»¼ÓÔغ󣬳ÉΪA³ÌÐòÓòµÄÒ»¸ö×ÓÓò£¬×ÓÓòÊÇÉêÃ÷ÀàµÄʱ£¬²»Äܸ²¸Ç¸¸ÀàÒÑÉêÃ÷ÀࣺÈç¹ûAÖж¨ ÒåÁËÀàcom.sogou.MapÀ࣬ͬʱBÖÐÒ²¶¨ÒåÁËcom.sogou.MapÀ࣬µ«Êǵ±B¼ÓÈëµ½AµÄ³ÌÐòÓòʱ£¬Ïȼì²éA³ÌÐòÓòÖÐÊÇ·ñÒÑ´æÔÚÒ»¸öÀà¡£ Èç¹û´æÔÚ£¬ÔòʹÓøÃÒÑ´æÔÚÀ࣬·ñÔòÉêÃ÷ÊôÓÚB×Ó³ÌÐòÓòµÄÀà¡£µ±È»Ò²¿ÉÒÔ½«B²»¼ÓÔص½Ä¬ÈÏÓòÖУ¬¶øÊÇн¨Ò»¸öÓò£º
var loader:Loader = new Loader();
var context:LoaderContext = new LoaderContext();
context.applicationDomain = new ApplicationDomain();
loader.load(new URLRequest(”B.swf”), context);
ͬʱ£¬A¿ÉÒÔʹÓÃB³ÌÐòÓòÖеÄÀࣺ
var bDomain:ApplicationDomain = loader.contentLoaderInfo.applicationDomain;
if (bDomain.hasDefinition(”com.sogou.map::JustForB”)) {
//ÅжÏÒ»¸ö³ÌÐòÓòÖÐÊÇ·ñÒѶ¨ÒåÒ»¸öÀà
var bc:class = bDomain.getDefinition(”com.sogou.map::JustForB”) as class;
var bcInst:Object = new bc();
}
È»º ......