They are declared in the format " public var pageService:PageService;"
--- In [email protected], "helihobby" <[EMAIL PROTECTED]> wrote: > > I think you forgot to add var unless you define a private var at the > top. > > > --- In [email protected], "rumpleminzeflickr" > <rumpleminze@> wrote: > > > > Hi, > > > > This maybe a really dumb question, but why I can't I create new > > objects or even assign a null object a value in the class itself? > > > > It works fine if I do it in a function. Just trying to understand > i'm > > sure there is a good reason. > > > > Many thanks, > > > > > > > > > > public class MyClass > > { > > > > // doesn't work here > > pageRO = new RemoteObject(); > > pageService = PageService.getInstance(); > > > > > > public function Foo():void{ > > > > // works here > > pageRO = new RemoteObject(); > > pageService = PageService.getInstance(); > > > > } > > } > > >

