The typical naming convention for images in a sprite view is this:
spriteName-animationName-frameNumber.png
Then, when initializing the sprite, you need to set defaultAnimation
to whatever the default animation is.
In your case, currently your "animation name" would be "frame". I am guessing that is not intentional, but if you want to simply see this work without having to rename your image try this:
GC.app.venusaur.activeSprite = new SpriteView({
superview: GC.app.venusaur.view,
x: 0,
y: 0,
autosize: true,
image: 'resources/images/player2/pokemon/venusaur',
opacity: 1,
defaultAnimation: 'frame'
});
Note that I added this to your code:
defaultAnimation: 'frame'
It is likely that you want to call that something other than "frame".
Also, I see that you are inserting your animation over a static ImageView when it is clicked. You can do this all at once with a since sprite view if you set the default image.
You might have a single frame sprite like this (instead of the ImageView):
venusaur-idle-01.png
And your animation code like this:
venusaur-walk-01.png
venusaur-walk-02.png
venusaur-walk-03.png
etc.
Then you could init your sprite like this:
var mySprite = new SpriteView({
superview: GC.app.venusaur.view,
x: 0,
y: 0,
autosize: true,
image: 'resources/images/player2/pokemon/venusaur',
opacity: 1,
defaultAnimation: 'idle'
});
And then you can animate it like this (on click or whenever you want):
mySprite.startAnimation('walk');
To loop the animation do this:
mySprite.startAnimation('walk');
And to stop the loop, do this:
mySprite.resetAnimation();
The documentation here is very helpful:
http://docs.gameclosure.com/api/ui-spriteview.html