Sending message/calling Flash from C++ or JavaScript

Hi everybody,\r\r\rIn our application we have an embedded Flash control (in a HTML file in our Browser control) that shows some games.\rI looking for some way to call / notify this Flash control from C++ or JavaScript when some events are happening outside of it in order to display something / set it’s internal values.\r\rAny ideas how (if possible) this could be acheived? \rI think there is an option to call JavaScript from C++ and then JavaScript call Flash, but that’s looks a bit tricky to me.\rI am new to Flash and wondered is there is a way to “call” the Flash control “directly” or send a message to it.\r\rThank you in advance.\r\rBest regards,\rSimeon

using javascript you can set variables in swf’s like this:\r1- give the swf an object name…\rlet’s call it ‘swf1’\r2- pass the variable or value…\rdocument.swf1.myVariable = “myValue”;\ror…\rdocument.swf1.myVariable = myJavascriptVariable;\r\ryou can replace ‘document’ with the name of the frame/window in order to pass variables from different frames/windows.\r:) \rjeremy

Hi,\r\rThanks a lot!\rSetting a variable is a great start, but can I call a function as well? Or can I monitor the state of this var (the value change) from Flash and do something if it happens?\r\rRegards,\rSimeon

you can call functions in swf’s from javascript AND you can call javascript functions from swf’s.\rhere’s how to call a function in a swf from javascript:\rdocument.swf1.myFunction(myParamaters);\rhere’s how to call a javascript function from flash:\rgetURL(“javascript:myJavascriptFunction(”+myParameters+")","_self");\r\rhope that helps!\r:) \rjeremy