(evt.bubbles) {
Parentdispatcher.dispatchevent (EVT);
}
}
}
More detailed articles, I think it is better to read the original textAt the same time, Peter Elst also wrote an example to use.For example, when you do not use event bubbling, you need to make MC1.MC2 broadcast events in the following ways.Mc1.mc2.addEventListener ("Someevent", Someeventhandler);
You can do this if you use event bubbling.
Mc1.addeventlistener ("Someevent", Someeventhandler);
Because of this event chain mechanism, you
throuhg a browser (and preferably on line so you can see the files loading in real time ). you also need to be exporting your code as ActionScript 2.
In the second part of this tutorial I'm going to show you how to use the movisponloader class in a real-world situation, in order to solve a common problem when assigning event handlers to MovieClips dynamically.
Next, I will introduce how to call MCL in real time. To adapt to more applications, we ofte
is not in this path, follow the path of the HTML! This is a point that many flash tutorials have overlooked. Therefore, sometimes absolute paths also have the advantage of absolute paths. [path problem source file download, download a glance at the
All debugging work is best done in the browser, not the IDE. And the script output must be AS2.Remember, for everything to work properly your need to is testing throuhg a browser (and preferably on line so you can The files loading in real time). You
when you try to use this new feature, you get an error report similar to the following:Referenceerror:error #1056: Cannot create property test1_btn on test.at flash.display::sprite/ Flash.display:sprite::constructchildren () atFlash.display::sprite$iinit () at Flash.display:: MovieClip$iinit () at Test$iinit ()In fact, this is because it is necessary to publicly (publicly) declare any objects that appear in your class (Buttons, MovieClips, Textfield
(and preferably on line so you can see the files loading in real time ). you also need to be exporting your code as ActionScript 2.
In the second part of this tutorial I'm going to show you how to use the movisponloader class in a real-world situation, in order to solve a common problem when assigning event handlers to MovieClips dynamically.Next, I will introduce how to call MCL in real time. To adapt to more applications, we often work dynamically
headaches that may arise from these features. In the next article, I will introduce some countermeasures that can be used by us. The newly introduced display list model has the greatest impact on resource management in as3. In flash 8 and earlier versions, when a display object is removed (using removemovie or unloadmovie ), the object and all its subnodes will be immediately deleted from the memory and all code running the object will be terminated. Flash Player 9 introduces a more flexible di
is testing throuhg a browser (and preferably on line so you canThe files loading in real time). You are also need to be exporting your code as ActionScript 2.
In the "second part of" This tutorial I ' m going to show you with the Moviecliploader class in a real-world situation, In the order to solve a common problem when assigning event handlers to movieclips dynamically.
Next, I'll describe the situation where you call MCL in real time. In order to
Effect Demo:
Specific code:
Onclipevent (load) {X=0//where The dot isY=0//where The dot isXmove=0//it ' s movementYmove=0//it ' s movement}Onclipevent (enterframe) {xmove+= (_root._xmouse-_x-x)/10//mathymove+= (_root._ymouse-_y-y)/10//mathX+=xmove+ (_root._xmouse-_x-x)/10//mathY+=ymove+ (_root._ymouse-_y-y)/10//mathClear ()LineStyle (1,000000,100)MoveTo (Oldx,oldy)LineTo (X,y)Oldx=x//this is, so, the next frame it knows where the dot was last frameOldy=y//this is, so, the next frame it knows wh
created on the timeline. Although it cannot be created through as, it can be referenced and controlled by as.
MovieClips everyone will use
The shapes are separated from the MovieClip a graphics container with only graphics objects. In shape, you can use the drawing API to draw various graphics through the Graphics object. Using shape instead of MovieClip can reduce the memory burden.
Sprite are movieclip that do not have a timeline, and in AS3 use
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.