iosflashflash-builderspritestarling-framework

TypeError: Error #2023: Class Main$ must inherit from Sprite to link to the root. Feathers


Ok, hopefully this problem is easily reproducible:

  1. git clone https://github.com/joshtynjala/feathers

  2. Create Flash Builder project and point it to the TileList example in the examples folder.

  3. Make sure to select Main.as (not TileList.as) as the main file. It is a few folders deep.

I am debugging on my iPhone - not sure what happens with an emulator but I'm assuming I would get the same error. So when I do, Run -> Debug, it loads fine - but when I click on the app to open it on my phone, this error pops up in Flash Builder:

TypeError: Error #2023: Class Main$ must inherit from Sprite to link to the root.

Not sure what this means - I found a few things on google, but nothing has lead me to any success.


Solution

  • My problem was with step 3 in my outline above - I needed to make the TileList.as the main file instead of Main.as (not sure why TileList.as isn't called Main.as) - I also needed to add all the icon images to the main source folder because they weren't there (maybe something that needs to be corrected on the feathers repo).