MasterKitano
MasterKitano

Reputation: 628

stage==null in .fla file when testing on web browser

Im having a terrible issue with flash and started happening last night, If I create a file in Flash CS5.5 and add this code in the first frame:

trace(stage);

when I test it inside the Flash IDE it traces this: [object Stage]

but when I run that same swf file in a web browser, it traces this: null

its seems like it never adds the application to stage, why is this hapening? it has never happened me before, am I the onlyone?

Upvotes: 1

Views: 90

Answers (2)

MasterKitano
MasterKitano

Reputation: 628

its been a while since I've checked this post. Just to answer this question, it was just a player bug that got fixed in a later release.

Upvotes: 0

apscience
apscience

Reputation: 7273

addEventListener(Event.ADDED_TO_STAGE, onAddToStage);
private function onAddToStage(e:Event){
    trace(stage);
}

If the trace is never called, what is your browser and what is your flash player version?

Upvotes: 1

Related Questions