Flash return to Javscript 
January 7th, 2009, 05:50 PM
| | Member | | Join Date: Sep 2007
Posts: 43
| | |
So i got a question is it possible to do this
in my flash file is a button and when i press that button i what what flash would return to my javascript code that i pressed what button
so is it possible to do this and if it is how???
| 
January 8th, 2009, 01:46 PM
| | Familiar Sight | | Join Date: Jul 2007 Location: United Kingdom
Posts: 202
Provided Answers: 1 | | | re: Flash return to Javscript
yes just assign javascript function in flash
it's works fine.
| 
January 8th, 2009, 05:12 PM
| | Member | | Join Date: Sep 2007
Posts: 43
| | | re: Flash return to Javscript
and hot to do that can you write me a demo or something
| 
January 10th, 2009, 08:11 PM
| | Familiar Sight | | Join Date: Jul 2007 Location: United Kingdom
Posts: 202
Provided Answers: 1 | | | re: Flash return to Javscript -
on (release, rollOver)
-
{
-
getURL ("javascript:NewWindow.close(); void(0);");
-
}
-
advance thing is create the function in html file & just call it on simple way.
Last edited by Frinavale; January 13th, 2009 at 09:55 PM.
Reason: code tags
| 
January 13th, 2009, 09:18 AM
| | Expert | | Join Date: Nov 2007 Location: Germany
Posts: 285
| | | re: Flash return to Javscript
let's say you inserted your flash with:
into your html-page. Then you need to insert for example: -
<SCRIPT language="Javascript" event=FSCommand(command,args) for=MY_FLASH>
-
alert("You pressed" + command);
-
</SCRIPT>
-
| 
April 23rd, 2009, 12:09 PM
|  | Member | | Join Date: Apr 2009 Location: Kochi (COK), India
Posts: 39
| | | re: Flash return to Javscript
getURL is not a good way to calling javascript function
its better to use ExternalInterface.call( ); -
if(ExternalInterface.available){
-
ExternalInterface.call("alert","This call is from flash movie!");
-
}
-
See Adobe Live Docs | 
May 18th, 2009, 09:13 AM
| | Member | | Join Date: May 2009 Location: Goregaon, मुंबई IN :)
Posts: 85
| | | re: Flash return to Javscript Quote:
Originally Posted by chaarmann let's say you inserted your flash with:
into your html-page. Then you need to insert for example: -
<SCRIPT language="Javascript" event=FSCommand(command,args) for=MY_FLASH>
-
alert("You pressed" + command);
-
</SCRIPT>
-
|
can you pls tell me how to call that FSCommand(command,args) from javascript??
| 
May 20th, 2009, 11:11 AM
| | Member | | Join Date: May 2009
Posts: 81
| | | re: Flash return to Javscript
ExternalInterface.addCallback()
Look up the Adobe documentation on it.
| 
May 20th, 2009, 11:26 AM
| | Member | | Join Date: May 2009 Location: Goregaon, मुंबई IN :)
Posts: 85
| | | re: Flash return to Javscript
Thanks @unauthorized
Hello tader,
you can use JavaScript and Flash Integration Kit ( http://weblogs.macromedia.com/flashjavascript/ ), - http://weblogs.macromedia.com/flashjavascript/
it can call javascript from flash actionscript and vice versa.
regards,
Nitin Sawant
|  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 225,662 network members.
|