[Mugeda HTML5 technical tutorial 13] how to add links

Source: Internet
Author: User

In many cases, the advertiser needs to add some external links to the animation. This document adds external links in the Mugeda animation to sort out the file.

1. Click the trigger Link

It is recommended that you click the screen to trigger the link. Because of traffic considerations, you do not need to jump to any click operation, which is not supported on some mobile devices. Therefore, we recommend that you trigger the jump link by clicking.

The implementation method is as follows:

Select an object on the stage, select "link" in the action, and enter the URL of the complete link in the input box, as shown in.

In this way, the user will jump to the corresponding page when clicking this object.

2. Automatically redirect links

If the user needs to use this requirement, it will automatically jump to a frame when it is executed. For example, the animation is played to the jump link of the last frame. This can be achieved as follows:

Select an object on the frame to jump to, select "action" in the action, and click Edit, select "Others"> "callback function"> "trigger event"> "appear"> "click Edit"> enter the name and parameters of the callback function (the link to jump ). For example

Then implement the callback function in the code.

Window. gotoUrl = function (obj, url ){

Window. open (url, '_ self ');

}

For example

This is achieved.

Note that automatic redirect is not a suitable method for mobile devices, because it may be blocked by the system. Therefore, it is best to perform a test on the target mobile device to use this method.

Summary

1. Generally, you can jump to the page by clicking and adding a link to an object.

2. Automatic jump is not a suitable method for moving, because it may be blocked by the system;

3. If you want to automatically perform some operations when a frame is executed, you can write your own callback function.

 

Related Article

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.