Help the newb: that Todd's tutorial

(this one http://www.kerp.net/box2d/)

Basically my problem is that I've created a movie clip in flash called ballSprite
According to the tutorial it should have its own class now
But when trying to use it in an actionscript I get the following error "Call to a possibly undefined method ballSprite."
What do I miss? I did set it as 'export for ActionScript' with class 'ballSprite' and base class 'flash.display.MovieClip'

And nother error I get is "Implicit coercion of a value of type Number to an unrelated type Box2D.Common.Math:b2Vec2."
The code is:

var velVec:b2Vec2 = (initVel.x / SharedVars.ratio, initVel.y / SharedVars.ratio);
initVel is of a point type and ratio is of a number type

I'm using Flash CS4 and Box2D 2.0

I've included the archive with my horribly newbish code in case my explanations aren't enough.
I took a look at your ballActor.as file. You shouldn't name a variable with the same name as a class ("var ballSprite:MovieClip = new ballSprite()"). Try naming it something else, like "ballSp".

As for the b2Vec2 issue, doing this obviously does not work:
Code:
var velVec:b2Vec2 = (initVel.x / SharedVars.ratio, initVel.y / SharedVars.ratio);

Because, like the error says, it looks like you're trying to assign a Number value to a b2Vec2 variable. There's also no conversion to make Number into a b2Vec2 so it spits out an error because the compiler doesn't understand why you're putting in a Number value into an unrelated b2Vec2 variable.

Do this:
Code:
var velVec:b2Vec2 = new b2Vec2(initVel.x / SharedVars.ratio, initVel.y / SharedVars.ratio);

b2Vec2 is a class that stores a vector (in its x and y component like the Point class) with some vector functions to manipulate it. So if you declare a variable with type b2Vec2, the value you're assigning to has to be an instance of the b2Vec2 class or a subclass of b2Vec2 (much like the "Base Class: flash.display.MovieClip" in ballSprite's properties, ballSprite is a subclass of MovieClip, which is why you can store it in a MovieClip variable).

Original thread: https://box2d.org/forum/viewtopic.php?t=8181