Actions

Loading the Web page

Using ActionScript you may open a Web page from Flash movie. It’s very easy to create buttons which will serve like traditional HTML links.

Analyze the screenshot below.

The movie has two layers.

Layer lrContent contents the button with the site name in the first keyframe, and about 60 frames interval where “loading in 5 seconds” text is displayed.

Layer ACTIONS has a stop() script in the first keyframe and one more script in the last keyframe.

To create such script you need to select Actions – Browser Network at the left side of Actions Panel. Double click or drag getURL script. Parameters for this script are name or URL (where address of Web page is entered – like http://www.mysite.com) and Target.

There are several options for the Target. For our example we used “_blank” – it opens a separate window, so you may continue to work on the lesson. “_self” – opens new page in the same window and substitutes the page from where you invoked the script. “_parent” and “_top” load new page in the upper-level frames of the current page if it uses framesets.

In our example the button in the first frame uses goToAndPlay(2) action which triggers the movie. It goes up to Frame 60 where getURL script is invoked and new browser window is opened.

Create your own “link” file. Make several buttons which leads to the pages of your interest.


Next