Solved

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

Posted on 2008-10-29
4
1,711 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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
c# DateTime Format validation 4 93
array not updating 8 42
Visual C# Windows Project - Clone Form 4 39
c# ftp code 3 56
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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 what frame rate is, how to control it and what effect it has on the video.

752 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