主题:  如何实现将某一段文字不断闪烁!

supergood

职务:普通成员
等级:1
金币:0.0
发贴:27
注册:2001/10/11 14:16:54
#12001/11/6 9:03:35
请教大家!如果用DR来作课件的话,请问可不可以?



草原风

职务:版主
等级:5
金币:13.0
发贴:3489
注册:2001/2/17 19:47:06
#22001/11/6 9:20:15
笨办法:做两个,然后并排放置,做成FILMLOOP,放上
LINGO方法可参见行为库中的方法



donlee

职务:普通成员
等级:1
金币:1.0
发贴:271
注册:2000/12/8 8:52:18
#32001/11/6 15:04:10
草兄的办法其实的最简单的办法,只是不能控制闪烁的时间。
property pblinktime,pctime
on beginsprite me
pctime=the ticks
pblinktime=30
end

on exitframe me
if the ticks-pctime>pblinktime then
blink(me)
pctime=the ticks
end if
end

on blink me
sprite(me.spriteNum).visible=not( sprite(me.spriteNum).visible)
end

上面这段behavior附加到一个sprite上即可。
可以修改pblinktime等,如果要控制得更细些,及增加通用性,加上更多的变量与getpropertydescriptionlist就是了。



worthy

职务:普通成员
等级:1
金币:0.0
发贴:98
注册:2001/2/9 17:09:14
#42001/11/7 21:18:35
我有一种很复杂的方法,但它很实用,很长时间没用了,你可以自己研究一下。

property msp, normalMem, normalMemArray, channelRList
property status, startFlash
property channelList
property normalFrame, blankFrame, cycle, flag, enterCount, enterCycle

on beginSprite me
set channelList=[]
repeat with i=1 to count(channelRList)
set c1= getAt(channelRList,i)
if listP(c1) then
set s1= getAt(c1,1)
set e1= getAt(c1,2)
repeat with j= s1 to e1
add channelList, j
end repeat
else
add channelList,c1
end if
end repeat

set status=#waiting
set msp= the spriteNum of me
-- set normalMem= the member of sprite msp
set normalMemArray=[]
repeat with i=1 to count(channelList)
add normalMemArray, the member of sprite getAt(channelList,i)
end repeat
-- if startFlash then
beginFlash me, cycle, normalFrame, blankFrame
-- end if
end


on beginFlash me, c , nf, bf
set flag=0
set cycle=c
set normalFrame = nf
set blankFrame = bf
set status=#flashing
set enterCount=0
set enterCycle=0
end

on prepareFrame me
if status=#flashing then
set enterCount = enterCount + 1
if flag=0 then
if enterCount = normalFrame then
set enterCount=0
set flag=1
repeat with i=1 to count(channelList)
set the member of sprite getAt(channelList,i) to 0
end repeat
end if
else
if enterCount = blankFrame then
set enterCount=0
set flag=0
repeat with i=1 to count(channelList)
set the member of sprite getAt(channelList,i) to getAt(normalMemArray,i)
end repeat
set enterCycle= enterCycle+1
if cycle= enterCycle then
set status=#waiting
end if
end if
end if
end if
end

on exitFrame
if status=#waiting then
go the frame + 1
else
go the frame
end if
end

on getPropertyDescriptionList
set n=?
[?
#normalFrame,?
#blankFrame,?
#cycle,?
#channelRList?
]
set c=?
[?
"Normal frame count",?
"Blank frame count",?
"cycle",?
"Channel (Range) List"?
]
set f=?
[?
#integer,?
#integer,?
#integer,?
#integer?
]
set d=?
[?
6,?
4,?
3,?
[]?
]

set r=[:]
repeat with i=1 to count(c)
set n1= getAt(n,i)
set c1= getAt(c,i)
set f1= getAt(f,i)
set d1= getAt(d,i)
set r2=[:]
addProp r2, #comment, c1
addProp r2, #format, f1
addProp r2, #default, d1
addProp r,n1,r2
end repeat
return r
end

(?是Alt+Enter键)



questionbag

职务:普通成员
等级:1
金币:0.0
发贴:75
注册:2001/10/8 16:06:16
#52001/11/8 11:23:20
worthy的程序真的是历史悠久啊,我看着非常熟悉,我想我可能认识你哦,

因为这段程序应该是我以前的一位同事编写的,用于公司的产品制作。

你也许也是我的同事啊,呵呵,久违了。



worthy

职务:普通成员
等级:1
金币:0.0
发贴:98
注册:2001/2/9 17:09:14
#62001/11/11 18:59:45
你看看菜单程序,那是我和ZY写的,知道我是谁了吧?



questionbag

职务:普通成员
等级:1
金币:0.0
发贴:75
注册:2001/10/8 16:06:16
#72001/11/18 13:44:49
好久没来,不知道你回复了,可是我还没猜出你是谁。

我是DF.