Create another container to place the displayObject in:
来源:互联网 发布:99任务网源码 编辑:程序博客网 时间:2024/05/21 05:38
http://stackoverflow.com/questions/2023632/adobe-flash-builder-flex4-addchild-is-not-available-in-this-class?answertab=active#tab-top
http://forums.adobe.com/thread/528185
http://blog.csdn.net/yinweilaibuji/article/details/7696588
Create another container to place the displayObject in:
// container ( IVisualElement ) for DisplayObjectsvar container:UIComponent = new UIComponent();addElement( container );// displayObject goes to containervar displayO:Sprite = new Sprite();container.addChild( displayO );
private var _loader:SWFLoader = new SWFLoader();private var _uicomponent:UIComponent = new UIComponent();private function swfLoaded(event:Event):void {Alert.show("inside swf Loaded");var content:DisplayObject =_loader.content;_uicomponent.addChild(content);} public function loadSWF () : void { _loader.addEventListener(Event.INIT, swfLoaded);_loader.load("http://intelliveysoft.com:5080/myelearn/Admin.swf"); addElement(_uicomponent);}
well in flash builder 4 full version, there isn't any this.rawChildren.
The best approach to resolve the issue would be to convert each required class to a flex component and to use it on your flex application:
download and install flex component kit http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex_skins
create a movie clip
convert to flex component
add the relevant functions to this class
a skeleton for a class that is attached to a movieclip that is about to be converted to a flex component:
<?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" initialize="init();"> <fx:Script> <![CDATA[ private const spr1:Sprite = new Sprite(); private const spr2:Sprite = new Sprite(); private function init():void { spr1.graphics.beginFill(0xFF0000, 0.5); spr1.graphics.drawRect(10, 10, 100, 80); spr1.graphics.endFill(); con.addChild(spr1); spr2.graphics.beginFill(0x0000FF, 0.3); spr2.graphics.drawRect(20, 20, 80, 100); spr2.graphics.endFill(); con.addChild(spr2); } ]]> </fx:Script> <s:SpriteVisualElement id="con" /></s:Application>package {import mx.flash.UIMovieClip;import flash.text.TextField;import flash.events.Event;import flash.events.MouseEvent;public dynamic class challenge_screen extends UIMovieClip { public function challenge_screen() { super(); }}}
- Create another container to place the displayObject in:
- Another way to HOOK in the kernel
- Another way to HOOK in the kernel
- Another way to HOOK in the kernel
- Error : Failed to create the SD card. Error : Failed to create sdcard in the AVD folder.
- Where is the best place to put <script> tags in HTML markup?
- Where is the best place to store a password in your Android app
- Error : Failed to create sdcard in the AVD folder.
- How to create the samba server in openwrt !
- How to Interactively Create a Docker Container
- Managing the Container in Spring
- org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The database is already in use by another p
- How to create a task in the openwrt system, the timer to switch WiFi power。
- java编程之Noncompliant; %n should be used in place of \n to produce the platform-specific line separato
- How to make an SDL window the child of another window in Win32
- print out the path from one node to another in binary tree
- in-place
- How to copy entire operation system to another place without `dd`
- vijos-1788
- Android4.0 SDK新功能详解!
- 如何在千万级别的用户中,找出积分最高的10个用户。
- SQL2008附加数据库时出错的解决办法
- 浅谈SUN JVM内存管理与应用服务器的优化 之SUN JVM内存管理
- Create another container to place the displayObject in:
- HDU 哈密顿绕行世界问题
- (android实战)线程池实现,并通过CompletionService,来实现反馈处理(转载)
- 心情随笔20130413
- Flex4 画图
- leetcode 129: Pascal's Triangle
- TheOraClusterNotes
- 2013编程之美全国挑战赛 初赛第一场 题目2
- ORACLE notes_2