主题:  菜单?


职务:普通成员
等级:1
金币:0.0
发贴:43
注册:2001/9/11 10:48:13
#12001/11/5 9:39:46
有谁可以做出像WINDOWS中开始菜单一样的效果!(点击一下可以出现子菜单)



threem

职务:普通成员
等级:2
金币:1.0
发贴:338
注册:2001/6/14 13:52:15
#22001/11/5 12:29:48
用popup xtra!

:)

找到插件试试!很好用!



skylen

职务:普通成员
等级:1
金币:0.0
发贴:93
注册:2001/10/20 21:42:17
#32001/11/5 14:54:38
珍,我现在正在做一个模拟windows的东西,用来做公司的宣傳,不知道是否有興趣共同研究一下。



酷狗

职务:版主
等级:2
金币:10.0
发贴:610
注册:2000/9/16 9:26:36
#42001/11/5 16:03:43
方法一、插swf
方法二、做好要弹出的菜单放在stage放面、消息激发时移出来



poloer

职务:普通成员
等级:1
金币:1.0
发贴:139
注册:2000/11/20 20:47:52
#52001/11/5 17:37:20
呵呵,我觉得用miaw可能更简单适用,呵呵,如果需要的话,可以和你合作。呵呵,大大节省时间。^_^



酷狗

职务:版主
等级:2
金币:10.0
发贴:610
注册:2000/9/16 9:26:36
#62001/11/5 21:38:07
呵呵!
不会吧用miiaw,很难做出很炫的菜单效果呀,而不支持shockware



jiesun

职务:普通成员
等级:1
金币:1.0
发贴:182
注册:2000/12/13 9:54:52
#72001/11/5 22:20:04
其实,用很多中方法都能实现这个功能。我曾经用lingo写过一个类似的程序,比较的麻烦。毕竟那是微软写出来的东西,考虑的很周到。
语法很简单,就是简单的显示该显示的东西,但是能否做到跟windows的一样就困难了。



skylen

职务:普通成员
等级:1
金币:0.0
发贴:93
注册:2001/10/20 21:42:17
#82001/11/5 23:42:38
我做了一个半成品,rar自释放文件,大家帮忙看看,给些意见。
http://amyguy.topcool.net/files/window.exe



worthy

职务:普通成员
等级:1
金币:0.0
发贴:98
注册:2001/2/9 17:09:14
#92001/11/7 21:28:09
这是我98年写的程序,有兴趣可以研究一下。图要自己做。
你要例子的话,我也可以先做一个,以后发给你。


(?是Alt+Enter键)

property turnMenuMem,old_MenuMem
property farther,children
property specialChild

on BeginSprite me
set old_MenuMem = the member of sprite the spriteNum of me
sendSprite(farther,#addChildren,me)
end

on mouseEnter me
if farther then
set sp=the spriteNum of me
sendSprite(farther,#hideBorther,sp)
call(#open,me)
updatestage
end if
end

on rightMouseDown me
if farther=0 then
if (the member of sprite the spriteNum of me)=old_MenuMem then
set the visible of sprite specialChild to 1
updatestage
end if
end if
end

on mouseDown me
global Down
if farther=0 then
if (the member of sprite the spriteNum of me)=old_MenuMem then
call(#open,me)
set the visible of sprite specialChild to 0
else
call(#closeAll,me)
end if
else
set Down=1
end if
end

--on mouseUp me
-- pass
--end

on mouseLeave me
if farther then
if children=[] then
set sp=the spriteNum of me
set the member of sprite sp to old_MenuMem
end if
end if
end

on addChildren me,p
addat children,p
end

on closeAll me
call(#close,me)
repeat with n=1 to count(children)
set childSp=the spriteNum of getat(children,n)
sendSprite(childSp,#closeAll)
end repeat
end

on hide me
set sp=the spriteNum of me
set the visible of sprite sp to 0
end

on show me
set sp=the spriteNum of me
set the visible of sprite sp to 1
end

on open me
set sp=the spriteNum of me
set the member of sprite sp to turnMenuMem
call(#showChildren,me)
end

on close me
set sp=the spriteNum of me
set the member of sprite sp to old_MenuMem
call(#hideChildren,me)
end

on hideChildren me
repeat with n=1 to count(children)
set childSp=the spriteNum of getat(children,n)
set the visible of sprite childSp to 0
end repeat
end

on showChildren me
repeat with n=1 to count(children)
set childSp=the spriteNum of getat(children,n)
set the visible of sprite childSp to 1
end repeat
end

on hideBorther me,oneChild
repeat with n=1 to count(children)
set childSp=the spriteNum of getat(children,n)
if not(oneChild=childSp) then
sendSprite(childSp,#closeAll)
end if
end repeat
end

on getPropertyDescriptionList
if the currentSpriteNum= 0 then
set mem=0
else
set s= the currentSpriteNum
set m=the member of sprite s
set n= the memberNum of member m
set c= the castLibNum of member m
set nm=member (n+1) of castLib c
end if
set description=[?
#turnMenuMem:[#comment:"Change the Menu Option's member:",?
#format:#graphic,?
#default: nm],?
#farther:[#comment:"the Menu Option's Farther Name:",?
#format:#integer,?
#default:0],?
#children:[#comment:"the Menu Option's Children Names:",?
#format:#integer,?
#default:[]],?
#specialChild:[#comment:"Hide or Show Child Name:",?
#format:#integer,?
#default:0]]
return description
end



skylen

职务:普通成员
等级:1
金币:0.0
发贴:93
注册:2001/10/20 21:42:17
#102001/11/8 12:37:54
老兄,能不能發個源程序上來呀。