Categories

How to assign link to image

Ray Taylor Май 23, 2011
Rating: 2.8. From 4 votes.
Please wait...

First of all you should open source “FLA” file in Adobe Flash editor. To add links to the button symbols in your flash movie do the following. First of all you should locate button symbol you want links be assigned to. Open the library (CTRL+L) and locate pages movie clip. Usually called “pages_all”, “pages”, “pages2”, “content” or “all_content”.

Using the timeline slider, navigate to the page where your image is. Locate the image and click on it to select. Now you should check whether it is a button layer or not. It must be a “Button”. If it is “Movie Clip”, “Graphics” or some other that differs from “Button” you can’t assign links to it in the right way. Don’t change it to the “Button” because it will damage original rollover structure.

 

As we can see it is not a “Button”.

Double click this symbol to get inside of it. Now, we can see the Button layer. Press “F9 key to open Actions panel. If this button has rollover effect, you will see following script code there:

  on (rollOver) {
gotoAndPlay(2);
}
on (rollOut) {
gotoAndPlay(10);
}

Add there following getURL action script code:

  on (release) {
getURL(“your_url_here”);
}

You should type URL button will be linked to as get URL function argument. For example, if you want to link button to your contacts page type the following:

  on (release) {
getURL(“http://mywebsite.com/contacts.html”);
}

Actually, get URL function accepts three arguments: URL, window type and variables send method. Window type argument specifies where new URL will be opened. If this argument is blank the link will be open in the same window. If you want to open it in a new window, use the “_blank” argument. Variables send method should be used if you are parsing some variables through the URL string. The available options are “GET” and “POST”. Next action script example calls products page with “item” variable with “9″ value in the same window using a GET method.

  on (release) {
getURL(“http://mywebsite.com/products.php?item=9″, “_self”, “GET”);
}

There is no other script in our example, therefore, we will just add this code:

  on (release) {
getURL(“http://template-help.com”);
}

Publish the .FLA file. You may use(CTRL+ENTER) short key or go to File->Publish Preview-> Flash

Эта запись была размещена в Работа с Flash и помечена как AS2.0, assign, flash, image, link. Добавьте в закладки постоянную ссылку.

Submit a ticket

Если вы не смогли найти подходящее решение проблемы, пожалуйста воспользуйтесь следующей ссылкой, чтобы отправить запрос команде технической поддержки.
Отправить запросВы получите ответ в течение 24 часов

Чат
We help you to choose the right product.