Solved

how can i send variables between flash actionscript 3 and c# and vice versa

Posted on 2008-10-29
4
1,701 Views
Last Modified: 2013-11-11
I am trying out Flash CS3 to decide if I should upgrade from Mx but I have run into problems.  As I have done many times before, I have loaded my flash files into a c# form using the flash activex control.  At first it seems to work just the same as with Mx, until I try to pass variables to and from the flash.  I have tried looking up how to make actionscript 3 recive and send variables between flash and c# but have got more an more confused.  I keep reading about Flash's fantastic external api features but I can't find an example of how to use it.

Can any of you experts out there help me out and tell me where I can find a reliable, (an hopefully simple), example of how to communicate between flash cs3(actionscript 3) and c#?
0
Comment
Question by:Susurrus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 39

Accepted Solution

by:
blue-genie earned 500 total points
ID: 22843945
hi there. i was just looking at externalInterface with C# today. I have to do a project next month with it, though its still in AS2. the last time i worked with a c# wrapper was in AS1 with fscommands.

i found the help file most useful for explaining how i would go about it.
have you looked there. i know its a lot of boring reading but there's a full code example there with explanations and possible security issues etc.'

oh it just occured to me. you said you haven't upgraded so you won't have access to the help file.. arggh.

the sample files can be found here.
www.adobe.com/go/learn_programmingAS3samples_flash.
0
 

Author Comment

by:Susurrus
ID: 22844787
yep, thats my problem.  It is a little bit chicken an egg.  I want to evaluate the new as3 to see if it can do what I want before I commit to the upgrade, but before upgrading I cant get all the information I want.  Also there  doesnt seem to be a lot out on there generally yet about c# and as3 interaction.  Alll the examples I have found are AS2. I will do as you suggest though and try going through some of the samples and see if i can find anything useful.
0
 

Author Comment

by:Susurrus
ID: 22846729
Its working!

After going through the samples I found an example project called "IntrovertIM_CSharp" which put me on the right lines.   My biggest problem turned out to be that i was using an  outdated flash active x control dll.  Once I got this sorted out, the communication proved to be fairly easy.

The most simple example of interaction between as3 and c#  is here

http://www.richapps.de/articles/externalinterface_part1/ 

 (it is written for flex users but it was easy enough to pull out the actionscript I needed)
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 22847620
yeah i think i'm going to go with the flex approach since i just need to pop in an existing swf file.
will see. good luck to us both
:-)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question