Re: [Flashcoders] Re: External preloader using loadClip() - is it a good idea?
Hi, one more small comment: On 6/18/07, Alexander Farber [EMAIL PROTECTED] wrote: I've solved my problem of the loadClip('Main.swf', ...) delivering the same old version of the Main.swf by the standard trick of appending a random string. I've realized, that an external preloader doesn't work well for my project, because the latter is big and I'm changing it daily. IMHO flash player makes a stupid thing with its cache: It should send an If-Modified-Since request to the web server and serve the .swf file only if the web server has replied with a 304 Not Modified. But instead the flash player just always sends the .swf file if it has found it in the cache, without the check... Regards Alex -- http://preferans.de ___ 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] Re: External preloader using loadClip() - is it a good idea?
Sorry, a small copy-paste typo - the function below is onLoadProgress On 6/18/07, Alexander Farber [EMAIL PROTECTED] wrote: function onLoadInit(target_mc:MovieClip, loaded:Number, total:Number):Void { load_txt.text = Math.ceil(loaded * 100 / total) + '%'; } ___ 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] Re: External preloader using loadClip() - is it a good idea?
Thank you, but unfortunately this: On 6/18/07, Digg Yeah [EMAIL PROTECTED] wrote: [to prevent cacheing, ToolsInternet optionstemporary internet files settingscheck every visit to page ] won't clear the flash cache for me: I don't see my preloader Load.swf anymore, I see the Main.swf instantly... Regards Alex ___ 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] Re: External preloader using loadClip() - is it a good idea?
To see the preloader: Test the movie in flash ide itself. Control Test movie This will publish and open your swf. From View Download settings choose a very small value [or you can set your own value ] Now try ViewStimulate download. On 6/18/07, Alexander Farber [EMAIL PROTECTED] wrote: Thank you, but unfortunately this: On 6/18/07, Digg Yeah [EMAIL PROTECTED] wrote: [to prevent cacheing, ToolsInternet optionstemporary internet files settingscheck every visit to page ] won't clear the flash cache for me: I don't see my preloader Load.swf anymore, I see the Main.swf instantly... Regards Alex ___ 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] Re: External preloader using loadClip() - is it a good idea?
On 6/18/07, Digg Yeah [EMAIL PROTECTED] wrote: _root is a reference to the root timeline of a swf. Its not a movieclip. That is an incorrect statement. _root is a reference to a MovieClip. _level0 is also a reference to a MovieClip. The timeline is only a Flash IDE visual representation of a MovieClip. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ 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] Re: External preloader using loadClip() - is it a good idea?
Hello all again, I've solved my problem of the loadClip('Main.swf', ...) delivering the same old version of the Main.swf by the standard trick of appending a random string. The minor problem left is that I have to copy my authentication variables manually by doing: target_mc.userid = _root.userid; target_mc.pass = _root.pass; That is why I'm asking about _root. If I could load the Main.swf inplace of the root MovieClip, then I maybe wouldn't need the copying above. Regards Alex PS: And here is my current code (seems to work...) var depth:Number = 10; var mcl:MovieClipLoader = new MovieClipLoader(); var cont_mc:MovieClip = this.createEmptyMovieClip('cont_mc', depth++); var load_txt:TextField = this.createTextField('load_txt', depth++, Stage.width / 2, Stage.height / 2, 200, 100); var now:Date = new Date(); var tries:Number = 3; mcl.addListener(this); // append epoch seconds to prevent loading from cache mcl.loadClip('Main.swf?' + now.getTime(), cont_mc); function onLoadProgress(target_mc:MovieClip, loaded:Number, total:Number):Void { load_txt.text = Math.ceil(loaded * 100 / total) + '%'; } function onLoadInit(target_mc:MovieClip) { load_txt.removeTextField(); target_mc._lockroot = true; target_mc.userid = _root.userid; target_mc.pass = _root.pass; target_mc.play(); } // workaround when testing locally (strip the seconds) function onLoadError(target_mc:MovieClip, error:String) { if ('URLNotFound' == error tries-- 0) mcl.loadClip('Main.swf', cont_mc); } ___ 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