469,623 Members | 933 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

Link a flash menu to HTML

roula
18
Hi,

I'm modifying a template (flash menu with html pages), when you click on the flash menu (about us for example) the corresponding html page is displayed, and the "about us" flash menu is highlighted.

This is already done with the template I bought, they have HTML files named ad index-1.html index-2.html, etc...

The problem is that they didn't have a link to the home page, so I modified one of the already existing menu and put "home page" which will link to index.html, but I am not able to highlight the "home page" flash menu.

here is the action script that's already there:

Expand|Select|Wrap|Line Numbers
  1. onClipEvent (load) {
  2.     num = 1;
  3. }
  4. on (rollOver) {
  5.     if (_root.link<>num) {
  6.         gotoAndPlay("s1");
  7.     }
  8. }
  9. on (releaseOutside, rollOut) {
  10.     if (_root.link<>num) {
  11.         gotoAndPlay("s2");
  12.     }
  13. }
  14. on (release) {
  15.     if (_root.link<>num) {
  16.         _parent["bt"+_root.link].gotoAndPlay("s2");
  17.         _root.link = num;
  18.     }
  19.     getURL("index-1.html")
  20. }
  21.  
This will highlight the menu when the page index-1.html is displayed, but I want it highlighted when index.html is displayed.

I don't know flash much. Are the numbers in the html pages names related to the action script? What should I change to highlight the menu when index.html is displayed?

If I change
Expand|Select|Wrap|Line Numbers
  1. getURL("index-1.html")
to
Expand|Select|Wrap|Line Numbers
  1. getURL("index.html")
none of the menus will get highlighted...


Thank you for your help.
Mar 10 '07 #1
3 10974
roula
18
OK everyone, I just figured this out heheh.

For anyone who doesn't know, in the HTML document itself, where you embed the flash, there is this code:

Expand|Select|Wrap|Line Numbers
  1. <param name="movie" value="flash/header_v8.swf?button=0">
the "button" value is the one that determines which menu should be highlighed, so I changed the button value in the index.html to be 1 and fixed the other values in other pages and it's working fine :)

Thanks
Mar 10 '07 #2
WOw! I am attempting the same thing but from no teplates...thanks for the code. I'd be interested in viewing your site...whats the URL?
Mar 19 '07 #3
I have the same template and had the same problem. Thank you for figuring it out!
Dec 4 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

18 posts views Thread by gconrads | last post: by
2 posts views Thread by icegray | last post: by
1 post views Thread by theJonster | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.