From: dbento on
I have build a flash menu to use in my director movie.
What i want is simple tasks, as quit the app from a flash button.

If i could send vars from flash to director is enough, but i couldn't do that.
I couldn't find any examples to do something like that.

Can anyone help me?

From: Mike Blaustein on
You can send commands from flash to director with getURL

for example, to quit the Director movie by clicking on a button in a
flash swf:

on(release){
getURL("lingo: halt");
}

to send Director to a frame labeled "menu", you could use this:

on(release){
getURL("lingo: go \"menu\"");
}

note how I escaped the quotes with slashes...
From: Mike Blaustein on
Also, you can get and set variables in Flash from Director with

getVariable()
setVariable()

check out the docs for syntax and examples

You must save the swf as Flash 8 or earlier if you are using Director MX
2004. You can use the Flash 9 format if you are usind Director 11.
Either way, you can not use AS3. You must use AS2.
From: duckets on
As well as directly using the "lingo:" event, in the flash GetURL command, you
can also call event handlers directly. I find this method preferable, as it
means you don't end up with lingo code distributed throughout your your flash
file!

My favoured method: In Director, place a behaviour on the flash sprite.
Then create handlers in that behaviour for each type of event that you want to
trigger from flash. Eg,

on quit me
-- your quit code here
end

Then, in flash, you can call this handler by using:

GetURL("event:quit");

You can also pass a parameter along to the handler, eg:

GetURL("event:myHandlerName 5");

Or if you want to pass a string, you need to escape the quotes for that string:

GetURL("event:myHandlerName \"a string parameter\"");

hope this helps,

- Ben

From: Sharkmenace on
you can also directly access the swf sprite with dot syntax from director. eg:

sprite("debugPanel").debut_text_field1.text = "hello"