易截截图软件、单文件、免安装、纯绿色、仅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 socket .net的链接

http://www.cnblogs.com/beniao/archive/2009/01/12/1373921.html
无法运行如上博客的代码,于是自己到网上找资料
发现在http://hi.baidu.com/littlelaa/blog/item/bdea73f2382289a6a50f5241.html
关键是C#中READLINE这个方法无法在三秒内读取,因为结尾没有/N /R等字符。
C#端
using System;
using System.Net.Socke ......

[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. 属性标签,例如:
< ......

Amfphp与Flex交互:读取mysql数据

服务器端代码,amfphp的services目录下建立readData.php文件,代码如下
<?php
    class ReadDB
    {
              function getData()
            &nb ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号