PDA

View Full Version : Actionscript + Visual Basic


Luka Gabriel
07-29-2009, 12:47 PM
Hello everyone, it's my first post here.
I have a problem with flash/vb interaction.

I have searched a lot, and still haven't found my answer, so I hope someone from this forum could help me :rolleyes:

I would like to do two things:

1. Enable(start) a timer in my VB application (it's .exe) with clicking on a button in my flash app.

2. Get some text from a textbox in my flash app to a textbox in my VB app, by clicking on a button in flash.

:o

Any hints will help, but code still wins it all. :P
Thank you very much in advance!

Luka Gabriel

northcode
07-29-2009, 03:51 PM
What version of VB are you using and what version of Flash? Are you using AS2 or AS3 in Flash? The version of ActionScript you're working with makes a big difference to how you interact with Flash from VB.

This should get you started...

http://pages.cpsc.ucalgary.ca/~saul/vb_examples/tutorial12/index.html

Luka Gabriel
07-29-2009, 04:40 PM
I'm using VB 2008, and AS2.


*Off:
And what happened to this thread?

CyanBlue
07-29-2009, 05:40 PM
I moved the thread to this forum because this is the forum that best fits your question, if that is what you are asking...

Luka Gabriel
07-29-2009, 07:01 PM
Projectors and CDs? No.
It's totally about actionscript 2.

I just think more people could help me solve my problem there.
This seems like a forum that least fits my question, sorry.

CyanBlue
07-29-2009, 10:07 PM
When you load the SWF into the VB, it runs in the same sandbox as any projector... That's why this question belongs here... Besides, it is the forum policy to post the question to the right forum area, and those that are not posted in a proper manner will be moved/merged...

Your question is pretty much answered by northcode already... You probably won't have much luck if you are asking somebody else do the job for you...

Luka Gabriel
07-30-2009, 06:17 AM
I saw my mistake now. I misunderstood the meaning of "projectors". I'm sorry CyanBlue.

northcode gave me a relly nice tut, but it didn't work for me. That's why I'm still searching for my answer, and waiting if someone could help me here. I am not asking for a complete tutorial, just little hints, like for example northcode's post. :)
Thanks

northcode
07-30-2009, 07:18 AM
This is a C# example, but much of the plumbing will be similar to what you have to do in VB.NET.
http://www.codeproject.com/KB/audio-video/flashexternalapi.aspx

To get started in VB.NET...

Even if Flash is installed on your computer is is not displayed on your toolbox by default. To add it to your toolbox do the following in VS 2005. That's the only version I have installed right now, your mileage may vary with other versions of Visual Studio ;)

1. right click your toolbox
2. click Choose Items...
3. Select the COM Components Tab
4. Find the Shockwave Flash object
5. check it
6. press OK

You should now see the Shockwave Flash Object in your toolbox and be able to drag it to your form and start playing with it. All the tutorials out there that describe the methods and properties you can call from VB or C++ will help you figure it out for VB.NET too. Adobe doesn't officially support this usage so publicly collected information and the documented bits (for use from a browser from JavaScript) is as good as it gets.

CyanBlue
07-30-2009, 02:50 PM
No worries, Luka Gabriel... ;)

I can assure you that northcode is the best knowledgeable person who can help you regarding your problem... Of course, it all depends how you define help... Some people throws in some clues so that you can come up with the solution by yourself, and some people gives you class full of scripts to solve your problem... But both have valid points and it all depends on you on how you consume the information that was given to you... ;)

Luka Gabriel
08-03-2009, 01:41 AM
I foud another solution, that worked for me. Only with flash & levels.
Thank you guys so much for your help. :)