C#利用Fluorinefx实现使用AMF3协议与Flash通讯
通常,使用Flash来调用.NET组件需用远程调用,实际上我们也可以通过SOCKET直接通信。
具体采用Flash的AMF3或AFM0格式,采用流行的FluorineFx服务器组件,具体代码如下:
依照此用法可以开发网页游戏或其它Flash应用的.NET SOCKET服务器。
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Threading;
using System.Net.Sockets;
using System.Net;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
using FluorineFx;
namespace STCServer
{
class Monitor
{
private int PORT = 8888;
private const int MAXPKSIZE = 4096;
private TcpListener tcpLs = null;
private List<Client> clients = new List<Client>();
public void Close()
{
if (tcpLs != null)
{
tcpLs.Stop();
}
if (clients.Count != 0)
{
foreach (Client c in clients)
{
c.sock.Shutdown(SocketShutdown.B
相关文档:
方法一
1::<head></head>中加入代码:
<style>
html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }
</style>
2:在css文档种加入以下代码
html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }
若FLASH的颜色不能被CSS滤镜控制, ......
使网页所有元素变灰的代码,包括FLASH,只支持IE:
第一种方法:把下面的代码加入网页的<head>与</head>之间:
<style type="text/css">
*{filter:Gray;}
</style>
第二种方法:把下面的代码加入网站的CSS文件中:
*{filter:Gray;}
上面的代码可以使除了FLASH之外的网页所有元素变灰 ......
第一步C#添加组件
打开VS2005-工具-选择工具箱项-COM组件-选择Shockwave Flash Object-确定
添加好组件往场景上拖放,如果提示注册需求注册
c# 注册控件-在运行输入-回车(flash9f.ocx这个文件以系统中实际文件为准。)
regsvr32 c:\windows\system32\macromed\flash\flash9f.ocx
或者regsvr32 c:\windows\system32\ma ......
一、Flash介绍
常用的flash类型有NOR Flash 和Nand Flash 两种;
(1)Nor Flash
1、Nor Flash的接口和RAM完全相同,可以随机访问任意地址的数据,在其上进行读操作的效率非常高,但是擦除和写操作的效率很低,另外,Nor Flash的容量一般比较小,通常,N ......
访问Nand Flash时需要先发出命令,然后发出地址序列,最后读/写数据;
需要使用各个信号来分辨命令、地址、数据;
S3C2410 的Nand Flash控制器 提供了相关寄存器来简化这些操作:
& ......