主题:  快进来呀authorware多媒体素材库平台源代码可以下了

faith_5d

职务:普通成员
等级:1
金币:0.0
发贴:14
注册:2001/3/7 11:56:17
#12004/8/6 13:42:10

图片如下:

图片如下:


进入下面的网址就可以下了,刚刚新鲜出炉...
www.juscrea.com/cgi-bin/leobbs.cgi

请大家多多支持,回复跟贴

编辑历史:[此帖最近一次被 faith 编辑过(编辑时间:2004-08-09 10:29:40)]


夸父追日

职务:普通成员
等级:1
金币:0.0
发贴:123
注册:2004/3/20 15:21:37
#22004/8/6 16:00:14
看看



魔岩

职务:版主
等级:6
金币:34.0
发贴:4453
注册:2004/1/13 10:53:31
#32004/8/7 1:38:08



ID 和SN?



yjt

职务:普通成员
等级:1
金币:0.0
发贴:32
注册:2000/12/16 11:58:45
#42004/8/9 3:21:34
下载演示功能的朋友不好意思,密码是demo,用户名任意,不过记住用户名下次登陆时可以直接找你的资源素材,这个功能方便用户的。

明天放源代码,请大家留意cbt超级论坛:
www.juscrea.com/cgi-bin



faith_5d

职务:普通成员
等级:1
金币:0.0
发贴:14
注册:2001/3/7 11:56:17
#52004/8/9 9:56:48
多媒体素材库平台源代码正式共享,请大家下载。
同时谢谢大家的捧场,如果您觉得好的话请回复跟贴!我会定期的共享大量的有价值商业源代码。
www.juscrea.com/cgi-bin

----jhsm

截取其中源代码:

