This is a place where Shockwave can really be helpful. On the PC you have a great thing called ActiveX that can help out a lot here. Like Director, Authorware has an ActiveX Xtra that allows it to insert various controls to quickly add functionality from other applications. Shockwave also has an ActiveX control, so with it we can inset Director/Shockwave files into any Authorware 5 piece. Start by inserting an ActiveX control into the flow line. Select the Shockwave control and click OK.
The next step is to add a calc icon that will assign the filename for the Shockwave piece. Since the path on each machine could be different we set this after the icon is loaded and use a dynamic path.
The Authorware piece now needs to wait for any command sent by the Director piece. This is accomplished by adding and interaction Icon to the flow line and setting the first item to be an "event". In the event properties select the Shockwave ActiveX control and activate the "externalEvent" in the "Event Name" box.
From this we can add in code to interpret the event and set a variable accordingly. When Authorware intercepts an event it returns the results in the list called EventLastMatched. The event we want to look for is #__EventName (note the 2 "_" characters). If this is an #externalEvent then we want to get the results that Shockwave sent, which will be in the #bstrEvent.
if EventLastMatched[#__EventName] = #ExternalEvent then
Now that we have a path we can continue through the flow line and use the variable. This is an example of how the flow line might look.
So how do we send the command from the Director side? Director uses a command called "externalEvent" to pass information out. This info can only be a string and may not have any quotes in it. For example...
Would be a valid string
"value=" & quote & "1" & quote
The Director code would look something like this...
property spriteNum, whatNumber
on mouseUp me
on beginSprite me
whatnumber = spriteNum
The reverse is called evalScript. Sending an evalScript message to the control will allow Director to read in the string sent and then do any code in the evalScript handler.
36 South Court Sq
Newnan, GA 30263