If you want to have Flash link to an external site, or use Flash for navigation, it is a two step process.
- Tell Flash where to go
- Tell Flash to go there
Part 1: Tell Flash where to go:
In the following code, we are creating a new variable called “link1”, and then defining the destination, which is called “page1.html”.
var link1:URLRequest = new URLRequest("page1.html");
Part 2: Tell Flash to go there:
In the following code, we tell Flash to go to this destination, by “navigating” to the URL (the variable that you defined in part 1.
Notice how in part two we use the same variable name (link1) in both parts. Often part 2 is found in a function, called by clicking on a button/movieclip button.
Remember that for each link you have, it is a two step process. Make sure to use unique variable names, and to change the destination when copying/pasting for different links.
Below you will find an example file of a Flash nav with 3 links that go to “page1.html”, “page2.html”, and “page3.html”. If you look at the actions I have commented the code to explain each section.