【UI上面播特效】
UI:flash
-- 載入播放特效UI的長寬
self.flashdb = DrawBoardEx.new(mc_flash._width, mc_flash._height, true)
-- 調loadmove方法
UIManager.loadMovie(mc_flash, self.flashdb:getDB())
-- 使用UI播放特效
self.flashdb:playPfx(特效檔案.pfx)
-- UIManager
function UIManager.loadMovie(mc, image, original) local iconField = mc.iconField
if not iconField then mc:createEmptyMovieClip( "iconField", 100 ) iconField = mc.iconField mc.__sw, mc.__sh = toint( mc._width*100/mc._xscale, 0.5 ), toint( mc._height*100/mc._yscale, 0.5 ) end
local w, h if original and image then w, h = image.w, image.h else if not mc.__sw then mc.__sw, mc.__sh = iconField._width, iconField._height end
w, h = mc.__sw, mc.__sh end
iconField:loadMovie(image)
iconField._width = w iconField._height = h end