Bonjour à tous,

J'ai un problème avec une galerie des produits en flash qui tourne comment un carrousel:

Ce flash est inseré dans l'accueil de mon site donc s'est très perturbateur s'il tourne tout le temps.

J'ai du donc éditer le code AS pour qu'il s'arrête dès que la souris est dehors les produits, le problème est que sans le vouloir j'ai modifié le mouvement du carrousel et maintenant il marche pas très bien.

vous pouvez voir le flash inséré dans mon site ICI ->

http://www.colombiaaprende.edu.co/ht...2/channel.html

c'est en fait le module rouge juste en bas du footer.

Je vous copie aussi le code AS
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
stop();
var folder:String = "http://64.76.190.172/ntg/ca/carrusel/carrusel_imgs/";    //  carpeta de imagenes y el archivo XML
var total:Number;
var radiusX:Number = 480;
var radiusY:Number = 300;
var centerX:Number = 387;
var centerY:Number = 150;     //  no variar por legibilidad del titulo
var speed:Number = 0.005;
var timeoutID:Number;
var intervalID:Number;
 
tn_group_mc._visible = false;
fm_label.text = ""; fm_url.text = "";
 
var xml:XML = new XML();
xml.ignoreWhite = true;
 
xml.onLoad = function()
{
    var nodes = this.firstChild.childNodes;
    total = nodes.length;
 
    for( var i=0; i < total; i++)
    {
        var t = tn_group_mc.duplicateMovieClip("tn"+i, i);
        t.angle = i * ((Math.PI*2)/total);
        t.onEnterFrame = mover;
        t.tn_mc.inner.loadMovie( folder + nodes[i].attributes.filename );
        t.tn_reflection_mc.inner.loadMovie( folder + nodes[i].attributes.filename );
        t.fm_label = nodes[i].attributes.label;
        t.fm_url = nodes[i].attributes.url;
 
        t.fm_button.onRollOver = function()
        {
            fm_label.text =  "Ir a " + this._parent.fm_label;
            fm_url.text = "URL: " + this._parent.fm_url;
        }
        t.fm_button.onRollOut = function()
        {
            fm_label.text = "";
            fm_url.text = "";
        }
        t.fm_button.onRelease = function()
        {
            getURL(this._parent.fm_url, _blank);
        }
    }
}
xml.load( folder + "edit.xml");
 
function mover()
{
    this._x = Math.cos(this.angle) * radiusX + centerX;
    this._y = Math.sin(this.angle) * radiusY + centerY;
    var s = this._y /(centerY+radiusY);
    this._xscale = this._yscale = s*100;
    this.angle += this._parent.speed;
    this.swapDepths(Math.round(this._xscale) + 100);
}
this.onMouseMove = function(){
   clearInterval(intervalID);
   clearTimeout(timeoutID);
   speed = (this._xmouse-centerX) * 0.0001;
   setTimeout(inactive, 30);
}
 
//If the move doesn't move for 2secs, this function is called
function inactive():Void
{
   clearInterval(intervalID);
   intervalID = setInterval(decreaseVelocity, 0.001);
}
 
//Each 100ms the speed is decreased 0.5 until zero
function decreaseVelocity():Void
{
   if(speed>0)
   {
      speed -= 0.001;
   }else
   {
      clearInterval(intervalID);
      speed = 0;
   }
}
Merci si quelqu'un peux m'aider!!!!!!!!!!!!!




<config>Mac OS X / Safari 530.19</config>