Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Invoke swf function from aspx

Guest
Feb 21, 2011 Feb 21, 2011

I have a swf that created using flex actionscript 3.0. And I put it into aspx page and I want to invoke this swf's function from aspx.

How can I do?

TOPICS
ActionScript
556
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 21, 2011 Feb 21, 2011

There is no native way to do that in Flash. Internet is a stateless entity - so you will need to either establish a persistent connection to the server or call a web service periodically. Search for Flash remoting. Try to explore Socket and NetConnection classes. You may discover though that it is not worth an effort to use them to receive and send information. Majority of applications use either XML or AMF encoded packets via simple http requests instead of trying to implement callback functionality on the client.

Another way could be to establish clinet-server communication in JavaScript and communicate to Flash via ExternalInterface.

In any case Flex forum can be more helpful because Flex developers are more likely to deal with client-server tasks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 21, 2011 Feb 21, 2011

Thank you for your post.ExternalInterface method looks like  suitable one because the others more and more complex. And how I can call javascript function from c# class?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 21, 2011 Feb 21, 2011
LATEST

I don't know c#. I guess it doesn't matter what server side technology is used. If there is any framework that allows for JavaScript/server communication (Ajax perhaps) - it will do the trick.But this is something that you will find answers for elsewhere (JavaScript or c#  forums).

I don't see though how it is different from just using AS3 URLLoader.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines