【发布时间】:2014-01-31 00:57:11
【问题描述】:
我正在尝试从 system.DocumentsDirectory 加载图像,但收到此错误消息。
WARNING: Failed to find image(C:\Users\beri\AppData\Roaming\Corona Labs\Corona S
imulator\Sandbox\jet shooter - pro-B1C630B0B5247780928E75EA15C69ABF\Documents\cu
stomJet.png)
我正在使用此代码创建图像并再次显示它,但我收到错误消息说图像不存在。
-- Creating the image
local screenBounds =
{
xMin = 0,
xMax = 800,
yMin = 116.5,
yMax = 360,
}
local customJet = display.captureBounds( screenBounds )
local baseDir = system.DocumentsDirectory;
display.save( customJet, "customJet.png", baseDir)
-- Loading the image
local path = system.pathForFile( "customJet.png", system.DocumentsDirectory )
local jetOne = display.newImage(path)
有什么帮助吗?
【问题讨论】:
标签: lua coronasdk corona-storyboard corona-director