简体   繁体   中英

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?

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. In the past I've used FluorineFX ( fluorinefx.com ), but it hasn't been updated in a long time.

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. Unlike FluorineFX, WebORB is still being supported. 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.

Check this link: AS3 Passing and getting data to ASP

It tells you can pass data to an ASP.NET server through URLLoader. 'You can read the response as e.target.data in the processASP method.'

Also from the page: URLLoader can also be used to send data to the asp page (server).

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. SWF can then be compressed as binary, so it should fit your needs.

The next step is to pass the URL to the generated SWF to your application in an <embed> code or through an ExternalInterface . 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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