`
qq123zhz
  • 浏览: 527011 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

(flex4): addChild() is not available in this class.

    博客分类:
  • Flex
 
阅读更多

flex4中:

just create another container wich u place displayObject in:

// container ( IVisualElement ) for DisplayObjects
var container:UIComponent = new UIComponent();
addElement( container );

// displayObject goes to container
var displayO:Sprite = new Sprite();
container.addChild( displayO );

 

flex3中:

var container:UIComponent = new UIComponent();
addChild( container );

分享到:
评论
1 楼 yaland 2012-07-15  
谢谢兄弟!

相关推荐

    信息: Deploying web application directory lx01

    严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener at ...

    struts2驱动包

    信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_10\bin;C:\Program ...

    FairyGUI-Unity-Plugin-3.4.0.zip

    Editor version 3.9.0 with 'binary format' option checked in publish dialog is required to generating this kind of format. Old XML format is not supported anymore. - NEW: Add UIPackage.UnloadAssets ...

    unigui0.83.5.820

    0.83.4.819 +---------------------------------------------------------------------------------------- - 0000789: UniDBComboBox, UniDBListBox: Edit mode is not set when changed - 0000784: TUniStringGrid...

    flex 一问一答

    4.问:当我用addChild加入一个MC后,怎样才能得到这个MC的全局坐标呢? 答:mc.getBounds(stage) / stage.localToGlobal(mc) 5.问:as3中如何设置拖动,as2这样的mc.onPress=function(){startDrag(mc,false,10,100,110...

    egret-inspector-install:Egret chrome Inspector v2.5.5 修复可用版 白鹭引擎 Egret 谷歌插件,支持Chrome 87+

    Egret 白鹭开发Chrome插件(修复版)更新:20210113更新亲测Chrome 87.0.4280.141(正式版本)有效控制台偶尔会报错 Uncaught TypeError: this.addChild is not a function 。这插件依赖页面中的 Egret 引擎,当它在...

    html5 小游戏 demo

    this.tankClient.addChild(this); }, Draw:function(){ if(!this.live){ this.tankClient.removeChild(this, true); return; } this.setPosition( cc.p(this.x, this.y) ); this.Move(); }, 4.添加子弹打击...

    Flash 整合Unity3D 教程

    //This is called when the content is loaded and the initialization of the unity engine is started. public function unityInitStart():void { //Unity engine started } //unityInitComplete has to ...

    Label长文本手机上不显示处理longText.zip

    Label长文本手机上不显示处理 // Learn cc.Class: // - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/class.html ... this.nodeContainer.addChild(node); }, onClick(){ this.setLongText(`

    TongWeb常见问题处理

    TongWeb常见问题处理,用于运维的问题处理,便于解决应用部署时遇到的各种问题

    SpriteKit 自定义图片按钮

    [self addChild:_fight]; Button selected: _fight.selected = Yes; Button disable: _fight.disable = Yes; setText: [_fight setLabelWithText:@"fighting" Font:[UIFont systemFontOfSize:18.0f] ...

    网页编辑器核心技术之一,用TTreeViewer显示网页源,代码的结构,读写网页源代码

    说明:网页编辑器核心技术之一,用TTreeViewer显示网页源代码的结构,读写网页源...,WebBrowser1.OleObject.document,TreeView1.Items.AddChild(,TreeView1.Selected.AbsoluteIndex,Lines.Text,FindCode(,WebBrowser1

    Flex4 的 苹果风格 弹出窗口

    基于国外的 MacPopup 苹果风格,自己很喜欢,但是国外提供的 该控件 是基于flex 3的 ,所以在目前flex4为主流的 sdk 情况下,会出现错误。本控件 已经做了修正。可以直接运行。请指导。

    AS3代码 心跳

    public class Pulse extends Sprite { private var ball:Ball; private var angle:Number = 0; private var centerScale:Number = 1; private var range:Number = .5; private var speed:Number = .2; ...

    以二进制形式读取外部图片文件(AIR)

    public class Main extends Sprite { private var rootMenu:NativeMenu = new NativeMenu; private var fileMenu:NativeMenu = new NativeMenu; private var openItem:NativeMenuItem = new NativeMenuItem(...

    cocos2dx 3.3 实现再按一次退出游戏 类代码

    实现安卓app再按一次退出游戏效果,自己研究的,不知道对不对,反正自己测试已经实现按两次返回键退出,只要在需要监听的地方加入如下代码就可以 #include "againExit.h" ...addChild(a, 10); ... 就可以了

    Tomcat启动springboot项目war包报错:启动子级时出错的问题

    今天公司springboot项目准备部署到测试服务器上进行测试,打包好war后放到tomcat里面启动后,前端文件能访问到,但是接口请求一直是404,一直找了很久的原因,tomcat启动是成功的,war打包的时候也提示build success...

    Delphi7 向XML中添加RTTI信息.rar

     if (PropList [i].PropType^.Kind = tkClass) and (Value <> 0) then  if TObject (Integer(Value)) is TComponent then  NewNode.Text := TComponent (Integer(Value)).Name  else  ComponentToDOM (newNode,...

    flex封装实现画布功能

    来公司第一个考核demo,用actionScrpt封装一个组件,根据提供的属性画出矩形的长、宽、背景颜色等。 //定义属性 private var _zx:Number=20;//图形左上方x轴的值 private var _zy:... addChild(shape); }

    AS3.0 TLFTextField 组件库

    public class STLFTextField extends TLFTextField { //最大段落数 private var _maxParagraph:uint = 0; //UI滚动条 private var uiScrollBar:UIScrollBar; public function STLFTextField() { ...

Global site tag (gtag.js) - Google Analytics