Looking a bit further, I see that View inherits 'stage' from DisplayObject, so any subclass of DisplayObject will have it...
On Thu, Dec 6, 2018 at 7:57 PM Douglas McCarroll < list.apache-flex....@brightworks.com> wrote: > Searching through my code I see one place - in a subclass of > spark.component.View - where I do this: > > if (stage) { > onAddedToStage(); > } > else { > addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); > } > > There may be other classes in Flex that have a stage property - I'm not > sure... > > In any case, you should ensure, as above, that the class has been added to > the stage before trying to reference the stage property. > > Douglas > > > > > On Thu, Dec 6, 2018 at 2:27 PM leokan23 <l...@best-web.gr> wrote: > >> I am trying to use stage to add an admob banner in my flex app but it >> fails >> when I use this: >> >> stage.stageWidth / 2 >> >> How can I use stage inside a Flex app? I can't find any info. >> >> >> >> -- >> Sent from: http://apache-flex-users.2333346.n4.nabble.com/ >> >>