Pb avec script Action Script sous flash

Fermé
bugs20007 Messages postés 196 Date d'inscription mercredi 6 juin 2007 Statut Membre Dernière intervention 21 janvier 2010 - 13 févr. 2008 à 12:33
 Sprod - 6 oct. 2008 à 10:39
Bonjour,

j'ai recuperais un script pour un menu déroulant sous flash, mais les liens des sous-rubriques sont dirigé vers des URL.
je souhaiterais juste changer ces liens pour qui sont dirigé vers des images.
le code et en AS.
quelqu'un pourrait-il m'aider car la je bloque completement.
Voici le code : (image 1)

Stage.align = "";
Stage.scaleMode = "noScale";
Stage.showMenu = false;

_root.connURL11 = 'http://www.google.fr';

_root.connURL12 = 'http://www..com'
_root.connURL13 = 'http://www..com'

_root.connURL20 = 'http://www..com'
_root.connURL21 = 'http://www..com'
_root.connURL22 = 'http://www..com'
_root.connURL23 = 'http://www..com'
_root.connURL24 = 'http://www..com'

_root.connURL30 = 'http://www..com'
_root.connURL31 = 'http://www..com'
_root.connURL32 = 'http://www..com'
_root.connURL33 = 'http://www..com'

_root.connURL40 = 'http://www..com'
_root.connURL41 = 'http://www..com'
_root.connURL42 = 'http://www..com'

_root.connURL50 = 'http://www..com'
_root.connURL51 = 'http://www..com'
_root.connURL52 = 'http://www..com'
_root.connURL53 = 'http://www..com'

Voici le code de l'image ou l'animation s'arrete.

stop();

_global.menuNum = 5
_global.spd = 4
for ( i=1 ; i<=menuNum ; i++ ) {
inNum = 1
while ( inNum > maxNum ) {
if ( this['sub'+i+inNum] == undefined ) {
maxNum = inNum+1
}
this['sub'+i+inNum]._alpha = 0
this['sub'+i+inNum]._y = - 200
inNum++
}
this['subNum'+i] = inNum - 2
this['subHei'+i] = this['subNum'+i] * 15 + 34
maxNum = 0
}

this.onEnterFrame = function() {
for ( i=1 ; i<=menuNum ; i++ ) {
if ( name ) {
if ( name == i ) {
this['line'+i]._y += (this['line'+(i-1)]._y + this['subHei'+i] - this['line'+i]._y )/spd
this['btn'+i]._height = this['subHei'+i]
this['mtx'+i]._y += ( this['line'+(i-1)]._y - 0 - this['mtx'+i]._y )/spd
dn = 20
for ( n=1 ; n<=this['subNum'+i] ; n++ ) {
dn += 15
this['sub'+i+n]._alpha += ( 100 - this['sub'+i+n]._alpha)/spd
this['sub'+i+n]._y = Math.round(this['mtx'+i]._y + dn)
}
dn = 0
} else {
this['line'+i]._y += (this['line'+(i-1)]._y + 30 - this['line'+i]._y )/spd
this['btn'+i]._height = 30
this['mtx'+i]._y += ( this['line'+(i-1)]._y + 26 - this['mtx'+i]._y )/spd
for ( n=1 ; n<=this['subNum'+i] ; n++ ) {
this['sub'+i+n]._alpha = 0
this['sub'+i+n]._y = -200
}
}
} else {
this['line'+i]._y += (this['line'+(i-1)]._y + 30 - this['line'+i]._y )/spd
this['btn'+i]._height = 30
this['mtx'+i]._y += ( this['line'+(i-1)]._y + 26 - this['mtx'+i]._y )/spd
for ( n=1 ; n<=this['subNum'+i] ; n++ ) {
this['sub'+i+n]._alpha = 0
this['sub'+i+n]._y = -200
}
}
this['mask'+i]._y += (this['line'+(i-1)]._y - this['mask'+i]._y)/spd
this['btn'+i]._y = this['line'+(i-1)]._y
}
}

for( i=1 ; i<=menuNum ; i++ ) {
this['btn'+i].onRollOver = function() {
name = this._name.substring(3,4)
}
this['btn'+i].onRollOut = function() {
name = undefined
if ( _root.page ) {
name = _root.page
}
}
this['btn'+i].onRelease = function() {
name = this._name.substring(3,4)
getURL(_root['connURL'+name+'0'])
}
for ( n=1 ; n<=menuNum ; n++ ) {
this['sub'+i+n].onRollOver = function() {
name = this._name.substring(3,4)
}
this['sub'+i+n].onRollOut = function() {
name = undefined
if ( _root.page ) {
name = _root.page
}
}
this['sub'+i+n].onRelease = function() {
name = this._name.substring(3,5)
getURL(_root['connURL'+name]);
}
}
}
if ( _root.page ) {
name = _root.page
}

Merci pour vos reponse.
A voir également:

1 réponse

Salut toi jai le meme probleme que toi je vouldrais envois les liens vers des étiquettes mais je ne vois pas du tout comment
I'm a nioobie in AS Plz Can help me,
Si tu as reussit a résoudre ce probleme aide moi stp;)
0