I have a flash movie that has 3 links. Each link navigates to different sections of a html page via the getUrl event onrelease: url(index.html#section1) etc.
I also have a navigation bar setup inside the html page (which I want to remove)... The code in the HTML is basic: see below:
The javascript below calls some jquery files when the links are clicked and scrolls to the associated section. I want to use that javascript in my flash movie and navigate from the movie. I don't know how to change the function below to make it work with the flash links that I have. can anyone assist me with this? Here is the Javascript I have in my HTML page. (and it works fine by the way.Code:<ul class="nav"> <li><a href="#section1">1</a></li> <li>2</li> <li><a href="#section3">3</a></li> </ul>
Code:<!-- The JavaScript --> <script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="jquery.easing.1.3.js"></script> <script type="text/javascript"> $(function() { $('ul.nav a').bind('click',function(event){ var $anchor = $(this); /* if you want to use one of the easing effects: $('html, body').stop().animate({ scrollLeft: $($anchor.attr('href')).offset().left }, 1500,'easeInOutExpo'); */ $('html, body').stop().animate({ scrollLeft: $($anchor.attr('href')).offset().left }, 1000); event.preventDefault(); }); }); </script>


Reply With Quote