Adobe Lingo communication with Flash Actionscript

See gthe code in actionscript. "gFlashServicesArray" is a global variable in lingo. it contains a value  = {0,0,0,0,0] if all 5 checkboxes from the flash asset in director are set to off. If director, the user can turn on or off any of the fix buttons and "gFlashServicesArray" will get updated (Example: the first button is clicked, so the value of "gFlashServicesArray" is now = {1,0,0,0,0], etc).

I need to be able to update "gFlashServicesArray" in director and then read it in flash to determine if the button is in the On or Off state.


I need to set the state in flash and then update "gFlashServicesArray" (which ios what I was trying to do originally.
on (release) {
	click = getURL("lingo:_global.gFlashServicesArray[1]");
	trace("Click: " + click);
	if (click == true) {
		click = false;
	} else {
		click = true;

Open in new window

Who is Participating?
not sure which version of flash  you're using but you can use FSCommand and probably External Interface.

From Help File re fscomman.
Usage 3: The fscommand() function can send messages to Macromedia Director. These messages are interpreted by Lingo (the Director scripting language) as strings, events, or executable Lingo code. If a message is a string or an event, you must write the Lingo code to receive the message from the fscommand() function and carry out an action in Director. For more information, see the Director Support Center at

i'm not sure if this will work and I don't have director to test it with but you may be able to use ExternalInterface.
that's why i use to communicate between Flash and C#.

so in flash to access a function in the external app"flashToC",msgToC);

and in order for the external to access flash

ExternalInterface.addCallback("initBtn", this,initBtn);

this way you must have a function in flash called initBtn which the extenal app can access.

so in your case try setup functions which accepts value and sets the variable to that value.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.