[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 623
  • Last Modified:

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

1 Solution
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 www.adobe.com/support/director.

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


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.


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now