Problems with paths in flash

Source: Internet
Author: User
Problem

I first contact Flash when it was 2002, when the version of Flash is 5.0. For a long time, I will only do the timeline animation, and then as needed, I began to learn Dreamweaver, is the first contact with the path of this problem.

The paths in Dreamweaver are divided into two types: relative paths and absolute paths. Absolute path is given a complete address to access a file or directory, an easy to understand example is the equivalent of Windows access to the C-packing directory under the temp under the Temp.txt file with C:/temp/temp.txt to access the same, with http:// www.ishowing.net/blog/index.asp access to my blog on the way is absolute path. A relative path is accessed relative to a directory (typically the current location), such as now in the c:/temp/directory, and the command to return to the previous directory in Dreamweaver is ... /, similar to DOS under "CD ..." Command. For example, if the current directory is c:/temp, you can access the files in the C:/TEMP1/TEMP1 directory. /TEMP1/TEMP1, the first one. /representative returned to the directory, followed by the entry directory.

The path problem in Flash is similar to what it says above. The absolute path in Flash is represented by "_root", and "_paernt" is returned to the previous level. The path in Flash is primarily to access or manipulate the MC. For example, write code in the main timeline so that the MC transparency in the scene can be 0:

_root.mc._alpha = 0;

In this scenario, the transparency of a movie clip named "MC" will be 0. This should be the case if the code is written on the MC2 in the scene MC1:

_paernt._paernt.mc._alpha = 0;

It means to go up level two and then visit the MC to make it 0 transparent.

Especially in the use of Loadmovie, Attachmovie and other commands to pay attention to the path problem. For example, using Loadmovie to load an external flash into the MC of the main scene, you can add such code to the timeline if you want to reduce the transparency of the loaded movie to 50%:

_root.mc._alpha = 50;

Because the external flash is loaded into the MC, you can change the transparency of the entire flash directly using the command above.



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.