PDA

View Full Version : Basic question - How do I setup a contructor & class?


timdenty
01-09-2008, 05:12 PM
I'm new to as3, and am trying to get to grips with constructor & classes. Basically, I need to implement this code to my movie, but due to my lack of knowledge am having trouble.

// In main class constructor:
primaryDisplayObject.stage.addEventListener(Event. ADDED,
displayObjectAdded, true);

// A little later in the main class:
// Listener when any display object is added to stage.
private static function displayObjectAdded(evt:Event):void {
if (evt.target is FLVPlayback) {
evt.target.fullScreenTakeOver = false;
}
}

It's a simple movie containing an flv using standard components, no other actionscript is really used in the movie.

Can someone give me some pointers on how to implement this code, as I've had little luck with the tutorials I've read.

Thanks