`
cuixuxucui
  • 浏览: 346257 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Event.FRAME_CONSTRUCTED

 
阅读更多

_oPBox是个MovieClip,共3帧,其中第1帧有个TextField,名字叫txt_leftTime。

 

_oPBox.gotoAndStop(1);

_oPBox.getChildByName("txt_leftTime") as TextField

 

在某些情况下,我发现getChildByName会失效,即取到的对象变成了null.

 

后来查到了原因,在MovieClip使用gotoAndStop切换帧的时候,都会重新初始化里面的变量和内容。当未初始化完毕时,去取getChildByName,就有可能取不到。

 

解决办法是:

_oPBox.addEventListener(Event.FRAME_CONSTRUCTED, constructedHandler);

_oPBox.gotoAndStop(1);

 

然后在constructedHandler中去取_oPBox.getChildByName("txt_leftTime") as TextField

分享到:
评论

相关推荐

    learn_constructed_function.zip_learn c

    该程序主要是展示构造函数的功能与使用方式。里面包含很详细的说明。

    spmi.rar_spmi

    add a device previously constructed via spmi_device_alloc.

    CBST.rar_The Keys_bst

    Now given a sequence of distinct non-negative integer keys, a unique BST can be constructed if it is required that the tree must also be a CBT. You are supposed to output the level order traversal ...

    php-gd-image-watermark.zip_The Image

    Watermark Creation We create the mark using a pseudorandom generator and a bi-valued +/-1 random sequence. The sequence is constructed as follows:

    C_Sharp_Programming.zip_Quick

    A very well constructed C# programming book that will allow even non programmers to get a quick grasp on C# basics.

    ldpc.rar_NOISE

    In information theory, a low-density parity-check (LDPC) code is a linear error correcting code, a method of transmitting a message over a noisy transmission channel.[1][2] An LDPC is constructed ...

    elec_brushless_dc_motor.zip_As One_SIMULINK_brushless_brushless

    a servomotor) can be constructed and parameterized based on datasheet information. The motor and driver are modeled as a single masked subsystem. If viewing the model in Simulink(R), the Motor and ...

    django_project.zip_WEB开发_Python_

    It s a web page constructed in a django framework including shop

    pruebas.rar_matlab例程_matlab_

    this code is for a filter constructed using transconductors in the gm-C code can get answers frecuancia pole and phase

    NVDT:一种从基因序列预测蛋白质与蛋白质相互作用和非相互作用的新计算方法

    NVDT 一种新的计算方法,用于从基因序列预测蛋白质与蛋白质的相互作用和非相互作用。第1部分:数据集---每个物种的正负样本。 每个.xlsx文件都有两列... (2) Constructed-Datasets :从DIP数据库中收集阳性样品,并通

    C#多功能成语字典。这是一个用C#完成的多功能成语字典。

    /// The index table constructed by the first word in each idiom. /// public char[] firstWordConstructedIndexTable; /// /// Represents the index table's count. /// public int ...

    MahNMF Manhattan Non-negative Matrix Factorization

    % SIM_MTX : Similarity matrix constructed by 'constructW'. % GPP_MTX : Group pattern for boundary of all groups. % TOL_INNR : Stopping tolerance of inner iterations. Default is 1e-2. % TOL_OUTR : ...

    matlab2tikz/matlab2​tikz 源码

    For plots constructed with third- party packages, your mileage may vary. The workflow is as follows. a. Place the matlab2tikz scripts (contents of src/ folder) in a directory where MATLAB can find ...

    基于WebKit无图形化浏览器jBrowserDriver.zip

     // constructed using Settings.Builder  JBrowserDriver driver = new JBrowserDriver(Settings.builder().  timezone(Timezone.AMERICA_NEWYORK).build());  // This will block for the page...

    程序员密码学 英文电子书

    Preface . . . . . . . . . ....Chapter 1 Introduction ....Introduction ....Threat Models .... ....Cryptographic Goals ....Privacy ....Constructed Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . .29

    RS-274X_Extended_Gerber_Format_Specification_201201.pdf

    Other files are not invalid but poorly constructed. Especially troublesome are painted or stroked pads and copper planes. Poorly constructed files take longer to process, require more manual work and ...

    ag_news_csv.tgz

    The AG's news topic classification dataset is constructed by Xiang Zhang (xiang.zhang@nyu.edu) from the dataset above. It is used as a text classification benchmark in the following paper: Xiang Zhang...

    ag_news数据集

    The AG's news topic classification dataset is constructed by Xiang Zhang (xiang.zhang@nyu.edu) from the dataset above. It is used as a text classification benchmark in the following paper: Xiang Zhang...

    PHP解耦的三重境界(浅谈服务容器)

    在完成整个软件项目开发的过程中,有时需要多人合作,有时也可以自己独立完成,不管是哪一种,随着代码量上升,写着写着就“失控”了,渐渐“丑陋接口,肮脏... echo 'constructed!'.PHP_EOL; } } class FileSystem{

    wikiqa 数据集

    WikiQA is constructed using a more natural process and is more than an order of magnitude larger than the previous dataset. In addition, the WikiQA dataset also includes questions for which there are...

Global site tag (gtag.js) - Google Analytics