--初始化
avi_location:=FileLocation^"source\\"
myfile:=ReadExtFile(FileLocation^"s1.prn"
node_count:=LineCount(myFile)-1
node_info:=Array("",node_count-1,4)
name:=GetLine(myFile, 1)
--读取素材信息
myItems:=""
i:=1
repeat with i:=1 to node_count
node1_info:=GetLine(myFile, i+2)
node_word_count:=WordCount(node1_info)

node_info[i,1]:=Number(GetWord(1,node1_info))
node_info[i,2]:=Number(GetWord(2,node1_info))
node1_info1:=Reduce(" ", node1_info)
repeat while SubStr(node1_info1,CharCount(node1_info1),CharCount(node1_info1))=" "
node1_info1:=SubStr(node1_info1,1,CharCount(node1_info1)-1)
end repeat
my_test_2:=RFind(" ", node1_info1)+1--文件名称第一个字符的位置
node_info[i,4]:=SubStr(node1_info1,my_test_2,CharCount(node1_info1))
node1_info1:=SubStr(node1_info1,1,my_test_2-1)
my_test_2:=RFind(" ", node1_info1)-1
node_info[i,3]:=SubStr(node1_info1,5,my_test_2)

--删除node_info[i,3]最后的空格--
name_lengh:=CharCount(node_info[i,3])
if SubStr(node_info[i,3], name_lengh, name_lengh)="\t" then
node_info[i,3]:=SubStr(node_info[i,3], 1, name_lengh-1)
end if
----------------------

if node_info[i,1]=1 then node_info[i,3]:=node_info[i,4]

if i<node_count then
repeat with temp:=1 to (node_info[i,2]-1)
myItems:=myItems^" "
end repeat
myItems:=myItems^node_info[i,3]^"\r"
if node_info[i,1]=1 then
myImageIndex:=myImageIndex^"6"^"\r"
else
myImageIndex:=myImageIndex^"17"^"\r"
end if
else
----------------

--选择背景图片
if name="化工原理(上)" then
title_file:=1
add_name:="_hy1.inf"
else if name="化工原理(下)" then
title_file:=2
add_name:="_hy2.inf"
else if name="化工设备" then
title_file:=3
add_name:="_hgs.inf"
else if name="化工机械" then
title_file:=4
add_name:="_hgj.inf"
else if name="反应器" then
title_file:=5
add_name:="_fyq.inf"
else if name="精细化工" then
title_file:=6
add_name:="_jxh.inf"
end if

--读取收藏夹信息
cfile_name:=baSysFolder( "system" )^"esst"^"\\"^myUserName^add_name
myCfile:=ReadExtFile(cfile_name)
Line1:=GetWord(1, myCfile)
Line2:=GetWord(2, myCfile)
Line3:=GetWord(3, myCfile)
if Line3=0 then
Line3:=1
end if
if baFileExists( cfile_name ) & GetLine(myCfile, 2 )<>"" then
myItems2:=GetLine(myCfile, 2 ,Line1+1)
myImageIndex2:=GetLine(myCfile, Line1+2 ,Line2+Line1+1)
myNodeIndex2:=GetLine(myCfile, Line2+Line1+2 ,Line3+Line2+Line1+1)
myItems2:=Reduce("\r", myItems2)^"\r"
myImageIndex2:=Reduce("\r", myImageIndex2)^"\r"
myNodeIndex2:=Reduce("\r", myNodeIndex2)^"\r"
else
------------------




faith_5d

职务:普通成员
等级:1
金币:0.0
发贴:14
注册:2001/3/7 11:56:17
#62004/8/9 10:03:06
其中的代码:

lastClick:=Click+1--所选的源目录树的条目位置(即行号)
favorClick:=Click_temp+1--选择的收藏夹的条目位置(即行号)
--如果选择的收藏夹的条目是素材则提示选择目录

--判断是否存在文件夹
if myItems2="" then
MessageBox(WindowHandle, "请先建立一个目录!", "提示", 64)
GoTo(IconID@"main_frame"
end if

--判断是否正确
if favorClick<1 then
MessageBox(WindowHandle, "请在收藏夹中选择存放目录!", "提示", 64)
GoTo(IconID@"main_frame"
end if

node2:=GetLine(myImageIndex2, favorClick)
if node2=17 then
-- MessageBox(WindowHandle, "请在收藏夹中选择存放目录!", "提示", 64)
-- GoTo(IconID@"main_frame"
repeat with ii:=favorClick down to 1
if GetLine(myImageIndex2, ii)=6 then
exit repeat
end if
end repeat
favorClick:=ii
end if

cur_leave:=1--选择的收藏夹的目录级别
cur_item:=GetLine(myItems2, favorClick)--选择的收藏夹的条目
repeat while SubStr(cur_item, cur_leave, cur_leave)=" "
cur_leave:=cur_leave+1
end repeat
-------

编辑历史:[此帖最近一次被 faith 编辑过(编辑时间:2004-08-09 16:24:16)]


魔岩

职务:版主
等级:6
金币:34.0
发贴:4453
注册:2004/1/13 10:53:31
#72004/8/9 17:17:59
直接给范例吧。。这样看很累哟。。 ;)



xnzhong

职务:普通成员
等级:1
金币:0.0
发贴:58
注册:2003/3/11 7:40:04
#82004/8/13 19:54:23
直接给范例吧!!这样看很苦哟!!;)



hw26

职务:普通成员
等级:1
金币:11.0
发贴:240
注册:2002/8/8 14:13:16
#92004/8/16 23:32:07
不错不错
不过比较不便于修改,6.5的自定义函数功能应该用起来
还有,有不少代码可以省略,可以修改的更加简洁,易于看懂和修改。同时,从某种角度上来说可以节省系统资源开销。
例如:read计算图标中的第一个列表初始化:
引用:
repeat with i:=1 to node_count
node1_info:=GetLine(myFile, i+2)
node_word_count:=WordCount(node1_info)

node_info[i,1]:=Number(GetWord(1,node1_info))
node_info[i,2]:=Number(GetWord(2,node1_info))
node1_info1:=Reduce(" ", node1_info)
repeat while SubStr(node1_info1,CharCount(node1_info1),CharCount(node1_info1))=" "
node1_info1:=SubStr(node1_info1,1,CharCount(node1_info1)-1)
end repeat
my_test_2:=RFind(" ", node1_info1)+1--文件名称第一个字符的位置
node_info[i,4]:=SubStr(node1_info1,my_test_2,CharCount(node1_info1))
node1_info1:=SubStr(node1_info1,1,my_test_2-1)
my_test_2:=RFind(" ", node1_info1)-1
node_info[i,3]:=SubStr(node1_info1,5,my_test_2)

--删除node_info[i,3]最后的空格--
name_lengh:=CharCount(node_info[i,3])
if SubStr(node_info[i,3], name_lengh, name_lengh)="\t" then
node_info[i,3]:=SubStr(node_info[i,3], 1, name_lengh-1)
end if
------------------

if node_info[i,1]=1 then node_info[i,3]:=node_info[i,4]

if i<node_count then
repeat with temp:=1 to (node_info[i,2]-1)
myItems:=myItems^" "
end repeat
myItems:=myItems^node_info[i,3]^"\r"
if node_info[i,1]=1 then
myImageIndex:=myImageIndex^"6"^"\r"
else
myImageIndex:=myImageIndex^"17"^"\r"
end if
else
repeat with temp:=1 to node_info[i,2]-1
myItems:=myItems^" "
end repeat
myItems:=myItems^node_info[i,3]
if node_info[i,1]=1 then
myImageIndex:=myImageIndex^"6"
else
myImageIndex:=myImageIndex^"17"
end if
end if
end repeat

repeat循环只需要9行语句就可以了,最少只需要7行(包括repeat with和end repeat)其他语句如判断图片大小部分,只需要使用自定义函数功能,可以让代码最大限度的重复利用,同时还便于修改。
其中好像少了部分功能,是特意去除的吗?

编辑历史:[此帖最近一次被 hw26 编辑过(编辑时间:2004-08-16 23:38:09)]


一谷行

职务:普通成员
等级:1
金币:0.0
发贴:25
注册:2004/8/17 21:34:35
#102004/8/18 13:39:06
看的郁闷哦



hw26

职务:普通成员
等级:1
金币:11.0
发贴:240
注册:2002/8/8 14:13:16
#112004/8/18 18:50:35
相对还是比较简单的
用了半天时间读了源程序并自己添加了注释,其中代码由不少有重复,只要懂了其中一部分,其他就很快了
通过阅读代码,觉得似乎还少了几个功能,呵呵,你们有没有觉得?