Here's an example of me loading an image and creating a sprite
bikeImage = agk::LoadImage("Images/bike.png");
bikeSprite = agk::CreateSprite(bikeImage);
agk::SetSpritePosition(bikeSprite, 140.0f, 46.0f);
agk::SetSpriteSize(bikeSprite, 35.0f, -1);
agk::SetSpriteShapeBox(bikeSprite, 0, 28, 35, 34, 0);
agk::SetSpriteFlip ( bikeSprite, 1, 0 );
Heres code for how I scroll the background.
//in app::begin
float fX = 0.0f;
float fY = 0.0f;
//in app::loop
agk::SetViewOffset ( fX, fY );
float x = agk::GetDirectionX ( );
float y = agk::GetDirectionY ( );
//when not tilting device
if(x == 0)
{
moveScreenx = 0.35f;
movePlayerx = 0.35f;
calorieChange = 0.21f;
setEnergyChange = 0.011f;
}
//move player, screen, and adds score when not hurt
if(!isHurt)
{
agk::SetSpritePosition(seanSprite, agk::GetSpriteX ( seanSprite ) + movePlayerx, agk::GetSpriteY ( seanSprite ) + y );
calories += calorieChange;
fX += moveScreenx;
agk::SetSpriteSize(healthbarSprite, agk::GetSpriteWidth(healthbarSprite) - setEnergyChange, agk::GetSpriteHeight(healthbarSprite));
}