moins.
ich habe da nen problem wo ich nicht mal sicher sein kann ob ich es einleuchtend beschreiben kann.
ich baue gerade an einem film (
hier). hier habe ich für jeden menuepunkt einen eigenen mc gemacht in dem dann nochmal ein mc mit den angezeigten texten und objecten liegt. zudem ist dort auch eine instanz (!) von einer selbst gebastelten scrollbar.
dann habe ich eine funktion geschrieben, dieser wird der aktuelle menuepunkt mit übergeben und damit soll er dann die onpress-, onrelease- usw. funktionen beim schieber und den pfeilen der scrollbar setzen.
beim schieber funktioniert das auch einwandfrei, aber bei den pfeilen geht das nicht, nur die der ersten textebene. sonst sind die schaltflächen immer auf die erste textebene ausgerichtet (in diesem fall ist das historie, ich habe aber diese ebene ausgeschnitte, und dann lief es bei der nächste textebene, hier kontakt).
hier der code meiner funktion:
ActionScript:
function modScrollbar(menuepunkt){
// nach oben scrollen
this._parent["text_"+menuepunkt+"_mc"]["text_"+menuepunkt]._y=0;
this._parent["text_"+menuepunkt+"_mc"].scrollbar.schieber._y=-95.5;
this._parent["text_"+menuepunkt+"_mc"].scrollbar.scrollbar_oben.onPress = function () {
this._parent._parent["text_"+menuepunkt].onEnterFrame = function(){
if (this._y < 0) {
this._y+=5;
this._parent.scrollbar.schieber._y = -95.5 + (166 * ((0 - this._y) / (this._height - 228)));
if (this._y > 0) this._y=0;
if (this._parent.scrollbar.schieber._y < -95.5) this._parent.scrollbar.schieber._y = -95.5;
}
else this.onEnterFrame = function(){};
};
};
this._parent["text_"+menuepunkt+"_mc"].scrollbar.scrollbar_oben.onRelease = function () {
this._parent._parent["text_"+menuepunkt].onEnterFrame = function(){};
};
this._parent["text_"+menuepunkt+"_mc"].scrollbar.scrollbar_oben.onRollOut = function () {
this._parent._parent["text_"+menuepunkt].onEnterFrame = function(){};
};
// nach unten scrollen
this._parent["text_"+menuepunkt+"_mc"].scrollbar.scrollbar_unten.onPress = function () {
this._parent._parent["text_"+menuepunkt].onEnterFrame = function(){
if (this._y > (0-(this._height-228))) {
this._y-=5;
this._parent.scrollbar.schieber._y = -95.5 + (166 * ((0 - this._y) / (this._height - 228)));
if (this._y < (0-(this._height-228))) this._y=(0-(this._height-228));
if (this._parent.scrollbar.schieber._y > 70.5) this._parent.scrollbar.schieber._y = 70.5;
}
else this.onEnterFrame = function(){};
};
};
this._parent["text_"+menuepunkt+"_mc"].scrollbar.scrollbar_unten.onRelease = function () {
this._parent._parent["text_"+menuepunkt].onEnterFrame = function(){};
};
this._parent["text_"+menuepunkt+"_mc"].scrollbar.scrollbar_unten.onRollOut = function () {
this._parent._parent["text_"+menuepunkt].onEnterFrame = function(){};
};
// schieber bewegen
this._parent["text_"+menuepunkt+"_mc"].scrollbar.schieber.onPress = function () {
this.startDrag(false,this._x,-96,this._x,70);
this._parent._parent["text_"+menuepunkt].onEnterFrame = function(){
this._y = 0-((this._parent.scrollbar.schieber._y + 96) / 166) * (this._parent["text_"+menuepunkt]._height - 228);
};
};
this._parent["text_"+menuepunkt+"_mc"].scrollbar.schieber.onRelease = function () {
stopDrag();
this._parent._parent["text_"+menuepunkt].onEnterFrame = function(){};
};
this._parent["text_"+menuepunkt+"_mc"].scrollbar.schieber.onRollOut = function () {
stopDrag();
this._parent._parent["text_"+menuepunkt].onEnterFrame = function(){};
};
} // function ende
vielleicht versteht ja einer von euch was ich meine und kann mir helfen.