osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stage use in Flex?


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 <leo@xxxxxxxxxxx> 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/
>
>