if (char == 'anime') {
Crafty.sprite("sprites_hunt_w.png", {
guy: [1, 2, 27, 31]
})
.reel('guy_right', 1000, [
[1, 64],
[34, 64],
[65, 65]
])
.reel('guy_left', 1000, [
[1, 32],
[34, 32],
[65, 33]
])
} else {
Crafty.sprite("megamanx.gif", {
guy: [0, 0, 28, 34]
})
.reel('guy_right', 1000, [
[214, 19],
[248, 19],
[281, 19],
[321, 19],
[352, 19],
[371, 19],
[394, 19],
[427, 19]
])
// }else{
//console.log("fail")
}
The console for firefox is saying TypeError: Crafty.sprite(...).reel is not a function. This refers to the line
Crafty.sprite("megamanx.gif", {
The thing I do not understand is that to me it looks exactly the same(other than the image source) as this line
Crafty.sprite("sprites_huntw.png", {
Because of this I don't understand why I'm getting the error. Thank you in advance for your help