02.02.2013 Views

Flash MX 2004 Games : Art to ActionScript

Flash MX 2004 Games : Art to ActionScript

Flash MX 2004 Games : Art to ActionScript

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Flash</strong> <strong>MX</strong> <strong>2004</strong> <strong>Games</strong><br />

Figure 24.1 Selecting the Shockwave <strong>Flash</strong> ActiveX control<br />

Receiving messages from <strong>Flash</strong><br />

To send messages from <strong>Flash</strong> <strong>to</strong> the VB wrapper:<br />

1 Open the code window.<br />

2 Select the <strong>Flash</strong> object from the left combo box.<br />

3 Select FSCommand from the right combo box.<br />

VB creates a function for you like the one shown in Listing 24.1:<br />

1 Private Sub flash_FSCommand(ByVal command As String, ← |<br />

2<br />

3 End Sub<br />

Listing 24.1<br />

ByVal args As String)<br />

In <strong>Flash</strong> whenever you use the following syntax in <strong>ActionScript</strong>, the ‘command’ parameter and<br />

the ‘args’ parameter are passed <strong>to</strong> the VB function.<br />

376<br />

fscommand(command, args);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!