Skip to main content
oluc
Known Participant
October 22, 2009
Answered

Trouble woring with multiple classes.

  • October 22, 2009
  • 1 reply
  • 2019 views

Hi.

Do you know where I can find out what the straight dope is on working with classes?

I am having some issues right now with multiple classes - but I think the main problems is that I really just don't know how to work with multiple classes.

Right now I have 4 classes:

ProjectOne

ProjectOneText

ProjectOneVideos

StageElements

I have these all in the same file called "asFiles". I can get one class (ProjectOneText) to load through the ProjectOne class. But I can't get 2 classes to load in the ProjectOne class.

This is another issue I have been trying to sort out all day.

I probably have it all wrong... but thats why I need some help.

I appreciate any help you can give me!

This topic has been closed for replies.
Correct answer Kalisto

I think tha tyour problem is    logo.x = (stage.stageWidth) /2;

the stage is null because the instance is not added to stage yet


Try to comment this row and see the results

1 reply

kglad
Community Expert
Community Expert
October 22, 2009

why do you have 4 classes in the same file?

oluc
olucAuthor
Known Participant
October 22, 2009

I mean same folder. If that is still wrong I am very much willing to be corrected!!!

Inspiring
October 22, 2009

Folders is package.You may have many files ( public classes ) into it. But in one file you can have only one public class and the name of the class must be the name of the file. In one file you may have many private casses( not visible from outside ). Is that your problem?