onEnterFrame Funktion reagiert nicht zusammen mit Tween Klasse [Flash 10]
| Beiträge: 16 Registriert: May 2011
| 14.06.2011, 00:42
Hi Leute,
ich habe eine Bildergallerie, bei der sich die Bilder mit hilfe einer Tween Klasse verschieben soll. Dies habe ich mit arrays gelöst, die sagen, wo sich jedes Bild hinbewegen soll:
ActionScript:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | import mx.transitions.Tween;
import mx.transitions.easing.*;
var posArray:Array = [8132.85, 7486.05, 6892.45, -1396.55];
var btnArray:Array = [
_root.thumb.thumb_tween.magic_thumb,
_root.thumb.thumb_tween.logo_thumb,
_root.thumb.thumb_tween.package_thumb,
_root.thumb.thumb_tween.epos_thumb
];
var aktPos:Number=0;
for (var i:Number=0;i<btnArray.length;i++){
var thumb=btnArray[i];
thumb.id=i;
thumb.onRelease = function() {
new Tween(_root.pic, "_x", Strong.easeOut, _root.pic._x, posArray[this.id], 4, true);
_root.aktPos = this.id;
}
};
|
Jetzt soll sich eine Thumbnail Leiste allerdings auch verschieben, wenn die Maus über einen bestimmten Punkt ist.
ActionScript:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | _root.onEnterFrame = function(){
if(_root._ymouse<658){
thumbVar=false;
}
if(_root._ymouse>659){
thumbVar=true;
}
if(_root._xmouse>446 && _root._xmouse<479 and thumbVar==true){
thumb.prevFrame();
thumb.prevFrame();
}
if(_root._xmouse>971 && _root._xmouse<1004 and thumbVar==true){
thumb.nextFrame();
thumb.nextFrame();
}
}
|
Wenn ich den btnArray ausblende funktioniert es mit der Thumbnail Verschiebung. ?!?
Hat jemand einen Lösungsvorschlag?
Danke,
Metapher | | | Beiträge: 3000 Wohnort: Köln Registriert: Oct 2007
| 14.06.2011, 09:20
|
|