MMOCC the isometric world scene, 2006–now
Archive. Archived from the original MMOCC Forum (2006–2010), recovered from the Internet Archive. The forum is read-only history now — the scene talks on Discord. If you posted here and want something removed, get in touch.

AS3 - Stuff won't display

8 posts · vBulletin era
#1
Hey,

I've been doing AS3 for like less than 24 hours and I have hit a problem.

This is my Main.as file (pretty much as it comes)

Code:
#2
addChild(popup) in your main class.

Also... put your code in the init function so you know you have access to the stage. Another thing, typecast your popup as "popup" (you don't need the whole "window.popup" either since you have already imported that class.
#3
Done, I get this error:
Code:
#4
Typecast it as the popup like I said, you can only add classes that extend the displayobject (sprite, movieclip, bitmap etc).
#5
Right so I now have
Code:
#6
"public class popup extends Sprite"

popup needs a capital P

do the same for the name of the .as file too
#7
Yeah, sorted all that, noob errors haha.
#8
All this sorted now, thanks a lot Willy

Recovered from /showthread.php?p=212895 · captured 2010.