It looks like you're new here. If you want to get involved, click one of these buttons!
local loader = UrlLoader.new(URL) function onComplete(event) info:setText("done") local output = io.open("temp.png", "w+") -- I also tried it with "wb" but the same error shows up output:write(event.data) -- Error shows up in this line output:close() -- Bitmap that shows up in the middle local pic = bitmap.new(Texture.new("temp.png")) pic:setAnchorPoint(0.5, 0.5) pic:setPosition(width/2, height/2 - 100) pic:setScale(0.96,0.96) stage:addChild(pic) end |
Comments
You should write to (and read from) "|D|temp.png" not "temp.png".