View Full Version : Javascript/flash Issue
tobydog
May 8th, 2003, 12:23 PM
I posted this in the MX forum, but did not get a solid answer.
I will try here.
I have a flash menu on an html page. The page is long - verrrry long. I would like to have the buttons on my menu reference anchor points down the page. In order to do this, I believe that I need to call a javascript with the button. This is where the problem begins. I do not write javascript. I have researched the web, and can find no code relating to my problem.
ANY HELP IS GREATLY APPRECIATED...
TD
Jubba
May 8th, 2003, 12:33 PM
if you already have the anchor points in the HTML page - for the Flash menu just try
on(press)
getURL("ADDRESSTHEANCHOR", "_SELF")
}
exactly like you would if you were using regular HTML...
lostinbeta
May 8th, 2003, 12:38 PM
There is a bug in Flash with named anchors where it doesn't work if you just reference the anchor.
Try something like this...
on (release){
getURL("javascript:window.location.href='file.html#anchorN ame'", "_self");
}
If you use the common javascript function for changing the window location it should work... not sure though.
tobydog
May 8th, 2003, 01:04 PM
Not working...
It must be the function Im using. I will try to find "the common one".
I'll let you know if it works
Thanks guys.
TD
lostinbeta
May 8th, 2003, 03:38 PM
I just found this article on macromedia.com, maybe it will help...
http://www.macromedia.com/support/flash/ts/documents/jrtest1.htm
tobydog
May 8th, 2003, 05:09 PM
Here is what I ended up with...
This is what I placed on my html page
function myfunc(place)
{
window.location.hash = place;
}
This is what I ended up with on the button
on (release){
getURL("javascript:myfunc('#anchorname)");
}
After many attempts and failures, this finally works.
Thanks for all of your help.
TD
eyezberg
May 8th, 2003, 05:40 PM
Here's another zip I found somewhere.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.