In my application in the first frame I have the following: this is a simplified version,
import com.Menu.Menu;
import com.Papervision.Papervision;
//add menu to stage
var m : Menu = new Menu()
m.x = selectSpace.x
m.y = selectSpace.y + selectSpace.height
addChild(m)
I have two AS files, one for the Menu and one for Papervision
In my Menu.as file I have
package com.Menu {
public class Menu extends MovieClip {
private function m_down(e:MouseEvent) {
addRoom();
}
}
In the Papervision.as file I have
package com.Papervision{
public class Floor extends MovieClip {
public function addRoom() {
//do some stuff
}
}
}
My question is I get a compile error in the application:
1180: Call to a possibly undefined method addRoom.
Can someone explain to me how you call function from another AS file?