Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    problema con un as perdita di proprietà pulsante..

    ragazzi scusate ho un problema con il seguente as.. (scusate per la lunghezza).. cmq.. in pratica funziona così: ho 4 immagini.. ai quali vorrei al passaggio del mouse far partire una song .. ma non c'è modo per farglielo fare :\ ho provato a inserire dentro il mc dell'immagine un pulsante che faccia partire una canzone.. ma niente.. è come se perdesse la proprietà di pulsante... come potrei risolvere ?? :\

    il link dove sto provando è questo: http://www.puntopc.org/provaas

    l'as invece è il seguente:


    _root.animation = 1;
    _root.accel = 2.000000E-001;
    _root.rate = 2.000000E-001;
    width = 1;
    var myDepth = 1;
    var max_width = new Array(10, 30, 10, 30, 10, 10, 30, 10, 30, 10);
    var max_height = new Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10);
    var min_width = new Array(-3, 0, -3, 0, -2, 0, -1, 0, -2, -3);
    var min_height = new Array(-5, -5, -2, 0, -3, 0, -10, 0, -3, -2);
    var myRatio = new Array(8.000000E-002, 6.000000E-002, 9.000000E-002, 6.000000E-002, 1.000000E-001, 8.000000E-002, 6.000000E-002, 8.000000E-002, 1.000000E-001, 6.000000E-002);
    var myRatio2 = new Array(1.200000E+000, 2.400000E-001, 4.500000E-001, 3.800000E-001, 3.600000E-001, 4.200000E-001, 2.500000E-001, 3.400000E-001, 3.200000E-001, 2.400000E-001);
    var myRatio3 = new Array(3.200000E-001, 3.400000E-001, 2.800000E-001, 3.200000E-001, 3.300000E-001, 4.200000E-001, 4.400000E-001, 3.200000E-001, 3.800000E-001, 4.400000E-001);
    var out_x = new Array(-200, 1200, -200, 1200, -200, 1200, -200, 1200, -200, 1200);
    for (i = 1; i <= 10; i++)
    {
    this["ratio_x" + i] = (max_width[i - 1] - min_width[i - 1]) / max_width[i - 1];
    this["ratio_y" + i] = (max_height[i - 1] - min_height[i - 1]) / max_height[i - 1];
    this["archives_thum" + i].start_x = this["archives_thum" + i]._x;
    this["archives_thum" + i].start_y = this["archives_thum" + i]._y;
    this["archives_thum" + i].onRollOver = function ()
    {
    if (this._width < 200)
    {
    _root.playSound1();
    ++myDepth;
    this.swapDepths(myDepth);
    this.gotoAndPlay("s1");
    } // end if
    };
    this["archives_thum" + i].onRollOut = this["archives_thum" + i].onReleaseOutside = function ()
    {
    if (this._width < 200)
    {
    ++myDepth;
    this.gotoAndPlay("s2");
    } // end if
    };
    this["archives_thum" + i].onRelease = function ()
    {
    ++myDepth;
    this.swapDepths(myDepth);
    num = this._name.substring(13);
    if (this._width < 200)
    {
    fadeOut2(num);
    }
    else
    {
    targetvalue = 100;
    fadeIn(num);
    } // end else if
    };
    } // end of for
    slideThum = function ()
    {
    for (i = 1; i <= 10; i++)
    {
    this["archives_thum" + i].onEnterFrame = function ()
    {
    var _loc2 = this._name.substring(13);
    //varia l'area attiva per il movimento del mouse orig 6.40000
    this.trg_x = (_xmouse - 500) / 14.400000E+000 * this._parent["ratio_x" + _loc2];
    this.trg_y = (_ymouse - 335) / 14.400000E+000 * this._parent["ratio_y" + _loc2];
    this._x = this._x + (-this.trg_x - this._x + max_width[_loc2 - 1] + this.start_x) * myRatio[_loc2 - 1];
    this._y = this._y + (-this.trg_y - this._y + max_height[_loc2 - 1] + this.start_y) * myRatio[_loc2 - 1];
    };
    } // end of for
    };
    fadeOut = function ()
    {
    for (i = 1; i <= 10; i++)
    {
    delete this["archives_thum" + i].onEnterFrame;
    } // end of for
    for (i = 1; i <= 10; i++)
    {
    this["archives_thum" + i].onEnterFrame = function ()
    {
    var _loc2 = this._name.substring(13);
    this.trg = out_x[_loc2 - 1];
    this.speed = (this.trg - this._x) * myRatio2[_loc2 - 1];
    this._x = this._x + this.speed;
    if (Math.abs(this.speed) < 1.000000E-001)
    {
    delete this.onEnterFrame;
    if (_loc2 == 1)
    {
    this._parent._parent.fadeOut();
    } // end if
    } // end if
    };
    } // end of for
    };
    fadeOut2 = function (num)
    {
    for (i = 1; i <= 10; i++)
    {
    if (i != num)
    {
    delete this["archives_thum" + i].onEnterFrame;
    } // end if
    } // end of for
    for (i = 1; i <= 10; i++)
    {
    if (i != num)
    {
    this["archives_thum" + i].onEnterFrame = function ()
    {
    var _loc2 = this._name.substring(13);
    this.trg = out_x[_loc2 - 1];
    this.speed = (this.trg - this._x) * myRatio2[_loc2 - 1];
    this._x = this._x + this.speed / 2;
    if (Math.abs(this.speed) < 1.000000E-001)
    {
    delete this.onEnterFrame;
    if (_loc2 == 1)
    {
    this._parent._parent.fadeOut2(num);
    } // end if
    } // end if
    };
    } // end if
    if (i == num)
    {
    targetvalue = 230;
    s = new Sound();
    s.attachSound("sound_over");
    s.start(0, 1);
    this["archives_thum" + i].gotoAndStop(10);
    this["archives_thum" + i].onEnterFrame = function ()
    {
    width = width * _root.accel + (targetvalue - this._xscale) * _root.rate;
    this._xscale = this._xscale + width;
    this._yscale = this._yscale + width;
    var _loc3 = this._name.substring(13);
    this.trg_x = (_xmouse - 500) / 2.400000E+000 * this._parent["ratio_x" + _loc3];
    this.trg_y = (_ymouse - 335) / 2.400000E+000 * this._parent["ratio_y" + _loc3];
    this._x = this._x + (-this.trg_x - this._x + max_width[_loc3 - 1] + this.start_x) * myRatio[_loc3 - 1];
    this._y = this._y + (-this.trg_y - this._y + max_height[_loc3 - 1] + this.start_y) * myRatio[_loc3 - 1];
    };
    } // end if
    } // end of for
    };
    fadeIn = function (num)
    {
    s = new Sound();
    s.attachSound("sound_over2");
    s.start(0, 1);
    for (i = 1; i <= 10; i++)
    {
    if (i != num)
    {
    this["archives_thum" + i]._x = out_x[i - 1];
    this["archives_thum" + i].onEnterFrame = function ()
    {
    var _loc2 = this._name.substring(13);
    this.trg = this.start_x;
    this.speed = (this.trg - this._x) * myRatio3[_loc2 - 1];
    this._x = this._x + this.speed;
    this._xscale = 100;
    this._yscale = 100;
    if (Math.abs(this.speed) < 1.000000E-001)
    {
    delete this.onEnterFrame;
    if (_loc2 == 0)
    {
    slideThum();
    } // end if
    slideThum();
    } // end if
    };
    continue;
    } // end if
    this["archives_thum" + i].gotoAndPlay("s2");
    } // end of for
    };
    fadeIn();
    everything ends but not my L0Ve 4 U

  2. #2
    avevo quasi risolto uf:°

    se applico questo as:

    archives_thum1.onPress = function() {
    getURL("http://www.tin.it", "_blank");
    };

    funziona...
    ma se invece di onPress metto onRollOver
    non funziona ! :\

    a me servirebbe proprio quello!
    cosa sbaglio ??
    everything ends but not my L0Ve 4 U

  3. #3
    forse ho trovato il modo...
    se qualcuno ha avuto un prob simile al mio..
    ho commentato il rollover dell'as e messo

    archives_thum1.onRollOver = function() {
    _root.masklogo01._x = 100
    this.gotoAndPlay("s1");
    };
    archives_thum1.onRollOut = function() {
    _root.masklogo01._x = 3.5
    };


    così funziona tutto compreso il rollover e rollout che volevo io.. :P

    pardòn x il 3d non credevo di riuscire a risolvere da solo
    everything ends but not my L0Ve 4 U

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.