主题:  为什么stage 的image放不到member中央?

love5d

职务:普通成员
等级:1
金币:0.0
发贴:51
注册:2001/9/19 1:56:45
#12001/11/1 10:32:45
这是我的代码,看看有什么错,谢谢!
而且stage拖动,member中的图象就错位。


property newBipMap,pStageRect,pStageWidth,pStageHeight
on beginsprite me
pStageRect=(the stage).rect
pStageWidth=(the stage).rect.width
pStageHeight=(the stage).rect.height
end


on mouseUp me
newBipMap=new(#bitmap,member(10))
newBipMap = image(pStageWidth,pStageHeight,32)
newBipMap.copyPixels((the stage).image, rect(0,0,pStageWidth,pStageHeight), (the stage).rect)
member(10).image=newBipMap
end



D计划-混沌

职务:管理员
等级:6
金币:15.2
发贴:3528
注册:2007/4/9 9:48:37
#22001/11/1 11:27:18
newBipMap=new(#bitmap,member(10))
member(10).image=(the stage).image


(the stage).image.rect<>(the stage).rect
前者是类member属性,后者是类sprite属性



love5d

职务:普通成员
等级:1
金币:0.0
发贴:51
注册:2001/9/19 1:56:45
#32001/11/1 12:05:54
ok了!
谢谢,斑竹