易截截图软件、单文件、免安装、纯绿色、仅160KB

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树形选择用户的实现

使用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 ......

在 Flex 应用程序中使用 AnyChart

AnyChart Flash Charting Component 是一个基于 Adobe Flash 的灵活解决方案,可用于创建外观精美的交互式 flash 图表和指示板(dashboard)。它是一个跨浏览器且跨平台的制图解决方案,可用于创建指示板、报表、分析图表、统计图表、财务图表以及任何其他可视化解决方案。
请访问以下链接查看有关 AnyChart 的更多信息: ......

[Flex]xml与Flex通信的研究

研究E4X与Flex的关系,所以打算总结一下,有说的不对的地方,还请大家多多原谅。
一、最简单模式:Flex通过httpservice和dataProvider进行数据传输
Xml格式如下:
<?xml version="1.0" encoding="utf-8" ?>
<Result>
<NodeA>value1</NodeA>
<NodeB>valve2</NodeB>
…&he ......

Flex 4 SDK 新特性教程系列 – 新增MXML标签

本章是Flex 4 SDK 新特性教程系列的第4章。本章介绍了MXML 2009新增的标签,包括:
Declarations
Vector
Library
Definition
Private
Reparent
<Declarations />
Declarations标签是Flex 4中最常用的新增标签。
在Flex 3中,对于一个MXML组件的直接子元素,可以有以下几种情况:
1. 属性标签,例如:
< ......

解决Flex+amfphp+MySQL中文乱码的方法


首先:确定数据库的编码为utf8,正常储存中文(用MySQL-Front查看中文是否正常)
然后:Services查询MySQL时使用"SET NAMES 'utf8'",且通过"amfphp/browser"运行看看是否中文,如果乱码则修改gateway.php文件,去掉 $gateway->setCharsetHandler("utf8_decode", "ISO-8859-1", "ISO-8859-1");
最后:运行Flex程序显 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号