Flex¶ÁÈ¡ä¯ÀÀÆ÷²ÎÊý
Õâ¸öÀàÌṩµÄ¹¦ÄÜÓУº
´Óä¯ÀÀÆ÷ÖлñÈ¡ÍêÕûµÄURL
Ö÷»úÃû
µ±Ç°ËùʹÓõÄÐÒé
¶Ë¿Ú
Ö÷ÓòÃûºóÃæµÄ·¾¶
²ÎÊýÖµ
ÔÎĵØÖ·£ºhttp://www.flexpasta.com/index.php/2008/03/15/getting-url-parameters-host-name-port-in-flex-actionscript/
package com.flexpasta.utils
{
import flash.external.ExternalInterface;
import mx.core.Application;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
public class HTTPUtil
{
//--------------------------------------------------------------------------
//
// Constructor
//
//--------------------------------------------------------------------------
/**
* @private
*/
public function HTTPUtil()
{
super();
}
/**
* Returns the current url that the swf player lives in
*
*/
public static function getUrl():String
{
return ExternalInterface.call("window.location.href.toString");
}
/**
* Returns the current host name.
* example: http://www.flexpasta.com/?x=1&y=2 would return www.flexpasta.com
*/
public static function getHostName():String
{
return ExternalInterface.call("window.location.hostname.toString");
}
/**
* Returns the current protocol, such as http:, https:, etc
*
*/
public static function getProtocol():String
{
return ExternalInterface.call("window.location.protocol.toString");
}
/**
* Gets the current port for the url
*/
public static function getPort():String
{
return ExternalInterface.call("window.location.port.toString");
}
/**
* Gets the context following the base of the url
* Example http://www.flexpasta.com/test?x=1&y=2 would return /test
*/
public static function getContext():String
{
return ExternalInterface.call("window.location.pathname.toString");
Ïà¹ØÎĵµ£º
ʹÓÃflex tree ºÍlistʵÏÖÈçÏÂÑ¡ÔñÓû§µÄЧ¹û
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
showCloseButton="true" creationComplete ......
¾³£»áÉè¼ÆÒ»¸öÕâÑùµÄ¹¦ÄÜ£¬±ÈÈç¸ü¸Ä¸öÐÔÍ·Ïñ£¬Õâ¸ö¸öÐÔÍ·Ïñ×îÖÕÐèÒªÉÏ´«µ½·þÎñÆ÷µÄÎļþϵͳÖУ¬µ«ÊdzÌÐòÏ£ÍûÔÚÓû§Ñ¡ÔñºóÖ±½ÓÓиöÔ¤ÀÀ£¬È»ºóÓû§²Å½øÐÐÉÏ´«¡£Õâ¸ö¹¦Äܼ¼ÊõÉÏÆäʵ¾ÍÊÇÐèÒª¶Ô±¾µØµÄÎļþÄܽøÐжÁÈ¡¡£ÔÚflash player10ÖÐÓиöÀàFileReferenceµÄÀà¿ÉÒÔʵÏÖÕâ¸ö¹¦ÄÜ£¬¶øʵÏÖ¶ÔÎļþ¶ÁÈ¡µÄ½Ó¿ÚÊÇload( )º¯Êý£¬Òª×¢Òâ ......
AnyChart Flash Charting Component ÊÇÒ»¸ö»ùÓÚ Adobe Flash µÄÁé»î½â¾ö·½°¸£¬¿ÉÓÃÓÚ´´½¨Íâ¹Û¾«ÃÀµÄ½»»¥Ê½ flash ͼ±íºÍָʾ°å£¨dashboard£©¡£ËüÊÇÒ»¸ö¿çä¯ÀÀÆ÷ÇÒ¿çƽ̨µÄÖÆͼ½â¾ö·½°¸£¬¿ÉÓÃÓÚ´´½¨Ö¸Ê¾°å¡¢±¨±í¡¢·ÖÎöͼ±í¡¢Í³¼Æͼ±í¡¢²ÆÎñͼ±íÒÔ¼°ÈκÎÆäËû¿ÉÊÓ»¯½â¾ö·½°¸¡£
Çë·ÃÎÊÒÔÏÂÁ´½Ó²é¿´ÓÐ¹Ø AnyChart µÄ¸ü¶àÐÅÏ¢£º
......
¸ÅÒª
µ±ÎÒÃǼÓÔØÍⲿswfʱ£¬±ØÐëÒªÁ˽âÓ¦ÓóÌÐòÓò(Application Domain)¡£´ÓAdobe¹Ù·½ÎļþÖУ¬ÎÒÃÇ¿ÉÒÔµÃÖªÓ¦ÓóÌÐòÓòÄܹ»°Ñ´¦ÓÚͬһ¸ö°²È«Óò(Security Domain)ÖеÄÀà·ÖÀ뿪£¬ÕâÑù¾Í¿ÉÒÔÈÃÒ»¸öÀàµÄ¶à¸ö¶¨Òå¹²´æ£¬»òÊÇÈöà¸ö×ÓÓ¦ÓÃÀ´¹²Ïí¸¸Ó¦ÓõÄÀඨÒå¡£¼òµ¥µãÀí½â¾ÍÊÇÓ¦ÓóÌÐòÓòΪÀඨÒåÌṩÁË·ÖÇø¹¦ÄÜ¡£
Ó¦ÓóÌÐòÓò
Ò»¸ ......
±¾ÕÂÊÇFlex 4 SDK ÐÂÌØÐԽ̳ÌϵÁеĵÚ4Õ¡£±¾Õ½éÉÜÁËMXML 2009ÐÂÔöµÄ±êÇ©£¬°üÀ¨£º
Declarations
Vector
Library
Definition
Private
Reparent
<Declarations />
Declarations±êÇ©ÊÇFlex 4ÖÐ×î³£ÓõÄÐÂÔö±êÇ©¡£
ÔÚFlex 3ÖУ¬¶ÔÓÚÒ»¸öMXML×é¼þµÄÖ±½Ó×ÓÔªËØ£¬¿ÉÒÔÓÐÒÔϼ¸ÖÖÇé¿ö£º
1. ÊôÐÔ±êÇ©£¬ÀýÈ磺
< ......