RE: [Flashcoders] preloader issue?
are your trace statements showing the expected info? -Original Message- From: murder design [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 07, 2006 1:46 PM To: Flashcoders mailing list Subject: [Flashcoders] preloader issue? I have posted this before, and gotten some feedback, this is the result, yet i still cannot get the clip to display the load progress of bigfile.swf inside the label_txt. the swf loads inside of _root.target_mc ... any ideas here people? // - begin code target_mc.loadMovie(bigfile.swf); target_mc.onEnterFrame = function() { tBytes = getBytesTotal(); trace (tBytes: + tBytes); bLoaded = getBytesLoaded(); trace (bLoaded: + bLoaded); percent = (bLoaded/tBytes) * 100; if (bLoaded tBytes){ _root.bar_mc._xscale = (bLoaded/tBytes)*100; _root.label_txt.text = percent % LOADED } else { //play(); //_root.target_mc.unloadMovie(); delete this.onEnterFrame; } } // end code regards, edward ___ 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 ___ 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
RE: [Flashcoders] preloader issue?
Also, double check the string concatenation. You had an ampersand in... _root.label_txt.text = percent % LOADED It should be a plus sign... _root.label_txt.text = percent + % LOADED ___ 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
Re: [Flashcoders] preloader issue?
If you attach this to the clip itself, it does work - onClipEvent (load) { this.loadMovie(bigfile.swf); } onClipEvent (enterFrame) { tBytes = this.getBytesTotal(); trace(tBytes: +tBytes); bLoaded = this.getBytesLoaded(); trace(bLoaded: +bLoaded); percent = (bLoaded/tBytes)*100; if (bLoadedtBytes) { _root.bar_mc._xscale = (bLoaded/tBytes)*100; _root.label_txt.text = percent % LOADED; } else { //play(); //_root.target_mc.unloadMovie(); //delete this.onEnterFrame; } } Van R Tuck Director of Web Development Cause Design Group 1519 Stanford Street Suite 6 Santa Monica, CA 90404 t: 310.430.5369 www.causedesigngroup.com On Mar 7, 2006, at 10:45 AM, murder design wrote: I have posted this before, and gotten some feedback, this is the result, yet i still cannot get the clip to display the load progress of bigfile.swf inside the label_txt. the swf loads inside of _root.target_mc ... any ideas here people? // - begin code target_mc.loadMovie(bigfile.swf); target_mc.onEnterFrame = function() { tBytes = getBytesTotal(); trace (tBytes: + tBytes); bLoaded = getBytesLoaded(); trace (bLoaded: + bLoaded); percent = (bLoaded/tBytes) * 100; if (bLoaded tBytes){ _root.bar_mc._xscale = (bLoaded/tBytes)*100; _root.label_txt.text = percent % LOADED } else { //play(); //_root.target_mc.unloadMovie(); delete this.onEnterFrame; } } // end code regards, edward ___ 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 ___ 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
Re: [Flashcoders] preloader issue?
one for all those with gmail On 3/7/06, Van Tuck [EMAIL PROTECTED] wrote: If you attach this to the clip itself, it does work - onClipEvent (load) { this.loadMovie(bigfile.swf); } onClipEvent (enterFrame) { tBytes = this.getBytesTotal(); trace(tBytes: +tBytes); bLoaded = this.getBytesLoaded(); trace(bLoaded: +bLoaded); percent = (bLoaded/tBytes)*100; if (bLoadedtBytes) { _root.bar_mc._xscale = (bLoaded/tBytes)*100; _root.label_txt.text = percent % LOADED; } else { //play(); //_root.target_mc.unloadMovie(); //delete this.onEnterFrame; } } Van R Tuck Director of Web Development Cause Design Group 1519 Stanford Street Suite 6 Santa Monica, CA 90404 t: 310.430.5369 www.causedesigngroup.com On Mar 7, 2006, at 10:45 AM, murder design wrote: I have posted this before, and gotten some feedback, this is the result, yet i still cannot get the clip to display the load progress of bigfile.swf inside the label_txt. the swf loads inside of _root.target_mc ... any ideas here people? // - begin code target_mc.loadMovie(bigfile.swf); target_mc.onEnterFrame = function() { tBytes = getBytesTotal(); trace (tBytes: + tBytes); bLoaded = getBytesLoaded(); trace (bLoaded: + bLoaded); percent = (bLoaded/tBytes) * 100; if (bLoaded tBytes){ _root.bar_mc._xscale = (bLoaded/tBytes)*100; _root.label_txt.text = percent % LOADED } else { //play(); //_root.target_mc.unloadMovie(); delete this.onEnterFrame; } } // end code regards, edward ___ 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 ___ 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 ___ 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
Re: [Flashcoders] preloader issue?
Part of the problem is that your onEnterFrame is getting stomped on by the reinstantiation of the target movieclip when the SWF actually begins to load. That effectively (quite) deletes the onEnterFrame. Either attach the onEnterFrame to some other timeline, or load the movie into some other timeline, perhaps a child movieclip. -- Byron Barn Canfield I have posted this before, and gotten some feedback, this is the result, yet i still cannot get the clip to display the load progress of bigfile.swf inside the label_txt. the swf loads inside of _root.target_mc ... any ideas here people? // - begin code target_mc.loadMovie(bigfile.swf); target_mc.onEnterFrame = function() { tBytes = getBytesTotal(); trace (tBytes: + tBytes); bLoaded = getBytesLoaded(); trace (bLoaded: + bLoaded); percent = (bLoaded/tBytes) * 100; if (bLoaded tBytes){ _root.bar_mc._xscale = (bLoaded/tBytes)*100; _root.label_txt.text = percent % LOADED } else { //play(); //_root.target_mc.unloadMovie(); delete this.onEnterFrame; } } // end code regards, edward ___ 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 ___ 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
Re: [Flashcoders] preloader issue?
this code does work, however the percent displays something like 15 places ... onClipEvent (load) { this.loadMovie(bigfile.swf); } onClipEvent (enterFrame) { tBytes = this.getBytesTotal(); trace(tBytes: +tBytes); bLoaded = this.getBytesLoaded(); trace(bLoaded: +bLoaded); percent = (bLoaded/tBytes)*100; if (bLoadedtBytes) { _root.bar_mc._xscale = (bLoaded/tBytes)*100; _root.label_txt.text = percent % LOADED; } else { //play(); //_root.target_mc.unloadMovie(); //delete this.onEnterFrame; } } i tried math.round but that does not seem to cut the text field length, any ideas? i just want 00. thats it ... not 00.0 thanks for helping me to get this to work - ___ 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