flash C# Socket
2009-09-01 17:33在.net中定义以下
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
namespace ClientSocket
{
public class AsynchronousSocketListener
{
//异步socket诊听
// Incoming data from client.从客户端传来的数据
public static string data = null;
// Thread signal.线程 用一个指示是否将初始状态设置为终止的布尔值初始化 ManualResetEvent 类的新实例。
public static ManualResetEvent allDone = new ManualResetEvent(false);
public AsynchronousSocketListener()
{
}
public static void StartListening()
{
// Data buffer for incoming data. 传入数据缓冲
byte[] bytes = new Byte[1024];
// Establish the local endpoint for the socket. 建立本地端口
// The DNS name of the computer
// running the listener is "host.contoso.com".
IPHostEntry ipHostInfo = Dns.Resolve(Dns.GetHostName());
IPAddress ipAddress = ipHostInfo.AddressList[0];
IPEndPoint localEndPoint = new IPEndPoint(ipAddress, 11001);
// Create a TCP/IP socket.
Socket listener = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp );
// Bind the socket to the local endpoint and listen for incoming connections.绑定端口和数据
try
{
listener.Bind(localEndPoint);
listener.Listen(100);
while (true)
{
// Set the ev
相关文档:
对于大部分Flash开发者,都已经知道Flash的帧频、Timer计时并不是十分精确的。如果您已经做过这方面测试,可以略过这篇文章的前面一部分,在后面有关于Flash Player可变跑道的文章链接,希望对您有帮助。这篇文章的主要目的是让一些不知道Flash计时不精确和知道但又没有做过测试的朋友,来分享我的测试结果。我使用的Flex开 ......
<div class="ad2">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
widt ......
区别:
(1)影片剪辑的播放完全独立于时间轴。即使主场景中只有一个帧,也不会影响影片影片剪辑的播放。但是图形元件就不同了——如果主场景中只有一个帧,那么其中的图形元件也只能永远显示一个帧。
(2)影片剪辑可以设置实例名称,图形元件则不行。
(3)影片剪辑可以设置滤镜,图形元件则不行。
(4)影 ......
1、DateTime 数字型
System.DateTime currentTime=new System.DateTime();
1.1 取当前年月日时分秒
currentTime=System.DateTime.Now;
1.2 取当前年
&nb ......
学习Flash 学一点物理对flash有很大帮助,关于flash与运动学的一些知识在make thing move作者里面已经很详细提供了。物理来讲,个人学得比较差,中学时代基本上是物理白痴,毫无物理的思维。不得不重新去网站搜索一些概念去学回这种运动学。对于物理的介绍,不能去抛书包,只能记录一下笔记用作日后使用。
上 ......