...

View Full Version : Javascript/Flash Integration



Forbes89
12-07-2006, 04:21 AM
Hey guys I need to figure out how to run javascript functions within flash, so the icons I click on to go to Home, Forums, Wishlist, Documentation, and
Contact page being a javascript function. The function is

updatePage('wishlist.html')


this.dockActions = function(label) {
switch(label) {
case 'Preferences':
{getURL("index.html");};
break;
case 'Blog':
{getURL("smallwishlist.html");};
break;
case 'Forum':
{getURL("features.html");};
break;
case 'Store':
{getURL("forums.html");};
break;
case 'Tech Support':
trace('Actions here to handle t.s.');
break;
Thank you for any advice.:thumbsup:

_Aerospace_Eng_
12-07-2006, 05:00 AM
Wait where are the icons located? Are they located in the html or in the flash? If they aren't in the flash why don't you put them in there? It would eliminate the need to use javascript at all.

Forbes89
12-07-2006, 05:41 AM
They are in the flash, but i have to use a javascript function to make it work because of the way i have the site written. Im using scriptaculous effects and what not......

_Aerospace_Eng_
12-07-2006, 07:12 AM
You can call javascript from flash like so

getURL("javascript:functioncall();void(0)");

Forbes89
12-07-2006, 09:34 PM
Thank you for your help



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum