Flash menu link dynamic management

Source: Internet
Author: User
Tags modify variables
Flash Menu | news | link

As you know, once you have made a button in flash, you usually add a link code directly to the button, such as:

On (release) {
GetURL ("http://linxz.2vinfo.com", "_blank");
}

Such a file once generated SWF format, if you want to modify the link, but also open the Flash program to modify the code, in case there is no flash MX, such as the program, it is even more trouble.

Here I found a relatively simple way to share with you, I hope you like.

The SWF file above is a link made using a text file. The method is also very simple, just use loadvariablesnum () to import text content, in the text content is

L1=http://linxz.2vinfo.com/blog&l2=http://linxz.2vinfo.com

L1 and L2 are two variables,& is the interval between variables,= The following content is the URL.

The production method is very simple, in the home scene two new layer, each layer two frames. One layer is named "code" and the other is "button." "Code" Layer two frames are key frames, the first frame code for

< Class=code>loadvariablesnum ("Menu.txt", 0);

The second frame is a

Stop ();

Add two buttons to the button layer, and the event for each button is

On (release) {
GetURL (L1, "_blank");
}
On (release) {
GetURL (L2, "_blank");
}

Takes two variable values from the text. If you are interested. Click here to download the source file



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.