Flash as3 component and scene assignment issues

Updated on technology 2024-04-14
14 answers
  1. Anonymous users2024-02-07

    Output current no is nan in viewmode

    Output in the component? as3 can't write ** in the component anymore, how do you output in viewmode? So I assumed it.

    function overed(e:event):voidvar flashmo_xml = new xml(;

    trace(;Here the output is NAN, and you can check if there are any tags in your XML file.

    If it's elsewhere on this page, explain: flash loading takes time, even if it's short, there is time, you may have taken the value before he loads it, so it's nan. That's why we often listen for loading to complete.

  2. Anonymous users2024-02-06

    Let's first explain what NAN is - it is an abbreviation for not a number, which means that NAN will appear when you assign non-numeric data to a variable of type number. Your flashmo machine thinks it's an xmllist object, so this error occurs.

    The solution is simple, let's say the content in your XML is:

    Then you can write.

    to take the value.

  3. Anonymous users2024-02-05

    The component name is not related to writing **. You can create a new ** layer directly in the C1 component and write user = directly"123123"Try it. If it is not displayed, you will right-click on the dynamic text box --" to arrange --- move to the top level; If it is not displayed, you can see if the color is heavier than the background in the properties of the dynamic text box.

  4. Anonymous users2024-02-04

    In other words, there are no strict global variables in , and all variables are local. If you create a variable p in element a and want to call it in root, then you can take the absolute path to access it, but because you are accessing it at the instance level, you can't access it at all, and var p:string="p";Because it's a private variable inside the class, it's impossible to access it from an encapsulation standpoint, but there are ways to do it externally to access the inner variable.

    First of all, you need to click on the property of the movie clip you created in the library, check "Export for actionscript", and then enter a in the class name, then this symbol is a class, but the symbol in the library that becomes a class is not allowed to create variables in the timeline, so you must delete the variables in the symbol. Then you ctrl+n create a new class file, copy the following ** into the class, and save it in the same root folder as your FLA component:

    package public function get _p():string}}

    In this class, you declare what you call the variable p, and read the value of the variable p inside the class by the property p.

    Then you write the following script on the first frame of the Main Scene Timeline:

    var a:a=new a();

    trace(a._p);

  5. Anonymous users2024-02-03

    In the scene:

    onclick);

    function onclick(e:mouseevent):void

    component: var p:string ="p";

    onclick);

    function onclick(e:mouseevent):void

    2 ways.

  6. Anonymous users2024-02-02

    How do you say that there are no strict global variables in in, all variables are local. Create a variable p component and the root directory to be called, and then you can take the absolute path access, but because you're in instance-level access, they can't implement access at all, and var number:string="p" internal private variables, so the package from the point is inaccessible, but we can take some steps to implement external access to the internal variables.

    First you have to create a movie clip library in the midpoint property check "Export for actionscript", then in the class name, enter a, then this element is a class, but a class library component can't create variables on the timeline, so you have to remove the element in the variables. Then you press Ctrl + N to create a new class file, copy the following ** to the class, and save it in the same root folder as the FLA component:

    Import. Wrap. Sprite;

    Class A extended Sprite.

    Public function p(): string }

    In this class, declare your so-called variable p to read the property within the property of the p-class by the value of the variable p.

    Then you write the first frame script of the main scene timeline as follows:

    var a:a = a();Target.

    Tracking (a.)_p);

  7. Anonymous users2024-02-01

    Send me the file to see wyfftell@163 dot com

  8. Anonymous users2024-01-31

    The document class is not a method for the overall collection of the timeline, it should provide a common method, which is called by the timeline as a whole, and your thinking is completely wrong.

    The document class provides the initialization function**,Data establishment**,What function to achieve each frame,You can write it on the timeline,You can also specify the corresponding element binding component binding class on each frame,Specific**Write to the class,A document class is used as a large and complete class,It's better not to use the class,Just write the timeline。

    Of course, this situation is serious for beginners, but think about how to rewrite it yourself.

    Finally, leave the Q number.

  9. Anonymous users2024-01-30

    1.Button Naming Select the button in the scene, and then enter the name of the button in the Properties panel with an Instance Name, so that it can be used in the scene.

    Then let's say you want to add a listener to the button.

    not, dosomthing);

    function dosomthing(e:event): voidThe second question is a bit unclear...

    What effect do you want to do?

  10. Anonymous users2024-01-29

    In the main scene, in the end, just one frame, and the other fully new layers are put in.

    If you have two frames, you will rotate between the two frames, and you won't animate the components in your frames, and unless you make the number of frames the same as the ones in your symbols, the animations in the components will keep jumping.

  11. Anonymous users2024-01-28

    Upstairs is good, either add stop() to the last frame of the main scene;

    The specific problem is specific, and your description is not detailed enough.

  12. Anonymous users2024-01-27

    It can be used.

    scene 1");

    In this case, you need to remove the "rigorous mode" from the script settings of the release settings, otherwise the compilation will not pass.

  13. Anonymous users2024-01-26

    The display list uses the addchild() and addchildat() methods to add the display object to the container, instead of adding it to the timeline, from the library to the drag and drop in the author environment (second stage) and go to add to the timeline, that is to say it doesn't matter if the timeline exists or not, just call, and then it is added to the display list, think of the sprite class, it is a container that has no timeline display, the role of the timeline here is to control the time of adding only the added, Unless removed or added to another container, it will always exist, and the other scene is just a schedule of division of labor, and actually a schedule, so the scene is not really in touch with the animator to use it more easily managed.

    How to deal with it, it depends on what you want to do, if you want to show only some elements in a scene, then you can use the removechild() method of removechild() to eliminate unnecessary display objects, and the settings are also visible, for example, in the second case to determine if there is a dynamic deletion:

    If (loginmc).

    3。Introducing the use of addchild(), which is the best looking official language reference, no matter what the authoring tool is done regularly by pressing f1, unless you never forget, the following addchild() official language reference of China:

    Use addchild 28 29

    target="blank">

  14. Anonymous users2024-01-25

    If you want to determine whether visualization A is loaded into container B, return ture or false

    For example, if written directly on the main scene frame, the target instance name is"mymc"if(

Related questions
8 answers2024-04-14

Integrated op amps have many advantages over discrete component amplification circuits, and their outstanding advantages are: >>>More

5 answers2024-04-14

Gonggong was angry, touched the mountain with his head, and stabbed the sky.

17 answers2024-04-14

First, with only a small amount of H+, the carbonate reacts as follows. >>>More

5 answers2024-04-14

1, the plum and snow are three points white, but the snow loses the fragrance of the plum >>>More

8 answers2024-04-14

Answer]: Barcodes have two main applications in logistics: the first is applied to the point of sale of retail stores, in addition to printing receipts to customers on cash transfer machines, retail point of sale applications are to provide precise inventory control at the store level; The second application is for the handling of materials, through the use of scanning, material handlers are able to track the handling of products, the location of storage of orange tomatoes, loading and warehousing. >>>More