Hiya, my onLoadProgress / onLoadInit Delegate events won't fire. I've compared this class with other examples and I can't see where I'm going wrong.

Any help really really appreciated :)

Here's my code:


import PreLoader;
import Display;
import mx.utils.Delegate;


class LoadManager {
        private var rootMC:MovieClip
        public var loadStatus:LoadStatus;
        private var preLoader:PreLoader;
        private var display:Display;
        private var initLoader:MovieClipLoader;
        public var initListener:Object;
                
        
        function LoadManager(m:MovieClip, d:Display){
                rootMC = m;
                display = d;
                init();
        }
        private function init():Void
        {
                preLoader = new PreLoader(rootMC);
                loadInitialAssets();
        }
        private function loadInitialAssets():Void
        {
                //create assetsHolder on main timeline
var tmpContainer:MovieClip = rootMC.createEmptyMovieClip("assetsHolder", rootMC.getNextHighestDepth());
                initLoader = new MovieClipLoader();
                initListener = new Object();
                initListener.onLoadProgress = Delegate.create(this, onProg);
                initListener.onLoadInit = Delegate.create(this, onInit);
                initLoader.addListener(initListener);
                initLoader.loadClip("assets.swf", tmpContainer);      
        }
private function onProg(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void
        {
                trace("onProg:"+target+":"+bytesLoaded);
        }
        private function onInit():Void
        {
                trace(">>>>>>>>>onInit");
        }
}


--------------------------------------------------------------------------
Alistair Colling
Interactive Developer

FPP Brand Communications (Newcastle upon Tyne)
The Courtyard
Dinsdale Place
Sandyford
Newcastle upon Tyne NE2 1BD
Telephone: +44 (0)191 261 6662
Fax: +44 (0)191 233 2511

This transmission is confidential and intended solely for the person or 
organisation to whom it is addressed.
It may contain privileged and confidential information. If you are not the 
intended recipient, you should not
copy, distribute or take any action in reliance on it. If you have received 
this transmission in error, please
notify the sender at the e-mail address above. FPP Design Limited. Reg. Office: The Courtyard, Dinsdale Place, Sandyford, Newcastle upon Tyne NE2 1BD. Registered Number 3775564. Registered in England and Wales. Visit our website at http://www.fpp.net/

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to