Test with fun how much you know about Art4.01 / 5.00 12,119 Views
Challenge hordes of ninjas in this epic action adventure game.4.14 / 5.00 43,842 Views
Help strange creatures to bring the eye to a mysterious customer.3.73 / 5.00 14,876 Views
I created a class called "bgitem" that extends the Sprite class and gives it a few extra variables. I've changed the base class of a handful of library items to Sprite and am trying to cast them as "bgitem"s.
Is there any way to convert them on the fly without creating an identical .as for every single library class?
public var building:bgitem = bgitem(new building1())
Instead of making the base class of building1 extend Sprite, make it extend bgitem. No need to cast. Give that a try.