Information Trapped Inside a Variable's Body
April 17, 2000
Now for that "Offical Site" button. We want to be able to link
to the official site for each movie we list. Right now there is
no action assigned to this button.
- Open the Instance Properties dialogue for the "Official Site"
button, (double click, CTRL - I, or Modify > Instance), and go
to the actions tab.
- Add and action: Get URL
- In the field for URL, type "url" (lowercase, without the quotes)
- Click the little button to the right that says "abc" and select
Expression, (equals sign).
- Select _blank from the Window drop-down menu so that the site
opens in a new window.
- Click OK.
Here's what we did:
- Get URL: tells the browser to point to a new URL
- URL = "url": this is a variable we defined in our text file,
data.txt
- Expression: this tells Flash to evaluate what we type in the URL
field as a variable or expression instead of literally, (if we
didn't change this option to expression the published Flash movie
would tell the browser to go to the url "url", which in most
cases would just reload the current page).
Now when you click on the "Official Site" button in the
published .swf, your browser will point to the URL we designated
in data.txt. Publish your movie and test it in a browser, (this
action won't work in the Test Movie mode).
Text Fields and URL Encoded Data
Tricks & Data, Flash Yin & Yang
Planning an Escape
|