Solved

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

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

Industry Leaders: 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

While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…
The goal of the tutorial is to teach the user how to how to record live broadcast.

623 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