Hi there.
I’m starting my first AS3 project and I’m trying to make a generic Pre-loader class which is the document class of my Pre-loader .fla.
I have made my logo in CS3 and set the linkage class but I can’t access it from the document class, in fact with this code I can only use it in the .fla’s time line.
Is there something I’m doing wrong, I basically want to load library item from .as files.
package {
import flash.display.*;
import flash.events.*;
public class Preloader extends Sprite {
public function Preloader() {
//This section here works in the fla's time line
var _loaderLogo:Logo = new Logo();
_loaderLogo.x = _loaderLogo.y = 100;
addChild(_loaderLogo);
}
}
}