Accessibility

TechNote (Archived)

Capturing an event from a Flash movie in Authorware

The following are steps used to capture an event sent from a Flash file. Once the event has been captured, Authorware can perform an action based on this event. In this example, the Authorware piece contains an audio file which plays when the user clicks on a Flash button. This TechNote will also discuss how to pass variables from Authorware to Flash. Please refer to the Using Flash 4 manual for instructions on creating and assigning behaviors to a button.

Once the button has been created in Flash, assign the Get URL event to one of the instances of the button and enter the desired "do event".

To create a movie in Authorware do the following:

Insert the Flash Asset by importing the Flash movie. Name the sprite"MyFlashMovie".

Place an Interaction icon after the Flash Asset sprite and name it"CaptureEvent".

Place a Calculation icon off of the Interaction icon and set the response type to Event. Name the Calculation icon "ParseString".
Open the properties dialog box for the Event interaction. Select "Icon MyFlashMovie" in the sender field.
Note:Make sure there is an "x" showing before all the selections listed in the properties dialog box.
Place a Digital Sound icon named "wav" after the "CaptureEvent" Interaction icon. Import a sound file.

Open the Calculation icon "ParseString" and use the following code:

 if EventLastMatched[#urlString]="do event" then
		
MediaPlay(IconID@"wav")
end if

The Authorware file should look like this:

Setting variables in Flash from Authorware
Authorware 5.1 allows you to set variables in embedded Flash 4 movies. Use the CallSprite function to set the Flash variable.

CallSprite(@"MyFlashMovieIconName", #setVariable, "myFlashVariable","myFlashVariableValue")

Note:Make sure that"myFlashVariable" is an unique variable in the Flash movie.

Additional information
For more information about playing Flash inside Authorware, please refer to the TechNotes and articles listed below:

Using Macromedia Flash Asset Xtra (Part I) (TechNote 15061)

Using Macromedia Flash Asset Xtra (Part II) (TechNote 15062)

Using Shockwave Flash Object ActiveX control in Authorware (TechNote 12037)

Using the Flash Asset Xtra with Authorware Web Player (TechNote 13422)

Flash movies ignore actions when using the #frame property (TechNote 14373)

Using Flash movies in Authorware 5

Flash Asset Xtra Show Me

Anatomy of the ActiveX Show Me



AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_14152

Products Affected: