Creative FL Menus Pack Forum


box Creative FL Menus Pack
Creative FL Menus Pack is a package that contains the following products bundled at a special price: Creative FL Dropdown Menu, Creative FL Vertical Menu, Creative FL Tabbed Menu.

Find out more about Creative FL Menus Pack

Thread: Calling Javascript Function from Flash? Or using the "as:" to call ExternalInterface.Call?

title left
User Details
message
title right
Fred Fulcher

post date:
2008-05-15 19:38:31
Question I found and read the documentation on calling a javascript function from flash using the new api ExternalInterface.Call function however, i am not able to get this to work. here is my action script code that i tried to use from button_actions.fla sample file

trace("Button Actions Sample");
trace("-----------------------");
var my_menu_listener=new Object();
my_menu_listener.changed = function() {
switch (my_menu.selectedID) {
case "home": getURL("index.html"); break;
case "about": ExternalInterface.Call("ajaxpage","About/about.html","leftcolumn"); break;
case "support": trace("The Support button was selected"); break;
case "forum": trace("The Forum button was selected"); break;
case "store": trace("The Store button was selected"); break;
}
}

my_menu.addListener(my_menu_listener);

Also i noticed in your help documents you mention the abiilty to use a action script function with "as:" tag can someone provide a little more information and tag?

Catalin Serban [Extend Studio]

post date:
2008-05-16 09:26:14
<p>Hi Fred ,
If you can see the trace then the menu is working as it should. <br />
Here are some samples/tutorials on External Interface:<br />
<a href="http://devel.teratechnologies.net/swfformfix/extinterfaceexample.php">http://devel.teratechnologies.net/ swfformfix/extinterfaceexample.php</a><br />
<a href="http://www.nathanderksen.com/blog/2005/08/28/flash-8-externalinterface-example/">http://www.nathanderksen.com/blog/2005 /08/28/flash-8-externalinterface-example/ </a><br />
<a href="http://blog.lastashero.com/2005/10/tutorial_understanding_externa.html">http://blog.lastashero.com/2005/10/ tutorial_understanding_externa.html </a></p>
<p><br />
Regards,
Catalin Serban



</p>
Fred Fulcher

post date:
2008-05-16 10:25:52
Yes thats the issue where would I see the trace? When I click on the buttons nothing happens even the getURL?
Fred Fulcher

post date:
2008-05-19 22:17:25
Catalin the problem is I can't see the traces and it seems that its not recognizing my ids i am not using the xml but the button that you click where you can edit the menu items any suggestions on that portion?
Horea Radu [Extend Studio]

post date:
2008-05-20 05:11:44
Hi Fred,

Could you, please, send us the FLA file you are working on at support@extendstudio.com so we can look into it?

Best regards,
Horea RADU, Extend Studio.