PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > macromedia.dyna.html > Image rollovers with Spry fade possible?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Image rollovers with Spry fade possible?

Réponse
 
LinkBack Outils de la discussion
Vieux 29/03/2008, 10h04   #1
wriggs
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Image rollovers with Spry fade possible?

Does anyone know of a way to implement the Spry Fade effect so that the result
is an image that will fade onmouseover and fade out onmouseout?

Ideally I would use .hover, but this is not available, so I have to use
onmouseover and onmouseout.

The problem with this is that if you roll out of the image before the fade is
complete, when you roll in again, the image starts the fade again and does not
fade from where it had gotten to.

I could use setInterval and clearInterval, but I was hoping that Spry would
have a good, fast work around.

Basically I want a button image that fades seamlessly when you rollover it.

Many thanks.

  Réponse avec citation
Vieux 31/03/2008, 10h34   #2
Bagi Zolt?n
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Image rollovers with Spry fade possible?

[q]Originally posted by: wriggs
Does anyone know of a way to implement the Spry Fade effect so that the result
is an image that will fade onmouseover and fade out onmouseout?

Ideally I would use .hover, but this is not available, so I have to use
onmouseover and onmouseout.

The problem with this is that if you roll out of the image before the fade is
complete, when you roll in again, the image starts the fade again and does not
fade from where it had gotten to.

I could use setInterval and clearInterval, but I was hoping that Spry would
have a good, fast work around.

Basically I want a button image that fades seamlessly when you rollover it.

Many thanks.[/q]

Hi, I have no relevant eixperience with the Spry ajax framework, but it can be
solved with
http://mootools.net/ easily.

<img src="yourbutton" id="button" onmouseover="fadein();"
onmouseout="fadeout();"/>

<script>
function fadein() {
new Fx.Style( "button", 'opacity', {duration: 1000 } ).start(0.5,1);}
function fadeout() {
new Fx.Style( "button", 'opacity', {duration: 1000 } ).start(1,0.5);}
</script>

Of course you will need to set the 0.5 opacity property via css.
Regards
Bagi Zolt?n



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 05h53.


Édité par : vBulletin® version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07450 seconds with 10 queries