Yugop Slicer nur bei Berührung mit MC

IRIE

Mitglied
Hallo zusammen.

Ich hab eine Bildergallerie in der Form eines Yugop Sliders. Und möchte es realisieren, das er nur dann sich bewegt, wenn auch die Maus mit dem Slider (MovieClip) in Berührung ist.

Bisher ist das mein Code:

PHP:
onClipEvent (load) {
	button_count = 227;
	button_height = template._height;
	total_height = button_count*button_height;
	template._visible = false;
	for (i=1; i<=button_count; i++) {
		new_button = template.duplicateMovieClip("button"+i, i);
		new_button.holder.loadMovie("../pics/hamburg/hamburg_"+i+".jpg");
		new_button.my_id = i;
		new_button._y += button_height*i-total_height/2;
	}
}
onClipEvent (enterFrame) {
	speed = Math.round(-_ymouse/4);
	for (i=1; i<=button_count; i++) {
		current_mc = this["button"+i];
		current_mc._y += speed;
		if (current_mc._y>total_height/2) {
			current_mc._y -= total_height;
		}
		if (current_mc._y<-total_width/2) {
			current_mc._y += total_height;
		}
	}
}


Danke für die Hilfe

Michi
 
Hi,

wo befindet sich dabei das Objekt "slider", und welchen Instanznamen hat es?

Generell wäre das so etwas:
Code:
onClipEvent (enterFrame) {
    if (slider.hitTest(_xmouse, _ymouse)) {
        speed = Math.round(-_ymouse/4);
        for (i=1; i<=button_count; i++) {
            current_mc = this["button"+i];
            current_mc._y += speed;
            if (current_mc._y>total_height/2) {
                current_mc._y -= total_height;
            }
            if (current_mc._y<-total_width/2) {
                current_mc._y += total_height;
            }
        }
    }
}
Wird aber in der Praxis kaum funktionieren, da es darauf ankommt, wie die einzelnen Objekte geschachtelt sind. Poste am besten mal Deine Datei (fla).

Gruß
.
 
Hier ist meine Fla File !

Danke

Michi


EDIT: Danke für die Hilfe - habs mit dieser If Abfrage hinbekommen !
 

Anhänge

  • bildlauf.zip
    116,3 KB · Aufrufe: 92
Zuletzt bearbeitet:
Zurück