From: Richard :o\) <ma...@ri...> - 2000-12-01 01:34:28
|
Hi, You do need pre-loading, 'cause the buttons change very slowly. (Nice site BTW) I waited a little to respond hoping someone would give an example of the image and preloading object from DynAPI2, which I have not yet seen working. I do however have another solution: var mycount=0; DynAPI.onLoad=function() {preLoad()} function preLoad() { Load=new DynLayer(null,100,100,200,200) DynAPI.document.addChild(Load) //this is used to write "please wait" message pic1 = new Image(); pic1.onload = (is.ns4b) ? loadCheck() : loadCheck; pic1.src = "images/pic1.gif"; pic2 = new Image(); pic2.onload = (is.ns4b) ? loadCheck() : loadCheck; pic2.src = "images/pic2.gif"; //add all your images here... } function loadCheck() { mycount++; if(mycount == 2) { DynAPI.document.deleteChild(Load) showPage() //this replaces what is now in DynAPI.onLoad } else { if(mycount < 2) { Load.setHTML('<h4>Loading the Image '+(mycount)+' of 2 images...</h4>') }}} reference the images like this: picOne.setHTML('<img src="'+pic1.src+'" >') (although normally referenced images also show faster) You can see this working in this work-in-progress: http://sagar.richardinfo.com (choose one with dark background) On your second question I'm afraid I don't really understand what you want, do you want to insert a scrollbar, or dynamically resize the window, or is it a text wrap/nowrap problem? Richard:o) ----- Original Message ----- From: "b0n3z" <b0...@go...> To: <dyn...@li...> Sent: Thursday, November 30, 2000 1:17 AM Subject: [Dynapi-Help] Image Preloading & Scrolling content in Skinwindow? > First let me say - What an AWESOME piece of work for all of you that helped > build DynAPI 2! > > Now for a newbie question: > Can someone please tell me how to do Image Preloading? I'm using the > dynapi2-16Sept2000 release as most of the examples seem to work for me. I'm > using several core.gui.skinwindow.js for all the small windows on this site. > It seems to be loading the images individually rather than from cache. If > anyone has an example of this or could help - I would be greatfull. Here is > the site in progress. (excuse the mess - it's a work in progress and I'm > sure there are mistakes) http://www.gotapex.com/b0n3z > > Also If anyone can tell me how to put a scrollable auto-resizing width layer > into a skinwindow. I'm have spent countless hours trying to learn. Here is > an example so far: http://www.gotapex.com/b0n3z/test.html > > Hope to understand DynAPI 2 and Javascript as well as "the great ones" on > here one day. > > thanks, > > Ken Jones > b0...@go... > > ps - if anyone could help me on this - I would be greatfull and would return > the favor some way. > > > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help > ____________________________________________________________ > Get your FREE personal .com domain name and > NAMEzero Personal Portal at: http://www.namezero.com. > For customer service, mailto:cus...@na.... > > |