# Solved: Linking in Flash



## a_k (Dec 6, 2005)

Does anyone know how to create a link in flash? Here is the banner I'm using:

http://img235.imageshack.us/my.php?image=banner0yu.swf

I need to link each button to a diffrent page on my site. I'm using Macromedia Flash 8.0. I'm pretty new to flash, so any help would be appreciated. Thanks.


----------



## Sequal7 (Apr 15, 2001)

Hello, Its actually pretty easy...
Open your movie. You need to add an actionscript to each button. To do this right click any button in the main movie and select "actions"

The actions window will open, dont worry about the complicated look, its actually pretty easy to set this up with the wizard.

The window that appears is split into two basic areas, on the right is the actions area where typed actionscripting goes (or in our case the wizard will input the data for us) The important thing here for newbys like you is the *"Script Assist"* button, make sure it is depressed (will look as if its inset if selected and the actionscript window (white area) area will shrink, now there are three areas, lower white text area, upper blue wizard area and the left folders area.)
Next, on the left you will see a list of folders. Click the Global Functions folder, then the Browser/Network folder.
Doubleclick to select the "geturl" action. You will see some text automatically input into the right field (this is called actionscripting, the makeup language of flash). 
At the top of that text you will now see a form area to type in your url and target. Input your desired page into that area for that button.

Repeat this for each button in your flash movie and your links will be set.

For your search button you will also need to change the variable to "send using Post" so your form data will be sent to the search page, other wise it wont function.


----------



## a_k (Dec 6, 2005)

Awesome. Thanks alot man. You're great!


----------



## Sequal7 (Apr 15, 2001)

Your very welcome, glad to have helped!


----------



## a_k (Dec 6, 2005)

Sequal7 said:


> Your very welcome, glad to have helped!


Just a small question. How did you get so good at web designing? Have you taken any classes ?


----------



## Sequal7 (Apr 15, 2001)

Not for the first five or so years, I mostly played around and learned by reading the Sams line of books (teach yourself ... in 24 hours) and coding and decompiling.

Today, yes, I have a degree in Computer sciences and I am a Microsoft Certified Systems Engineer and hold a certificate as a Oracle DBAdministrator.


----------



## a_k (Dec 6, 2005)

Is there a way I can link it to another file instead of a URL?

And how do I change the variable for my search box?


----------



## Sequal7 (Apr 15, 2001)

Do you mean for a download or something of that sort?
You can link to a file by typing http://website.com/location/to/your/file.type in the URL form area in the script assist.

You change the variable in the form by selecting "Send using Post" in the variable dropdown at the bottom of the script assist.


----------



## a_k (Dec 6, 2005)

lol i can't seem to find the send using post anywhere

what do I do after this part?


----------



## Sequal7 (Apr 15, 2001)

I believe the hitbox is actually on the bottom right of that search area. (the green triangle area) Click that area and try it.


----------



## a_k (Dec 6, 2005)

Sequal7 said:


> I believe the hitbox is actually on the bottom right of that search area. (the green triangle area) Click that area and try it.


I feel bad for asking all these questions, but I can't find variable dropdown anywhere!  Can you point it out here?



Thanks


----------



## Sequal7 (Apr 15, 2001)

Hello again

The area you want to set that up is in the movie, not the button. In the scene1 panel, select (right click) your actual button not the text box (you selected the dynamic text box in your earlier image http://img206.imageshack.us/my.php?image=where3gt.jpg, which was incorrect)

The button for that area is actually at the bottom right side of the text box, it is a green triangle from what I can see in your image. Right click that and you should then see the actions link.

If I still dotn make sense, can you repost a screenshot image of that top submit button in flash, (removing the actions frame in your image that you just posted and select the "HIT" keyframe so i can see the button's hit area.)


----------



## a_k (Dec 6, 2005)

When I right click on the small green triangle, it dosn't show me any action button like it does with the other buttons.



and I can't find the hit keyframe

Here is the direct link if that helps in anyway...


----------



## Sequal7 (Apr 15, 2001)

Layer 1 of your other image (http://img82.imageshack.us/img82/3788/030320061846550gl.th.jpg) showed the hit keyframe in layer 1, but I couldnt see the image as the actions panel was in the way.

Try hiding layer 71, then selecting layer 55 and actions.


----------



## a_k (Dec 6, 2005)

I give up! I don't have 71 layers, it only goes up to 20. But I think I got it now. I can't find send using post anywhere, I have been looking under script assist forever. 


Thanks for all the help though. I really appreciate it.


----------



## Sequal7 (Apr 15, 2001)

Ok Ok, forget the script assist, click your "go" grafic in the search area, place this in the script window

```
on (release) {
	getURL("yourpage", "_self", "POST");
}
```
Replace "yourpage" with the actual form processing page.

BTW:
You dont have script asssit on in that screen shot you posted, it must be depressed or inset to be turned on. Click the script assist wizard button, then your button for the form area, then you will see the actions asistance panels.


----------



## a_k (Dec 6, 2005)

Alright thanks. So do I use search.php for the "yourpage"?


----------



## a_k (Dec 6, 2005)

Sorry again, but I just wanted to double check... Do I put my search.php where you put "yourpage"??? Thanks man.


----------

