I have a SWF file having different scenes. This swf has one document class. I want to notify an event to a particular scene, when a change is happening in any function in document class.
I have 3 scenes in an SWF and one document class. When a function will be invoked (from lower layer) in document class, I want to disable the button controls in Scene 2. How this is possible?
Well, I don't use scenes so I'm not 100% here, but without scenes you'd just set up a listener and then dispatch a custom event when you want to notify.
and in your document class:
private function jumpUp():void
And doSomething() would be invoked. Again I'm not sure because your using scenes, but this is the way without scenes.
While I'd recommend getting the scenes out of the design (just use the one main timeline with divisions or movieclips in place of scenes), you might need to have some global variables hanging around that you set and use as conditionals for the buttons to work or not. So if you're in scene 1 and want to inhibit a button in scene 2, you set a global variable to false and use it in a conditional in scene 2 when it comes time to set the event listeners or the mouseEnabled property of the button(s). I haven't done much with truly global variables in AS3, and they were removed from the language, so I can't say that trying to use a global class will be supported by scenes.
As far as I know, animators like scenes.... they don't use code or navigation, just timeline animations, and it works out well for them. But when you try to implement scenes in a coded design that involves navigation the ride can get unpredictably bumpy.
I never use them in my own work, having come to dislike them from the first time I encountered them in someone else's work--didn't know they existed until then. I couldn't find what I was looking for until I was told the file used scenes.
yeh, it's somehow a relict from the old times of Flash 3, i believe though that animators prefer working with scenes then with movieclips, but I think that most of them also started to move away from it.