The understanding of bubble events involves three phases:
1. In the capture phase, the eventphase attribute value is 1.
2. Attribute Value 2 of eventphase in the target stage
3. In the bubble stage, the eventphase attribute value is 3.
The above is described in the actionscript3 Palace Road by heiyu. Let's take a look at the following example:
For example, if you click the last 3rd containers, the event flow process is as follows:
If you click the event in container C to stop the click event, when you drag the container, the container and
The other containers above will be moved. The containers below the clicked container will not move, because in the event of the clicked container,
The bubble has stopped, that is, the tendency to bubble to the stage has also stopped.ProgramIn E. stoppropagation (), is the key to stopping bubble
.
If you do not stop the Click Event bubble in the event of container C, the click event will bubble to the container closest to the stage.
Is the bottom big container. Of course, when you drag a large container, it is to drag the large container, and the other containers on the large container will also
Move.
Source code: Http://files.cnblogs.com/bigbigdotnet/event.rar