Hi Brian,

Because you can have multiple copies of the same
images loaded at the same time we did not allow you to
bind the inserted image with the one create using
getImage().

But here's a workaround

var Layer = new
DynLayer(zoomi.getHTML({name:'zoomi'}),0,0,800,800,null);
....
....
// when loaded you should be able 
// to get the image object call zoomi
var img = document.images['zoomi'];
img.height = 100;


--
Raymond Irving


--- Brian Hayes <[EMAIL PROTECTED]> wrote:
> Hello, I am relatively new to the dynapi project,
> but as open source
> projects go, this one has captured the attention of
> several. With that
> said and (Excellent job guys/girls) I do have a
> question and statement.
>  
> I have been studying and writing code using the
> dynapi 3x for about
> three week solid, and although my JS skills are
> lacking, I have managed
> to get up to speed in programming using this api.
> See:
> www.keyout.com/keyout/test.cfm. as you can see from
> this, my goal is a
> simple one, but complicate one as well.
>  
> The question: How do you do to images as you do to
> layers?
>  
> Example:
>  
>             This.Lyr = new
> DynLayer(null,0,0,100,100,"e0e0e0");
>  
> From this you can: this.Lyr.setSize(250,250);
> Or animate the growth via some math and calling the
> same funtion until
> you reach your desired W and H.
>  
> But for images? I have tried to simulate this, and
> have done so, but
> extending outside the dynapi library. So, if
> possible could some one
> show me how or guild me on this on how it can be
> done with images?
>  
> This is from some of the example, but the image does
> not change on load.
> Unless I use the document.images[0] object.
>  
>             dynapi.library.include('dynapi.api');
>            
> dynapi.library.include('dynapi.functions.Image');
>            
> dynapi.library.include('dynapi.functions.system');
>  
> var zoomi =
>
dynapi.functions.getImage("/Keyout/Keyout/Zoom-Object.gif",null,null,{al
> ias:"test"});
> var Layer = new
> DynLayer(zoomi.getHTML(),0,0,800,800,null);
> Layer.setVisible(false);
> dynapi.document.addChild(Layer);
>  
>  
>            
> dynapi.functions.captureImageProgress(fn)
>             dynapi.functions.setImageTTL(15000)
>             
>             function fn(completed,failed,total){
>                         if(completed < total){
> Layer.setVisible(false);}
> // Not done loading.
>                                    
> if((completed+failed)==total) { //
> We got failures.
>                                     var
> a=dynapi.functions.getFailedImages();
>                                     for(var
> i=0;i<a.length;i++){
>                                                
> a[i].reload();
>                                     }
>                         }
>                         if (completed == total) { 
> //We gotem all so do
> something usefull.
>                                    
> Layer.setVisible(true); //hide layer
> untill images are loaded..
>                                     var test =
> dynapi.ximages['test'];
>                                     test.height =
> 100;           
>                         }; // we got them all.
>             }
>  
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to