I am exploring object orented programing in flash.
and here is my first problem I ran into…
I want to link class instance with mc instance.
I want to create… lets say…
class player(){
function go(){
...
}
}
and then create MC …
lets say…
_root.player_mc
I want to link it so I could do
_root.player_mc.go();
… how to do it?
of course I can…
_root.player_mc.go = class_instance.go();
…
or something… but it’s not the way I want to use classes in the flash… I do not want to link all properties and all methods that way…
If I will change my class… I will have to corect all such links…
Right click the movie clip in the library, (linkage) export for ActionScript, assign it an identifier, and use your class’s name, (player) in AS 2.0 Class (in properties).
Usualy a class’s name starts with upper case: Player, not player.
This is a good practice, but if you don’t follow it, make just you always write it the same way.