|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (7 bit)
Join Date: Dec 2005
Posts: 87
|
Actionscript question
Can I do something like this?
class menuItem{ private string menuName; ... ... ... } You know, like use private and public for class properties? If not, what the hell was Macromedia thinking? Last edited by hartken; 06-22-2007 at 04:33 PM. |
|
|
|
|
|
#2 |
|
Member (7 bit)
Join Date: Dec 2005
Posts: 87
|
Also will actionscript allow me to call another class I created in the class file?
Like if I have a class called "menu" defined in menu.as, and then want to call another class I created called "menuItem" made in another file called menuItem.as? Why even make a framework if you can't do something like that? |
|
|
|
|
|
#3 |
|
Barefoot on the Moon!
Staff
Premium Member
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
|
yes, you can use public/private for variables in classes.
Yes, you can call other classes from within classes so long as the import statement is in the main fla file. Code:
class menu {
public mItem = new menuItem();
}
http://www.gotoandplay.it/_articles/.../as2_part2.php
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.
|
|
|
|
|
|
#4 |
|
Member (7 bit)
Join Date: Dec 2005
Posts: 87
|
Thanks!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| motherboard question | Zeppelin1432 | Computer Hardware | 3 | 06-25-2005 12:37 PM |
| Stereo as computer sound question | longrawker | Home Theater, Audio, and Video | 5 | 05-30-2005 02:28 PM |
| cd burning software question / "sticky" question | chunkstyle | Home Theater, Audio, and Video | 2 | 03-29-2005 11:55 AM |
| Small question | Gizmo | Software Discussion & Support | 3 | 09-03-2004 06:36 PM |
| Important network question | Ymets2k | Networking & Online Security | 0 | 01-25-2003 02:49 PM |