Sending/receiving variables Flash/AppleScript
Sending/receiving variables Flash/AppleScript
- Subject: Sending/receiving variables Flash/AppleScript
- From: JJ <email@hidden>
- Date: Wed, 10 Oct 2001 18:41:35 +0200
Taking no consideration on servers or http protocols,
Can I send variables or apple events to an applet, work with them and
(optionally) return some result? (from Navigator-swf or Projectors)
i.e.
FLASH
define two variables:
- the_text: "Perhaps I would drink some beer!"
- the_icon: 1
loadVariablesNum ("ProcessorScript.applet", 0, "GET");
// via loadVariablesNum, through navigator
getURL ("javascript:location='ProcessorScript.applet';");
// via Javascript, through navigator
getURL ("ProcessorScript.applet", "", "POST");
// via getURL, through navigator/Projector
fscommand ("exec", "ProcessorScript.applet");
// via FSCommand, through Projector
APPLESCRIPT
--> the_data = "Perhaps I would drink some beer?1"
on receiving_data(the_data)
Process_Data(the_data)
end receiving_data
on Process_Data(the_data)
set parsed_data to Parse_Data(the_data)
set (the_text, the_icon) to parsed_data
display dialog the_text with icon the_icon
end Process_Data
on Parse_Data(the_data)
set applescript's text item delimiters to "?"
set the_result to every text item of the_data
set applescript's text item delimiters to ""
return the_result
end Parse_Data
If it's possible, could you post me some "real" example?
JJ