I?m trying to load an image on an empty movieclip on to my flash stage but it doesn't want to load the picture. The output window displays "the class or interface 'Logo' could not be loaded.? What class should i script here? class Logo { private var targetClip:MovieClip; private var containerClip:MovieClip; private var __logoWidth:Number; private var __logoHeight:Number; private var imageLoader:MovieClipLoader; public function Logo(target:MovieClip, w:Number, h:Number, img:String) { targetClip = target; imageLoader = new MovieClipLoader(); imageLoader.addListener(this); __logoWidth = w; __logoHeight = h; createMainContainer(0, 0); createImageClip(); loadImage(img); } private function createMainContainer(x:Number, y:Number):Void { containerClip = targetClip.createEmptyMovieClip("container_mc", 10); containerClip._x = x; containerClip._y = y; } private function createImageClip():Void { containerClip.createEmptyMovieClip("image_mc", 20); } private function loadImage(URL:String):Void { imageLoader.loadClip(URL, containerClip.image_mc); } private function onLoadInit(target:MovieClip):Void { resize(target, __logoWidth, __logoHeight); } private function resize(target:MovieClip, w:Number, h:Number):Void { target._width = w; target._height = h; // maintains proper aspect ratio target._xscale = target._yscale = Math.min(target._xscale, target._yscale); } public function set logoWidth(n:Number) { __logoWidth = n; } public function get logoWidth():Number { return __logoWidth; } public function set logoHeight(n:Number) { __logoHeight = n; } public function get logoHeight():Number { return __logoHeight; } } // -- end : Logo
[quoted text, click to view] >>The following is what i have in my logo.as file:
Don't see what you're looking for? Try a search.
|