简体   繁体   English

使用.NET在服务器端生成Flash对象

[英]Generate Flash objects server-side with .NET

How can I create an array of Flash objects (for instance, Buttons) on the server-side using .NET, then stream them as binaries? 如何使用.NET在服务器端创建一个Flash对象数组(例如,按钮),然后将它们作为二进制文件流式传输?

In essence, I would like to decrease the time spent on the client creating objects out of base primitives. 从本质上讲,我希望减少客户端从基本原语创建对象所花费的时间。

This can be accomplished with Flash Remoting. 这可以通过Flash Remoting完成。 In the past I've used FluorineFX ( fluorinefx.com ), but it hasn't been updated in a long time. 在过去,我使用过FluorineFX( fluorfx.com ),但它在很长一段时间内都没有更新过。

You might also want to look into WebORB for .NET ( http://www.themidnightcoders.com/products/weborb-for-net/overview.html ), which is another solution for Flash Remoting. 您可能还想查看WebORB for .NET( http://www.themidnightcoders.com/products/weborb-for-net/overview.html ),这是另一种Flash Remoting解决方案。 Unlike FluorineFX, WebORB is still being supported. 与FluorineFX不同,WebORB仍然受到支持。 However, the full version of WebORB isn't free and it looks like they won't tell you how much it costs unless you talk to one of their salespeople. 但是,完整版的WebORB并不是免费的,看起来除非你和他们的销售人员交谈,否则他们不会告诉你多少钱。

Check this link: AS3 Passing and getting data to ASP 检查此链接: AS3传递并获取数据到ASP

It tells you can pass data to an ASP.NET server through URLLoader. 它告诉您可以通过URLLoader将数据传递给ASP.NET服务器。 'You can read the response as e.target.data in the processASP method.' '您可以在processASP方法中将响应读作e.target.data。'

Also from the page: URLLoader can also be used to send data to the asp page (server). 同样来自页面:URLLoader也可用于将数据发送到asp页面(服务器)。

var ldr:URLLoader = new URLLoader();
var data:URLVariables = new URLVariables();
data.something = "someData";
data.somethingElse = "moreData";
var request:URLRequest = new URLRequest("url.asp");
request.data = data;
request.method = URLRequestMethod.POST;//or GET
ldr.addEventListener(Event.COMPLETE, onLoad);
//listen for other events
ldr.load(request);

The server would have to be a live streaming page, though. 但是,服务器必须是实时流媒体页面。

The Flex Compiler can create SWF code from .as files, but you need to have it installed on your server. Flex Compiler可以从.as文件创建SWF代码,但您需要在服务器上安装它。 SWF can then be compressed as binary, so it should fit your needs. 然后可以将SWF压缩为二进制,因此它应该符合您的需求。

The next step is to pass the URL to the generated SWF to your application in an <embed> code or through an ExternalInterface . 下一步是通过<embed>代码或通过ExternalInterface将URL传递给生成的SWF到您的应用程序。 However... 然而...

I would suggest not trying to reinvent the wheel. 我建议不要试图重新发明轮子。 If you want a smaller size and cache support for SWFs, the easier way is to send a binary configuration file (using <embed> / ExternalInterface ) which is gzipped JSON or XML to the SWF application with functionality to generate the UI you want based on its data. 如果您想要更小的大小和缓存支持SWF,更简单的方法是发送二进制配置文件(使用<embed> / ExternalInterface ),该文件是gzip压缩的JSON或XML到SWF应用程序,具有生成所需UI的功能它的数据。 You can use Flash, Flex or OpenSource components (such as MinimalComps) - or even write your own components to have exactly what you want in the size you want. 您可以使用Flash,Flex或OpenSource组件(例如MinimalComps) - 甚至可以编写自己的组件,以获得您想要的大小。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM