Enjoy an ad free experience by logging in. Not a member yet?
Register .
08-31-2006, 08:21 AM
PM User |
#1
Regular Coder
Join Date: Dec 2005
Posts: 217
Thanks: 1
Thanked 0 Times in 0 Posts
plz help me .....
Hello friends and seniors of codingforum !!
I was adviced to make a animation on the photo, i tried using imageReady
but that made a size a bigger one, leading problem in loading.
I was adviced to make the animation in flash but i have 0 knwoledge in flash and i am just trying it out but i had to submit the animation in a few days. One of friend tried it out and he make as shown in this link
http://www.heavenlypath.org/ But this is not the perfect one. what i want is to make it more attractive adding some smooth and cool effects. Is there anybody who can help me in making a good animation. I would be very greatful if any
body help me in this situation . i am providing the photo link @
http://www.heavenlypath.org/common/guru.gif
Anyway thanks in advance.
08-31-2006, 05:04 PM
PM User |
#2
Senior Coder
Join Date: Mar 2005
Location: Portsmouth UK
Posts: 4,355
Thanks: 3
Thanked 458 Times in 445 Posts
provide a link to your animated gif and will see if I can reproduce it
08-31-2006, 07:45 PM
PM User |
#3
Regular Coder
Join Date: Dec 2005
Posts: 217
Thanks: 1
Thanked 0 Times in 0 Posts
08-31-2006, 10:15 PM
PM User |
#4
Senior Coder
Join Date: Mar 2005
Location: Portsmouth UK
Posts: 4,355
Thanks: 3
Thanked 458 Times in 445 Posts
will have a look tomorrow
but have so far
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<title></title>
<script type="text/javascript">
// by Vic Phillips (31-August-2006) http://www.vicsjavascripts.org.uk
// modes:
// zindex
// visibility
// opacity
// width
// height
// widthheight
// left
// up
// leftdown
// leftup
var ImgPath='http://www.vicsjavascripts.org.uk/StdImages/';
var ImgAry=[];
ImgAry[0]=[ImgPath,'One.gif',3000,10,'width']
ImgAry[1]=[ImgPath,'Two.gif',3000,10,'leftup']
ImgAry[2]=[ImgPath,'Three.gif',3000,10,'leftdown']
ImgAry[3]=[ImgPath,'Four.gif',3000,10,'opacity']
function zxcAnimation(zxcid,zxcary){
var zxcp=document.getElementById(zxcid);
var zxcpary=[];
for (var zxc0=0;zxc0<zxcary.length;zxc0++){
var zxcd=zxcStyle('DIV',{position:'absolute',zIndex:'0',visibility:'hidden'});
var zxcimg=zxcStyle('IMG',{position:'absolute',left:'0px',top:'0px',width:zxcp.offsetWidth+'px',height:zxcp.offsetHeight+'px'});
zxcimg.src=zxcary[zxc0][0]+zxcary[zxc0][1];
zxcd.appendChild(zxcimg);
zxcp.appendChild(zxcd);
zxcStyle(zxcd,{overflow:'hidden',left:((zxcp.offsetWidth-zxcimg.width)/2)+'px',top:((zxcp.offsetHeight-zxcimg.height)/2)+'px',width:zxcimg.width+'px',height:zxcimg.height+'px'});
zxcStyle(zxcd,{overflow:'hidden',left:'0px',top:'0px',width:zxcimg.width+'px',height:zxcimg.height+'px'});
zxcpary.push([zxcd,zxcary[zxc0][2],zxcary[zxc0][3],zxcd.offsetWidth,zxcd.offsetHeight,zxcary[zxc0][4]||'zindex']);
}
zxcStyle(zxcpary[0][0],{zIndex:'1',visibility:'visible'});
zxcp.oop=new zxcAnOOP(zxcp,zxcpary);
}
function zxcStyle(zxcele,zxcstyle,zxctxt){
if (typeof(zxcele)=='string'){ zxcele=document.createElement(zxcele); }
for (key in zxcstyle){ zxcele.style[key]=zxcstyle[key]; }
if (zxctxt){ zxcele.appendChild(document.createTextNode(zxctxt)); }
return zxcele;
}
function zxcAnOOP(zxcp,zxcpary){
this.obj=zxcp;
this.ary=zxcpary;
this.ref='zxcoobr'+zxcp.id;
window[this.ref]=this;
this.to=null;
this.cnt=0;
this.ecnt=100;
this.now=this.ary[0][0];
for (var zxc0=0;zxc0<this.ary.length;zxc0++){
zxcmd=this.ary[zxc0][5];
if (zxcmd!='zindex'&&zxcmd!='visibility'&&zxcmd!='opacity'&&zxcmd!='width'&&zxcmd!='height'&&zxcmd!=zxcmd!='widthheight'&&zxcmd!='left'&&zxcmd!='up'&&zxcmd!='leftdown'&&zxcmd!='leftup'){
alert('Invalid Mode\n'+zxcmd);
return;
}
}
this.rotate();
}
zxcAnOOP.prototype.rotate=function(){
this.ecnt=0;
this.lst=this.ary[this.cnt][0];
// zxcStyle(this.now,{zIndex:'0',visibility:'hidden',left:'0px',top:'0px',width:this.ary[this.cnt][3]+'px',height:this.ary[this.cnt][4]+'px'});
for (var zxc0=0;zxc0<this.ary.length;zxc0++){ this.ary[zxc0][0].style.zIndex='0'; }
this.all();
this.cnt=++this.cnt%this.ary.length;
this.now=this.ary[this.cnt][0];
this.now.style.visibility='visible'; this.lst.style.visibility='visible';
this.lst.style.zIndex=1; this.now.style.zIndex=2;
this[this.ary[this.cnt][5]]();
this.TimeOut('rotate();',this.ary[this.cnt][1]);
}
zxcAnOOP.prototype.all=function(){
for (var zxc0=0;zxc0<this.ary.length;zxc0++){
zxcStyle(this.ary[zxc0][0],{visibility:'visible',left:'0px',top:'0px',width:this.ary[zxc0][3]+'px',height:this.ary[zxc0][4]+'px'});
zxcOpacity(this.ary[zxc0][0],100);
}
}
zxcAnOOP.prototype.TimeOut=function(zxcf,zxcd){
this.to=setTimeout('window.'+this.ref+'.'+zxcf,zxcd);
}
zxcAnOOP.prototype.zindex=function(){
}
zxcAnOOP.prototype.visibility=function(){
this.lst.style.visibility='hidden';
}
zxcAnOOP.prototype.opacity=function(){
zxcOpacity(this.lst,100-this.ecnt);
zxcOpacity(this.now,this.ecnt);
this.ecnt++;
if (this.ecnt<101){ this.ETimeOut('opacity();',this.ary[this.cnt][2]); }
else { this.all(); }
}
zxcAnOOP.prototype.width=function(){
this.now.style.width=this.ecnt+'px';
this.ecnt++;
if (this.ecnt<this.ary[this.cnt][3]){ this.ETimeOut('width();',this.ary[this.cnt][2]); }
else { this.all(); }
}
zxcAnOOP.prototype.widthheight=function(){
this.now.style.width=this.ecnt+'px';
this.now.style.height=(Math.max(this.ecnt/this.ary[this.cnt][3]*this.ary[this.cnt][4],0))+'px';
this.ecnt++;
if (this.ecnt<this.ary[this.cnt][3]){ this.ETimeOut('widthheight();',this.ary[this.cnt][2]); }
else { this.all(); }
}
zxcAnOOP.prototype.height=function(){
this.now.style.height=this.ecnt+'px';
this.ecnt++;
if (this.ecnt<this.ary[this.cnt][4]){ this.ETimeOut('height();',this.ary[this.cnt][2]); }
else { this.all(); }
}
zxcAnOOP.prototype.up=function(){
this.now.style.height=this.ecnt+'px';
this.now.style.top=(this.ary[this.cnt][4]-this.ecnt)+'px';
this.ecnt++;
if (this.ecnt<this.ary[this.cnt][4]){ this.ETimeOut('up();',this.ary[this.cnt][2]); }
else { this.all(); }
}
zxcAnOOP.prototype.leftdown=function(){
this.now.style.width=this.ecnt+'px';
this.now.style.left=(this.ary[this.cnt][3]-this.ecnt)+'px';
this.now.style.height=(Math.max(this.ecnt/this.ary[this.cnt][3]*this.ary[this.cnt][4],0))+'px';
this.ecnt++;
if (this.ecnt<this.ary[this.cnt][3]){ this.ETimeOut('leftdown();',this.ary[this.cnt][2]); }
else { this.all(); }
}
zxcAnOOP.prototype.leftup=function(){
this.now.style.width=this.ecnt+'px';
this.now.style.left=(this.ary[this.cnt][3]-this.ecnt)+'px';
this.now.style.height=(Math.max(this.ecnt/this.ary[this.cnt][3]*this.ary[this.cnt][4],0))+'px';
this.now.style.top=(this.ary[this.cnt][4]-parseInt(this.now.style.height))+'px';
this.ecnt++;
if (this.ecnt<this.ary[this.cnt][3]){ this.ETimeOut('leftup();',this.ary[this.cnt][2]); }
else { this.all(); }
}
zxcAnOOP.prototype.ETimeOut=function(zxcf,zxcd){
this.to=setTimeout('window.'+this.ref+'.'+zxcf,zxcd);
}
function zxcOpacity(zxcobj,zxcopc) {
if (zxcopc<0||zxcopc>100){ return; }
if (zxcobj.style.MozOpacity!=null){ zxcobj.style.MozOpacity=(zxcopc/100)-.001; }
else if (zxcobj.style.opacity!=null){ zxcobj.style.opacity=(zxcopc/100)-.001; }
else if (zxcobj.style.filter!=null){ zxcobj.style.filter = 'alpha(opacity='+zxcopc+')'; }
else if (zxcobj.KHTMLOpacity!=null){ zxcobj.KHTMLOpacity=(zxcopc/100)-.001; }
}
</script>
</head>
<body bgcolor="#FFCC66" onload="zxcAnimation('Tst1',ImgAry);zxcAnimation('Tst2',ImgAry);">
<img src="E:/VicsJavaScripts/StdImages/guru.gif" width="297" height="296" />
<div id="Tst1" style="position:relative;width:200px;height:200px;border:solid black 0px;" ></div>
<div id="Tst2" style="position:relative;width:100px;height:100px;border:solid black 0px;" ></div>
<script> vic=0; </script>
<form name=Show id=Show style="position:absolute;visibility:visible;top:450px;left:0px;" >
<input size=10 name=Show0 >
<input size=10 name=Show1 >
<input size=10 name=Show2 >
<input size=10 name=Show3 >
<input size=10 name=Show4 >
<input size=10 name=Show5 >
<input size=10 name=Show6 >
<input size=10 name=Show7 >
<input size=10 name=Show8 >
<input size=10 name=Show9 >
</form>
</body>
</html>
09-19-2006, 08:35 PM
PM User |
#6
Supreme Master coder!
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
If you wanted this done in flash then why did you post in the javascript forum? We have a flash forum you know? BTW I'm getting a page not found on both the flash and the gif.
__________________
|||| If you are getting paid to do a job, don't ask for help on it! ||||
Jump To Top of Thread
Thread Tools
Rate This Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 09:22 AM .
Advertisement
Log in to turn off these ads.