//获取索引
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;

  

posted on 2020-12-04 09:43  我是cdt  阅读(121)  评论(0编辑  收藏  举报