This content has been marked as final. Show 5 replies
You can send commands from flash to director with getURL
for example, to quit the Director movie by clicking on a button in a
to send Director to a frame labeled "menu", you could use this:
getURL("lingo: go \"menu\"");
note how I escaped the quotes with slashes...
Also, you can get and set variables in Flash from Director with
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.
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
Then, in flash, you can call this handler by using:
You can also pass a parameter along to the handler, eg:
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,
you can also directly access the swf sprite with dot syntax from director. eg:
sprite("debugPanel").debug_text_field1.text = "hello"
What i want is simply to call director functions as "quit" or "go to frame". Thanks for your help. This all helps to what i need.
I used the first help: