- Flash : Pour les débutants; du start drag, de la fausse 3d du son facile. - CodeS SourceS
- C / C++ / C++.NET : Aide aux débutants: avec un drag'n'drop explorer>listview - CodeS Sou
- Flash : Start drag et stop drag flash as3 - CodeS SourceS
- Javascript : Drag & drop vers un canvas - CodeS SourceS
- Delphi / Pascal : Maitriser le drag and drop ( glisser - déplacer) - CodeS SourceS
21 oct. 2009 à 18:20
vraiment mal foutu
desolé pour l auteur
26 nov. 2006 à 22:48
increment = 4;
level = 0;
pos = this._parent.cylindre._y
ponderelevel = 45
pondere = 1.1
left = curseur.bouton._y;
right = curseur.bouton._y+100;
top = curseur.bouton._x;
bottom = curseur.bouton._x;
difpondere = 1;
rotation = 60
corigerotation = -30
// appui du bouton manivelle
Manivelle.onPress = function() {
if (Key.isDown(Key.getCode(18))) {
autoPan = true;
} else {
autoPan = false;
start = _root._xmouse;
newStart = Manivelle._rotation;
dragging = true;
}
};
//relache du bouton manivelle
Manivelle.onRelease = function() {
dragging = false;
};
// relache hors du bouton manivelle
Manivelle.onReleaseOutside = function() {
dragging = false;
};
// fonction appelée à la cadense du fichier
this.onEnterFrame = function() {
if (dragging) {
pivot = (_root._xmouse-start)*2+newStart;
if (pivot<0) {
pivot=0
}
Manivelle._rotation = pivot;
Aiguille._rotation = pivot;
rotation = (level*pondere)-ponderelevel
if (difpondere>68) {
aiguilleKnocmeter._rotation = corigerotation;
}else {
aiguilleKnocmeter._rotation = rotation-difpondere;
}
this._parent.cylindre._y = 84.4 + level/10
if (pivot>135) {
Manivelle._rotation = 135;
Aiguille._rotation = 135
this._parent.cylindre._y = 84.4 + level/10;
rotation = (level*pondere)-ponderelevel
if (difpondere>68) {
aiguilleKnocmeter._rotation = corigerotation;
}else {
aiguilleKnocmeter._rotation = rotation-difpondere;
}
}
level = Math.round(Manivelle._rotation/1.35);
} else {
if (autoPan) {
textInput.value.selectable = false;
level += increment;
//if (level>99 || level<0) {
if (level>99 ) {
increment *= -1;
}
} else {
textInput.value.selectable = true;
}
if (level>100) {
level = 100;
} else if (level<0) {
level = 0;
} else if (level<=100 && level>=0) {
Manivelle._rotation = level*1.35;
Aiguille._rotation = level*1.35;
this._parent.cylindre._y = 84.4 + level/10;
rotation = (level*pondere)-ponderelevel
if (difpondere>68) {
aiguilleKnocmeter._rotation = corigerotation;
}else {
aiguilleKnocmeter._rotation = rotation-difpondere;
}
}
this._parent.cylindre._y = 84.4 + level/10
rotation = (level*pondere)-ponderelevel
if (difpondere>68) {
aiguilleKnocmeter._rotation = corigerotation;
}else {
aiguilleKnocmeter._rotation = rotation-difpondere;
}
}
sound.setPan(level);
};
////////////////////////////:
curseur.bouton.onPress = function() {
curseur.bouton.startDrag ("", false, left, top, right, bottom);
}
curseur.bouton.onRelease = function() {
curseur.bouton.stopDrag ();
dif= Math.floor(left-curseur.bouton._y);
difpondere = Math.floor((dif/1.4)*-1);
rotation = (level*pondere)-ponderelevel
if (difpondere > 68) {
trace ("if (difpondere > 68)")
aiguilleKnocmeter._rotation = corigerotation;
}else {
aiguilleKnocmeter._rotation = rotation-difpondere;
}
trace ("level="+level);
trace ("ponderelevel="+ponderelevel);
trace ("difpondere="+difpondere);
trace ("rotation ="+rotation);
}
Cordialement Flyman
22 nov. 2006 à 18:44
Merci
21 août 2006 à 16:11
Excellente cette animation, seulement, à l'instar d'Interfect0r, je ne parvient pas à visualiser le code source.
Débutant en actionScript, j'aurais aimé décortiquer ton code afin de le comprendre et d'apprendre la syntaxe.
Pourrais-tu le mettre en ligne , je suis certain qu'il servira à un grand nombre de personne !
29 juil. 2006 à 05:12
bon, aplus
interfector