I l @ ve RuBoard |
Flash movies are often used as a substitute for HTML on Web sites. A Flash movie can be a front door to a Web site or a navigation bar that appears throughout the Web site. Either way, there are times when the movie will have to trigger the browser to load a new Web page. Simple LoadingYou can easily replace the Web page that the Flash movie is on. All it takes is a getURL command. Think of it as the equivalent to the <A HREF> tag in HTML. Here is a button that replaces the current page with another one: on (release) { getURL("anotherpage.html"); } You can use a relative URL, as in the preceding example, or a complete absolute URL to direct the user to another Web site. You also can direct the user to another Web site by using hypertext links in text fields. These work just like <A HREF> tags ”they actually are <A HREF> tags. They don't require any ActionScript code at all. Targeted LoadingYou can use a second form of the getURL tag to target a frame or window in the browser. If you have never used frames or windows in your HTML code, you probably don't need them. However, if you have used them, you know that frames and windows all have names . You can refer to a named frame or window by using a second parameter in the getURL command. So if you are using frames and have the movie in a frame named Navigation and the content in a frame named Main, you could tell the frame Main to load the page summary.html with a button like this: on (release) { getURL("summary.html","Main"); } You could do the same to target a window if it was named Main. There are also four special targets that tell the browser to do special things. Here is a list:
What if you want to create a new browser window that is not the default size and settings? You'll need to use JavaScript to do that. I'll explain later this hour . |
I l @ ve RuBoard |