i am trying to convert that to a regular preloader, for some reason, it does not work ... any ideas???
// function to load an external .swf function ploader() { // swf file to load loadMovieNum("bigfile.swf", 1); // bar dimensions var barWidth:Number = 100; var barHeight:Number = 6; // the progress bar this.createEmptyMovieClip("pBar_mc", 9999); var bar:MovieClip = pBar_mc.createEmptyMovieClip("bar_mc", 10); bar.beginFill(0x2F84E4, 100); bar.moveTo(0, 0); bar.lineTo(barWidth, 0); bar.lineTo(barWidth, barHeight); bar.lineTo(0, barHeight); bar.lineTo(0, 0); bar.endFill(); // start the bar at 0 width bar._xscale = 9; // the bars stroke, make same color as bar for no stroke var stroke:MovieClip = pBar_mc.createEmptyMovieClip("stroke_mc", 20); stroke.lineStyle(0, 0xCCCCCC); stroke.moveTo(0, 0); stroke.lineTo(barWidth, 0); stroke.lineTo(barWidth, barHeight); stroke.lineTo(0, barHeight); stroke.lineTo(0, 0); // percent loaded in text versus graphic pBar_mc.createTextField("label_txt", 30, 0, barHeight, 100, 21); pBar_mc.label_txt.font = "silkscreen"; pBar_mc.label_txt.autoSize = "left"; pBar_mc.label_txt.selectable = false; pBar_mc.label_txt.textColor = 0x2F84E4; // center the progress bar on the stage pBar_mc._x = (Stage.width/2 - pBar_mc._width/2); pBar_mc._y = (Stage.height/2) // preloading part _root.onEnterFrame = function() { if (_framesloaded < _totalframes){ // scales the progress bar as a percentage of frames loaded tBytes = getBytesTotal(); bLoaded = getBytesLoaded(); percent = (bLoaded/tBytes)*100; _root.pBar_mc._xscale = (bLoaded/tBytes)*100; _root.pBar_mc.label_txt.text = percent & " % LOADED" } else { //plays the main movie and deletes preloader play(); pBar_mc.unloadMovie(); clearInterval(myInterval); } } } // call the preloader ploader(); // thats my code, stuck here :/ it loads the swf, but it never displays it, but plays the mus ic in it, and the progress bar and the text never show up ... :/ _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com