Ric*_*lay 6 apache-flex flash swc flash-cs3
有谁知道criterea Flash用于发现Component的Live Preview类的内容?
背景
我们正在尝试自动创建包含要在Flash中使用的组件的SWC.我们可以通过修改manifest.xml并连接组件定义来使它对flash可见.但是,组件无法拖到舞台(或库)上,可能是因为它没有LivePreview的形式.
为了更好地说明我们的来源,我们注意到从Flash导出的SWC中的以下内容(使用swfdump):
fl.livepreview.LivePreviewParent包含与modmanifest.xml文件中的可视组件相同的属性fl.livepreview.LivePreviewParent 导出为符号但是,我发现它与Flex的SWC之间没有其他区别.
我们显然可以使用JSFL来执行任务,但我们宁愿不在构建服务器上安装Flash.
有什么想法吗?
您可以使用 UIComponentGlobals.designMode 属性。
导入 mx.core.UIComponentGlobals;
private function onInitialize():void { if ( UIComponentGlobals.designMode ) { // 显示设计视图特定的内容 } else { // 正常渲染 } }
更多信息请参见http://cookbooks.adobe.com/post_How_do_I_detect_at_runtime_if_my_component_is_bein-13446.html
| 归档时间: |
|
| 查看次数: |
813 次 |
| 最近记录: |