免费教程_免费网赚教程_破解版软件-寂涯网络学习基地

当前位置: 主页 > 网站相关 > 网站编程 > 通过Flash+JavaScript+API来解析fla文件(3)

通过Flash+JavaScript+API来解析fla文件(3)

时间:2012-05-24 12:59来源:未知 整理:寂涯网络 点击:


re“jm S:
}
function pushFill(Level.fillitem)//填充对象属性读取函数
{
strlisPush(Level+l,。color');
strIisPushILeveI+2,fillitem.color);
strIisPushILeveI+1.。style。):
strIisPush《LeveI+2.fillitem.styIe):
,,…更多属性略,下同
}
function pushStroke(Level,strokeltem)//笔触对象属性
,厂读取函数
{
st rIisPushILeveI+1,。color。}:
st rlisPush《Level+2,strokeltem.color);
strlisPush(LeveI+1,。style。):
st rIisPush(LeveI+2,strokeltem.style);
||‘一
}
function pushElementFS(Level,k,singleElement)//元素的
肭氧充和笔触属性读取函数
{
doc.seIectNone《):
t1.currentFrame=k;
singleElement.selected=true;
doc.selection[0]=singleElement;
st rIisPush《LeveI+1,。fi¨‘):
fillitem=doc.getCustomFill(。selection。):
DushF川lLeveI+1,fillitem);
st r|isPush{Level+1,。stroke”):
strokeltem=doc.getCustomStroke(‘selection。):
pushStroke(Level+1,strokeltem);
}
function pushFilter(Level,filterltem),,滤镜对象属性读取函数
{
str|isPushILeveI.filterltem.name);
str|IsPush《LeveI+1.。name。):
s订IisPush(LeveI+2.filterltem.name);
str|isPush(LeveI+1.。angle。):
strlisPush(Level+2.Math.round(filterltem.angle));
//…

function pushElement(flag.Level.singleElement.k)//元素
,/属性读取函数
{
var s=“:
s=singleElement.elementType;
jf IsingleElement.elementType==。text。)//文本
{s=s+。【_+singleElement.getTe×tStrlng()+。】-:)
if IsingleElement.elementType==。instance。)//元件实例,
{s=s+。l_+singleElement.1ibraryltem.name+。】。:)
st rIisPush《LeveI.s):
st¨isPush(LeveI+1,。name。):
strlisPush(Level+2.singleElement.name);
strlisPush(Level+l,。elementType。):
strlisPush(Level+2,singleElement.elementType);
if(singleElement.elementType==。shape。)//形状
f
str|isPush(LeveI+1,。isGroup’):
str|isPush(LeveI+2,singleElement.isGroup);
strlisPush(Level+1,‘isDrawingObject。):
strIisPush(LeveI+2.singleElement.isDrawingObject);
if(flag)//形状如果存在于元件库中的元件的图层
,,中,需要进入剪辑元件模式获得填充、笔触等值
{
lib.editltem(itemArray[i].name);
pushElementFS(Level.k.singleElement);
doc.exitEditMode;
)LeVel
else
{
pushElementFS(Levet,k,singleElement);
1
}pushFilter(Level,
if(singleElement.elementType=
{
strlisPush(Level+1,。textTy
strIisPush(Level+2.singleElement.textType);
strIIsPush(LeveI+1,。TextString。):
strlisPush(Level+2.singleElement.getTextStrin90);
//…
if(singleElement.textType==。static。)
{
str|isPush《Levei+1.。orientation。):
strIisPush(LeveI+2,singleElement.orientation);
}
if IsingleElement.textType==。dynamic‘ ¨
singleElement.textType==。input。)
{
strIisPush《LeveI+1,。embeddedCharacters。):
strIisPush《LeveI+2,singleElement.embeddedCharacters);
str|isPush(LeveI+1,’embedRanges。):
strIisPush(LeveI+2,singleElement.embedRanges);
}|..·
)
strlisPush(Level+l,。face。):
strlisPush(LeveI+2,singleElement.getTextAttr(。face。)):
strlisPush(Level+1,。size。):
strlisPush(Level+2。singleElement.getTextAttr(。size。)l:
//…
}
if(singleElement.elementType==。instance。)
{
str|isPush{Level+1,。instanceType。):
strlisPush《LeveI+2,singleElement.instanceType):
strlisPush(Level+l,。libraryltemName。);
strlisPush(Level+2,singleElement.1ibraryltem.name):
if{singleElement.instanceType==。symbol。)
{
str|isPush(Level+1,。symbolType。):
strIisPush《LeveI+2,singleElement.symbolType):
strIisPush{Level+1,。actionScript。):
strIisPush(Level+2,singleElement.actionScript);
//…
}
}
filterGroup=singleElement.filters;
if(filterGroup!=undefined)
{
++:
strlisPush(Level,'filters。):
for Ik=O:k<fiIterGroup.1ength;k++)
(

本页地址 http://www.jybase.net/wangzhanbiancheng/20120524933.html

百度搜索更多

谷歌搜索更多

顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------

评价:
昵称: 验证码:点击我更换图片
推荐内容
赞助商
赞助商


关于本站免责声明视频更新google百度地图视频地图RRS订阅

如有什么问题请在本站留言,或发邮件到 hxt167#foxmail.com