`
shake863
  • 浏览: 664714 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

AS3 点点【 二 】 stage-root-this

    博客分类:
  • AS
阅读更多


stage-root-this
先看Flash帮助文档里的图示,最上边的舞台就是stage了,root属于第2层,也就是说root是stage的子类,这2者的关系可以使用下边代码测试:

trace(stage);//[object Stage]
trace(root);//[object MainTimeline]
trace(root.parent);//[object Stage]
trace(root.parent==stage);//true

另外继承方面:Stage -> DisplayObjectContainer -> InteractiveObject -> DisplayObject -> EventDispatcher -> Object。
而root则是继承自DisplayObject。至于this,和其他OOP语言一样,是指向当前引用的对象,例如在主时间轴上的this,就是root。
分享到:
评论

相关推荐

    stage root zip

    在ActionScript3中,`stage`和`root`是两个非常重要的概念,它们与Flash Professional中的FLA文件以及AS3程序的层次结构紧密相关。在深入理解这两个概念之前,我们首先需要了解FLA文件的基本结构。 FLA文件是Adobe ...

    flashAS2和AS3的自适应分辨率改变元件

    在Flash开发中,AS2(ActionScript 2.0)和AS3(ActionScript 3.0)是两种主要的编程语言,用于创建交互式内容,包括动画和游戏。本主题将深入探讨如何使用这两种语言来实现SWF(Shockwave Flash)文件的自适应...

    AS3.0+XML列表一曲一图音乐播放器

    this.stage.scaleMode = flash.display.StageScaleMode.NO_SCALE; this.stage.align = flash.display.StageAlign.TOP_LEFT; configURL = "settings.xml"; if (this.root.loaderInfo.parameters.configURL != ...

    FLASH AS3.0部分常用代码

    this.stage.displayState=StageDisplayState.FULL_SCREEN; ``` 八、退出代码 FLASH AS3.0 中可以使用 fscommand 函数来实现退出代码。 ```actionscript tc_btn.addEventListener(MouseEvent.CLICK, tuichu); ...

    occam一维反演

    c 3) rms misfit larger than required, and c 4) there are no irrecoverable convergence problems c if (konv .ne. 0) then write (iof1,*) ' Convergence problems of type ', konv close(iof1) stop else...

    clucene源码

    we dont guarantee that they are all met at this stage): 1. Whenever possible the caller must create the object that is being filled. For example: IndexReader->getDocument(id, document); As opposed to...

    BURNINTEST--硬件检测工具

    This problem is now just reported as an error (and BurnInTest) continues. - When BurnInTest crashes, it should now generate a "minidump" file to help debug which system component caused the failure...

    ActionScript 3.0的应用

    在AS3中,`root` 这个概念被替换成了 `stage`。`stage` 对象代表了Flash播放器中的主舞台,所有可视元素(如影片剪辑、图形等)都位于舞台上。因此,如果你想访问根目录的属性或方法,可以直接使用 `stage`。 例如...

    二级减速器课程设计说明书reducer design specification.doc

    二级减速器课程设计说明书,全英文书写 《Machine Parts Design》 Design Specification Topic Designation of Reducer College College of Mechanical and Electrical Engineering Major Mechanical ...

    2016年iOS公开可利用漏洞总结_EN1

    This is an extremely dangerous vulnerability as it allows the attacker complete control over the device. 0x02 Other Notable iOS Vulnerabilities 2. Pangu Jailbreak: In 2016, the Pangu team released ...

    基于机器学习的滴灌玉米光合响应特征.pdf

    Photosynthesis response curves were measured during the silk stage using a Li-6400XT photosynthesis system under different potassium fertilization conditions. The study employed machine learning grid...

    kitty_massage:小猫按摩

    import javafx.stage.Stage; public class MassageApp extends Application { @Override public void start(Stage primaryStage) { Button massageBtn = new Button("开始按摩"); massageBtn.setOnAction(e -> ...

    Practical Mod Perl

    Practical Mod Perl <br> Copyright Preface What You Need to Know Who This Book Is For How This Book Is Organized Reference Sections Filesystem Conventions Apache ...

    一点一练全国通用2016版高考英语专题复习并列句和状语从句练习

    3. **时间状语从句**:如"________ the job takes a significant amount of time, most students agree that the experience is worth it." 这里"________"可以填"Though/Although",表示尽管工作花费大量时间,学生...

Global site tag (gtag.js) - Google Analytics