Date: 2004-12-01
Hits: 55440
Rate:

email to friends
printFlash Actionscript getURL Command
HTML or Hyper Text Markup Language is a markup language for documents on the WWW or World Wide Web. The interesting part of documents on the WWW is that users can jump from one document to another by clicking onto the hot spots. These hot spots serve as hyperlinks to the other locations. The locations can either be within the same document
<back to homepage> or link the browser to another different site <googlesearch>.
In flash mx as well as flash mx 2004 and flash 8, hyperlink is achievable through getURL() command. The getURL() command provides a mean for the browser to jump from one page to the other. In addition, getURL() can also be
used to open an executable application or an email application. Here, I'll show you three different usages of flash getURL() command:
A. Flash hyperlink to open up another hypertext documents
B. Flash hyperlink to open an executable file
C. Flash hyperlink to open an email application
A. Flash hyperlink to open up another hypertext documents
Brief Tutorial Outline: Click the button below to open up a new document. It will link you to http://www.google.com.
Let's start our flash getURL() tutorial journey here, shall we?
1- Create a new flash movie and change the size to 120px (width) x 70px (height).
2- Choose a rectangular tool by clicking on
or press R on your keyboard.
3- Create a small rectangle at the centre of the stage.
4- Choose an arrow tool by click on
or press V on your keyboard.
5- Select the rectangle by double click on it.
6- Click 'Insert' > 'Convert to Symbol' > 'Button' for the behavior; Then type 'hyperlink' in the name field and click ok.
7- Now you have the rectangle as a button instance.
8- With your arrow tool still selected, click on the flash button instance which you have just created.
9- Click 'Window' and choose 'Actions' or press F9 on your keyboard.
10- Make sure you have turned the scripting mode to Expert Mode. You can accomplish this by clicking on the blue arrow on top right corner of Actions Panel and select Expert Mode.
11- Type the following actionscript provided below into the white space:
12- Now test your movie by pressing 'Ctrl+Enter'.
Next, we move on to flash getURL for opening an executable file such as a PDF file.
Click here to continue to flash actionscript getURL for opening an executable file. You may also like to read the flash actionscript getURL for an email application by clicking here.


