As3 function boggling my mind

I am reading the API for a custom AS3 engine based on Box2D physics.

There is a function as such:

public function get source():String
public function set source(value:String):void

I want to SET the source of the cat in runtime.

Never in my life have I seen a function written like this…
My object is called cat.

tracing the cat like this : trace (cat.source) ;
works.

BUT SETTING THE CAT variable… that’s another ball of wax.

So I try cat.source = “C:\somefolder\cat.swf”;
Does not work and I’m sure it’s because this is an AS3 type of function that I’m not used to.

Anyone seen anything like this before?
how do you access a “set” method with this type of syntax?

I’ve googled online and this type of syntax seems common
(the word ‘get’ or ‘set’ and THEN the function name)

please advise!!! :mad:

btw here is the function I’m struggling with :
http://citrusengine.com/api/com/citrusengine/machines/BodyMachine.html#source

I cant’ figure out how to use a function like that to “set” .
how can you have set source … two words with a space between them??? what does that mean? how do you use it?

OK, well after looking at countless other implementations of this, it appears that I AM using it correctly as indicated in my code.

it should be simply cat.source = “blah/blah/blah.swf”;

So it’s probably an issue that this property simply can’t be set at runtime.