ASP.NET and Flash - can flash talk to .net

半腔热情 提交于 2019-12-22 04:38:28

问题


Can a flash front end talk to a .net backend?


回答1:


Yes.

We use Adobe Flex to talk to .Net XML web services.

Be careful with complex serialised .Net types (for instance DataSets) - ActionScript can't handle them.

Instead produce simple XML with primitive types.

See also: Flex and ADO.NET Data Services...anyone done it?

<mx:WebService id="myDataService" showBusyCursor="true">
    <mx:operation name="WebMethodName" resultFormat="object" result="functionFiredOnComplete();"></mx:operation>
</mx:WebService>

public function load():void
{
    myDataService.loadWSDL( "web method's wsdl" );
    myDataService.WebMethodName.send( params );
}

public function functionFiredOnComplete():void
{           
    // get data
    var myData:Object = myDataService.WebMethodName.lastResult;
    ...



回答2:


Flash can also talk to the hosting page via JavaScript.




回答3:


you could also try AMF.NET, a .NET implementation of Flash Remoting using ActionScript Messaging Format (AMF)

http://amfnet.openmymind.net/overview/default.aspx




回答4:


Yes

Best keywords to search for are Flash .net and Flex

In the old days there was another tool but with Flex its all been simplified.




回答5:


If you are de/serializing a lot of objects (which Flash/Flex isn't particularly fast at), or more complex types, then you might want to take a look at WebOrb. It's a free object broker, which might sound scary, but it basically handles translation between the native object types of the two technologies. It pretty much "just works", and can increase performance quite significantly in some situations.

It also comes with a code generation tool if all you want is CRUD and stored procedure access for a SQL database, which is quite nice.




回答6:


I would recomend FluorineFX we use that at work and its great. The only downside is that we end up with a lot of value objects that are only used to transfer data between .net and flex. And the fact that the standard C# naming style and the flex naming style has some minor differences makes value objects a bit ugly in either flex or .net.




回答7:


My older brother and I developed several methods for Flash/.Net communication. I've seen web services mentioned above (which is a great way of doing it), but we also used simple .aspx pages and had stuff passed via querystring (poor man's way of doing things), using Flashvars to get data TO Flash, but my favorite - Using .Net and a repeater control to build xml files which were then consumed by Flash. We created some pretty cool stuff doing that!



来源:https://stackoverflow.com/questions/229887/asp-net-and-flash-can-flash-talk-to-net

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!