Flex 3 Update 2 ( AS3 ) and Visual Basic 2008

Hello i am newbie for your forum :). A lot of thanks for welcome.

I would to know about Flex and Visual Basic 2008 ( 9 Version with SP 1 ) because it is different with “fscommand” or “externedinterface.call”

I know that adding with shockwave in Visual Basic 2008 like old version of using object.
http://www.kirupa.com/developer/mx/flashvb.htm

But it is old version! I am using Visual Studio 2008 Pro with Service Pack 1 …
I want to create swc with externedinterface or fscommand like MDM Zinc 3.x or Rapid applications…
Can you say me when your simple example for code?
I want to know:

  • How do i exit an Application from Visual Basic 2008 while i click with externedinterface by Flex-Application.

Edit:
Flex Builder 3: Code:


[LEFT][SIZE=2]<?xml version="1.0" encoding="utf-8"?>[/SIZE][/LEFT]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]<mx:Application[/COLOR][/SIZE]
[LEFT][/COLOR][/SIZE][SIZE=2]xmlns:mx="[/SIZE][SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]http://www.adobe.com/2006/mxml[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]" layout="[/SIZE][SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]absolute[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#006633][SIZE=2][COLOR=#006633]<mx:Script>[/COLOR][/SIZE][/COLOR][/SIZE]
[LEFT][SIZE=2]<![CDATA[[/SIZE]

**[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]public[/COLOR][/SIZE][/COLOR][/SIZE]****[SIZE=2][COLOR=#339966][SIZE=2][COLOR=#339966]function[/COLOR][/SIZE][/COLOR][/SIZE]**[SIZE=2] myAppexit():[/SIZE]**[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]void[/COLOR][/SIZE][/COLOR][/SIZE]**
[LEFT][SIZE=2]{ [/SIZE]
[SIZE=2]fscommand([/SIZE]**[SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]"vb_exit"[/COLOR][/SIZE][/COLOR][/SIZE]**[SIZE=2], [/SIZE]**[SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]""[/COLOR][/SIZE][/COLOR][/SIZE]**[SIZE=2]);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]]]>[/SIZE]
[SIZE=2][COLOR=#006633][SIZE=2][COLOR=#006633]</mx:Script>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]<mx:Button[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] label="[/SIZE][SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]Exit[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]" click="myAppexit()" left="[/SIZE][SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]10[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]" top="[/SIZE][SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]10[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]"[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]/>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[/LEFT]

[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]</mx:Application>[/COLOR][/SIZE][/COLOR][/SIZE]

[LEFT]Visual Basic 2008: Code:[/LEFT]


[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Public[/COLOR][/SIZE]
[LEFT][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Class[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Form1[/SIZE][/LEFT]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Form1_Load([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Object, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.EventArgs) [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]MyBase[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].Load[/SIZE]

[LEFT][SIZE=2]AxShockwaveFlash1.Movie = [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"C:\Dokumente und Einstellungen\SnakeMedia\Eigene Dateien\Visual Studio 2008\Projects\WindowsApplication1\WindowsApplication1\myApp.swf"[/COLOR][/SIZE][/COLOR][/SIZE]
[LEFT][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] AxShockwaveFlash1_FSCommand([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] command [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.String) [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] AxShockwaveFlash1.FSCommand[/SIZE]
[SIZE=2]Application.Exit()[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Class[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[/LEFT]


2 Errors were outputs… i can not try… Please answer me for help!!

[LEFT]Thank you. :wink:

[LEFT]Best regards, SnakeMedia :}[/LEFT]
[/LEFT]