uroboros
01-02-2001, 02:21 AM
(Flash 5)
I have an Entity object from which other objects inherit.
The PC object inherits from it.
Entities need to be able to update some of their variables, which is done by calling Entity's RefreshMe() method.
this.RefreshMe = _level0.RefreshMe;
is what the code looks like in the object. It works like a charm.
PCs have more data in them, so they need to refresh a bit more things than plain old Entities. In the PC object, I have this line:
this.RefreshMe = _level0.RefreshPC;
Trouble is, when I make a new PC,
Character = new PC();
and call
Character.RefreshMe();
Flash calls _level0.RefreshMe()!
What's going on here?
I have an Entity object from which other objects inherit.
The PC object inherits from it.
Entities need to be able to update some of their variables, which is done by calling Entity's RefreshMe() method.
this.RefreshMe = _level0.RefreshMe;
is what the code looks like in the object. It works like a charm.
PCs have more data in them, so they need to refresh a bit more things than plain old Entities. In the PC object, I have this line:
this.RefreshMe = _level0.RefreshPC;
Trouble is, when I make a new PC,
Character = new PC();
and call
Character.RefreshMe();
Flash calls _level0.RefreshMe()!
What's going on here?