zoukankan      html  css  js  c++  java
  • 获取文档索引 和其引用

    //获取索引
    var originalDocID = fl.getDocumentDOM().id;
    
    /**
     * 根据flash的名称带后缀名查找其所在的众多打开flash文件中的索引,如:test.fla
     * 在关闭首个打开的文档后,其他已打开文档的索引将递减
     * 
     * 返回
     * 一个整数数组,这些整数表示 fl.documents 数组中文档 name  的位置。
     * 
     * @param	name  要为其找出索引的文档的名称。该文档必须是打开的(str)。
     */
    function stage_GegFlashIndex (name) {
    	return fl.findDocumentIndex(name);
    }
    
    
    /**
     * 根据flash的索引 获取fla的引用  返回 指定的flash的引用
     * @param	Index   flash的索引(num)
     */
    function stage_QuoteFlashByIndex(Index) {
    	return fl.documents[Number(Index)];
    }

    下面的示例说明如何读取文档的 ID ,然后使用它找到该文档:
    var originalDocID = fl.getDocumentDOM().id;
    // other code here, maybe working in different files
    var targetDoc = fl.findDocumentDOM(originalDocID);
    // Set the height of the Stage in the original document to 400 pixels.
    targetDoc.height = 400;

      

  • 相关阅读:
    十五、函数助手
    REST介绍以及常用的返回状态码
    十四、配置元件之计数器
    十三、参数化
    十二、jmeter目录结构
    十一、HTTP请求之Content-Type
    十、元件的作用域与执行顺序
    九、配置命令行模式
    04-传输层(3)
    03-传输层(2)
  • 原文地址:https://www.cnblogs.com/dt1991/p/14084120.html
Copyright © 2011-2022 走看看