-
as3 uses parent[.]"Component name"] to control.
-
The operation similar to as2 is to operate b
-
;parent is the parent object that indicates the current target.
-
Are you loading components for each level? Check that the function named mc a d is written in mc a, right? Then it belongs to MC A.
You write parent[mc a].RemoveEventListener(, mc a d), because the path to mc a d is not specified, the compiler will think that your function mc a d is written in mc c.
Changed to parent[.]"mc_a"].removeeventlistener(,parent["mc_a"].mc_a_d)
It's so confusing, why isn't your ** all written in the parent?
-
Parent controls children with traversal bar.
for(var i in mc)
The child controls the parent or the parent.
Of course, when it comes to class inheritance, aggregations, etc., are a different story.
-
If your BTN and MC are in the FLA file, this is not easy to control** as follows:
import ;
stop()
clk);function clk(e:mouseevent)
-
Either send an event or use parent directly
-
The main timeline can be controlled with root
-
I don't know how you want to trigger the control, but I write it as using the button in the child video to control the button in the parent video, the following parentbt is the instance name of the button in the parent video, and chlidbt is the button in the child video. These are written in the sub-movie column. After running, click the button in the child video, and you will find that the label of the button in the parent video becomes done!
Finish. Of course, you can also do whatever else you want.
clickhandle);
function clickhandle(e:mouseevent):void
All ** are written in hao mc, right?
First, set up mouse event listening* for the HUAI MC
parent["huai_mc"].addeventlistener(,rolloverhandle);
Then write what to do once the mouse has passed*
function rolloverhandle(e:mouseevent): void you try.
-
I did what you said.,The result is very correct.,The output is as follows。。。
-
I'm using AS
Write on the button:
on (release)
-
Click the button and publish a custom event that listens for in main.
-
as3, yes.
Write on the top layer.
as on the button to write:
on (release)
It can also be written in main.
onclick;
function onclick()
The first and third are recommended, try not to write ** in the button, so that the error can be easy to find.
-
Since it's a component binding class, try not to access other elements on the stage, but to notify the other party through events for processing.
In fact, there are a lot of integrated installation packages that can put everything in place for you at once, but it is not recommended to do that. >>>More
The method used on the 3rd floor is as2.
There is a mistake on the 4th floor, and it would be nice to fix it. >>>More
Exercise the muscles in any part of the body; It's all about the right way to exercise; and cumulative effects; Difficulty in muscle exercises; disappears quickly; Different methods have different effects; It lies in persistence and hope.
The method is summarized by yourself, look at this, maybe it will help you 1: memorize words. In the long run, you can memorize 20 words a day. >>>More
Mobile phone control software, such as infrared control software, can replace the original remote control to control home appliances! If you don't have a remote control, you'll need a controller, connect to a home appliance, and connect to the Internet! Install the corresponding control software on your mobile phone and control it through the network! >>>More