Hallo allemaal,
op onze website heb ik een animatie gezet, maar hoewel het plaatje groeit klopt het niet helemaal.
De animatie is te zien op http://www.cabriocadeaubon.nl/page91.html
De wielen van de auto zijn tijdens de groei ovaal, en aan het eind van de animatie 'plopt' de auto pas goed in model. Iemand enig idee hoe dat op te lossen is?
het script bestaat uit twee delen:
<BODY onLoad="zoomImg('test', 10, 150, 546, 306)">
<div align="center"><img src="attachments/Image/Bugatti-Veyron-16_41.png" name="test" id="test" height="0.76" width="2"></div>
en
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var ival, imgname, total, steps, maxx, maxy, currentx, currenty, dx, dy;
function zoomImg(imgname, total, steps, maxx, maxy) {
total = total * 1000;
objref = eval("document.getElementById('"+imgname+"')");
currentx = objref.width;
currenty = objref.height;
stepx = maxx / steps;
stepy = maxy / steps;
inttime = total / steps;
functionRef = "resizeImg('"+imgname+"', "+stepx+", "+stepy+", "+maxx+", "+maxy+")";
ival = setInterval(functionRef, inttime);
}
function resizeImg(imgname, dx, dy, maxx, maxy) {
objref = eval("document.getElementById('"+imgname+"')");
currentx = objref.width;
currenty = objref.height;
if ((currentx<maxx-dx) && (currenty<maxy-dy)) {
objref.height = currenty + dy;
objref.width = currentx + dx;
}
else {
clearInterval(ival);
objref.height = maxy;
objref.width = maxx;
}
}
// End -->
</script>
</HEAD>
Ik heb al wat variabelen geprobeerd, maar ik kom er niet uit.
Vast bedankt!!
Harald
- Onregelmatige groei afbeelding
-
857 × bekeken sinds 06-01-2011, 09:36 #1
Onregelmatige groei afbeelding
-
In de schijnwerper
Product feed grid V1.7 - Creer een affiliate shop in 2 min - WP plugin - V1.7 NU LIVEPHP scriptsBTW calculator - WP plugin - V1.0PHP scriptsStartpagina script V2.1 - WP plugin - Vernieuwd - Vele opties - V2.1 NU LIVEPHP scriptsAffiliate link poster V1.0 - Automatisch affiliate links posten in blogs - WP pluginPHP scripts -
06-01-2011, 18:45 #2
- Berichten
- 1.139
- Lid sinds
- 19 Jaar
Re: Onregelmatige groei afbeelding
Wat als je
total = total * 1000;
verandert in:
total = total * 1200;
Hij zoomt hem namelijk niet helemaal in tot de juiste grootte, net te weinig zoom
Plaats een
- + Advertentie
- + Onderwerp
Marktplaats
Webmasterforum
- Websites algemeen
- Sitechecks
- Marketing
- Domeinen algemeen
- Waardebepaling
- CMS
- Wordpress
- Joomla
- Magento
- Google algemeen
- SEO
- Analytics
- Adsense
- Adwords
- HTML / XHTML
- CSS
- Programmeren
- PHP
- Javascript
- JQuery
- MySQL
- Ondernemen algemeen
- Belastingen
- Juridisch
- Grafisch ontwerp
- Hosting Algemeen
- Hardware Info
- Offtopic