Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 20-10-2005, 11:30   #1 (permalink)
Neuer User
 
Registriert seit: Nov 2003
Beiträge: 9
vertikaler und horizontaler scroll per actionscript

bin am verzweifeln. habe mittels eines tutorials einen vertikalen scroller für ein dynamisches textfeld hinbekommen. da ich aber auch einen horizontalen scroller für eine seite brauche, hab ich versucht das script mittels der koordinaten umzuändern-leider erfolglos

ich muss gestehen, dass ich ein neuling bin und hoffe, dass ihr mir weiterhelfen könnt. Meine fla-datei mit dem funktionierenden vertikalen scroller sieht folgendermaßen aus:

Ich habe ein container-mc in dem ein masken-mc (mask), ein button-mc (button) und ein textfeld-mc (mc2) liegt.

textfeld-mc 1.frame as:
createTextField("dynamic_txt", 0, 0, -195, 200, 20);
dynamic_txt.selectable = false;
dynamic_txt.text = "Ballett für Erwachsene";
var mc2:TextFormat = new TextFormat();
mc2.size = 12;
mc2.font = "Verdana";
mc2.bold = true;
mc2.italic = true;
dynamic_txt.setTextFormat(mc2);
underlined = new TextFormat();
underlined.underline = true;
underlined.size = 12;
underlined.font = "Verdana";
dynamic_txt.setTextFormat(0, 22, underlined);

Button as:

onClipEvent (load) {
_parent.mc2.mc2.autoSize = true;
//so that the textbox autoresize itself
_parent.mc2.mc2._y = -_parent.mc2.mc2._height/2;
//once the textbox autoresized itself this will replace it on the center
this._x = Math.round(this._x);
//this roundup the position of the button on the x-axis. Thanks Chris!
a = this._x;
b = this._y;
}
on (press) {
this.startDrag(false, a, b, a, _parent.mask._height-this._height);
//when pressed, the button can be draged in the mask
}
on (release) {
this.stopDrag();
}
// These following lines are just to make sure IE don't bug
on (releaseOutside) {
this.stopDrag();
}

container 1.frame as:

speed = .7;
mc2.setMask(mask);
//sets the mask
createEmptyMovieClip("mc1", this.getNextHighestDepth());
//creates an empty movie clip
setInterval(smoothscroll, 40);
function smoothscroll() {
mc1._y = speed*(mc1._y-(button._y+mc1._y*(button._height/mask._height)))+(button._y+mc1._y*(button._height/mask._height));
mc2._y = (1-mc2._height/mask._height)*mc1._y+mc2._height/2;
}

wie muss ich das ganze umändern und gegebenfalls verschachteln, damit ich zusätzlich einen horizontalen scroller bekomme?

bin für jede hilfe dankbar!!!!!!!!!
sonarius ist offline   Mit Zitat antworten
Alt 20-10-2005, 16:14   #2 (permalink)
agedoubleju
Gast
 
Beiträge: n/a
Crossposts sind hier unerwünscht...
  Mit Zitat antworten
Alt 20-10-2005, 17:03   #3 (permalink)
Neuer User
 
Registriert seit: Nov 2003
Beiträge: 9
super antwort...hat mir sehr geholfen...was soll ich deiner meinung machen, wenn keiner ne antwort auf meine frage hat? bin für jeden konstruktiven vorschlag dankbar...
sonarius ist offline   Mit Zitat antworten
Alt 20-10-2005, 20:57   #4 (permalink)
agedoubleju
Gast
 
Beiträge: n/a
Hab ich im anderen Thread beschrieben
  Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 14:34 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele