i had problems with loading the spritely picture from the global storage. now i managed to load the spritely. but how do i draw it actually?
i thought (THOUGHT!!!) it goes like this:
function setup()
print("Hello World!")
loadSpritely("Lines","Bitmap","Global")
end
function draw()
sprite("Lines",100,100)
end
but yeah, it doesnt work. how do i draw that stuff then???
Function setup()
Lines = loadSpritely("lines")
End
Function draw()
Sprite("lines", 100, 100)
End
Ie I think it returns an image you can use. I know it doesn’t actually make a spritepack, because that would be super-cool, and is a feature many have asked for.
All that the loader class does is get the image from global space into project storage. You still have to load the string from project space and create the images. For example:
By the way, I’m assuming that you’re using the “old” version previous to the 0.80 rewrite, in which case, here are the complete steps (from the comments in the SpritelyLoader class)
–This very simple class takes data that’s stored
– in the Sprightly global variable, and transfers
– it to project data for your project.
– For example:
– myLoader = SpritelyLoader(“bob”)
– takes the image stored from the global SpritelyGlobal
– and adds it to your project data as “bob”
– Once in the project data, load the saved string to
– an image using:
Double-click [Home] to bring up the list of “running” applications.
Press on “Codea” icon at the bottom of the screen, and hold it until they all start wobbling. Touch the red ‘close’ icon in the upper-left side of the Codea icon. It (the Codea icon) should disappear.
Now, click [Home] again, and re-launch Codea. You should be better.