|
主题: 請大家幫忙... 這動作如何做. 謝謝!
|
 lightwave3d
职务:普通成员
等级:1
金币:0.0
发贴:2
注册:2002/6/24 12:07:57
|
#12002/6/24 12:30:53
同學錄要做一個光盤相片索引功能(動作),我不會做..請版主 和 各位前輩,同好 幫幫忙... 這動作如何做. 謝謝! 如何 按 向上按鈕 相片向上移動,,當按 向下按鈕時, 相片向下移動..我就是想做這樣的功能(動作),十分感謝 大家幫助 !
编辑历史:[这消息被lightwave3d编辑过(编辑时间2002-06-24 12:36:36)]
|
 TOMBABY
职务:普通成员
等级:1
金币:0.0
发贴:39
注册:2002/5/31 21:36:20
|
#22002/6/24 18:37:43
我不知道高手有什么好方法,不过如果我来做的话首选的思路就是替换法: 把被显示的图片依次编号放在CAST里,把一开始显示的几张图片加不同的层上,然后分别把相应的替换动作赋予向上和向下的按钮。(如:按向上按钮时,把1通道上的图片1替换为图片2,把2通过上的图片2替换为图片3,依次类推)至于具体语句,不好意思,我也是个新手,帮不上你了^_^
|
 D计划-混沌
职务:管理员
等级:6
金币:15.2
发贴:3528
注册:2007/4/9 9:48:37
|
|
 acneyouth
职务:普通成员
等级:1
金币:1.0
发贴:181
注册:2004/6/9 10:01:26
|
#42002/6/25 9:41:39
以上图为例,现在显示了5张图片,但一按滚动键,有时就要显示6张,因此score上需要6个或7个通道放图片。 给你一段程序,基本思路是滚动它们的locV,如果有图片滚到边界就把它替换为其它图片,同时调整它的locH。如果已经替换到了最后一张图片,就替换为一张,反之替换为最后一张。 程序中我自定义了许多以p开头的属性,从名字上你应该看得出它的作用: on circlePic direct case direct of 1: repeat with i=pFSprite to pLSprite sprite(i).locH=sprite(i).locH-pPicStep end repeat if (sprite(pPicAtLeft).right if (sprite(pPicAtRight).member.name<>pLMember) then sprite(pPicAtLeft).member=member(sprite(pPicAtRight).member.memberNum+1,pPicOwnerCast) else sprite(pPicAtLeft).member=member(sprite(pFMember),pPicOwnerCast) end if updateStage---注意!!!!!!!!!没有这一句,member替换语句的作用就不会被应用 sprite(pPicAtLeft).loch=sprite(pPicAtRight).right+15+sprite(pPicAtLeft).member.width/2 updateStage pPicAtRight=pPicAtLeft if (pPicAtLeft pPicAtLeft=pPicAtLeft+1 else pPicAtLeft=pFSprite end if end if -1: repeat with i=pFSprite to pLSprite sprite(i).locH=sprite(i).locH+pPicStep end repeat if (sprite(pPicAtLeft).Left-15>pLeftBorder) then if (sprite(pPicAtLeft).member.name<>pFMember) then sprite(pPicAtRight).member=member(sprite(pPicAtLeft).member.memberNum-1,pPicOwnerCast) else sprite(pPicAtRight).member=member(pLMember,pPicOwnerCast) end if updateStage---注意!!!!!!!!!没有这一句,member替换语句的作用就不会被应用 sprite(pPicAtRight).loch=sprite(pPicAtLeft).left-15-sprite(pPicAtRight).member.width/2 pPicAtLeft=pPicAtRight if (pPicAtRight>pFSprite) then pPicAtRight=pPicAtLeft-1 else pPicAtRight=pLSprite end if end if end case end
|
 lightwave3d
职务:普通成员
等级:1
金币:0.0
发贴:2
注册:2002/6/24 12:07:57
|
#52002/6/25 16:37:21
感謝 tombaby ,54zq acneyouth ,感謝你們 .
|