It looks like you're new here. If you want to get involved, click one of these buttons!
local loader = UrlLoader.new("<a href="http://upload.wikimedia.org/wikipedia/commons/7/7a/Basketball.png"" rel="nofollow">http://upload.wikimedia.org/wikipedia/commons/7/7a/Basketball.png"</a><img class="emoji" src="http://forum.gideros.rocks/resources/emoji/wink.png" title=";)" alt=";)" height="20" /> -- <a href="http://tuxpaint.org/stamps/stamps/animals/birds/adelaide-rosella.png" rel="nofollow">http://tuxpaint.org/stamps/stamps/animals/birds/adelaide-rosella.png</a> local function onComplete(event) local out = io.open("|D|image.png", "wb") out:write(event.data) out:close() local b = Bitmap.new(Texture.new("|D|image.png")) stage:addChild(b) end local function onError() print("error") end local function onProgress(event) print("progress: " .. event.bytesLoaded .. " of " .. event.bytesTotal) end loader:addEventListener(Event.COMPLETE, onComplete) loader:addEventListener(Event.ERROR, onError) loader:addEventListener(Event.PROGRESS, onProgress) |
Comments