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
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…
There is a bug in Flash with named anchors where it doesn’t work if you just reference the anchor.
Try something like this…
[AS]on (release){
getURL(“java**script:window.location.href=‘file.html#anchorName’”, “_self”);
}[/AS]
If you use the common javascript function for changing the window location it should work… not sure though.
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
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
Here’s another zip I found somewhere.