Thursday, July 29th 2010, 1:25pm UTC+2
You are not logged in.
|
|
ActionScript-Quelltext |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
abstand = 8;
menu = new XML();
menu.ignoreWhite = true;
menu.onLoad = function() {
_root.createEmptyMovieClip("navi", 0);
navi._x = Number(menu.childNodes[0].attributes.x);
navi._y = Number(menu.childNodes[0].attributes.y);
for (i=0; i<menu.childNodes[0].childNodes.length; i++) {
t = navi.attachMovie("menItem2", "menItem2"+i, i);
t._y = i*(t._height+abstand);
t.id.text = menu.childNodes[0].childNodes[i].attributes.item2;
t.ziel = menu.childNodes[0].childNodes[i].attributes.ziel;
t.onRelease = function() {
_root.gotoAndStop(this.ziel)
};
}
};
menu.load("config.xml");
|
|
|
ActionScript-Quelltext |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
Menuleiste.setMask(maske);
Menuleiste.speed = 16;
down.onPress = function() {
trace(this);
Menuleiste.onEnterFrame = function() {
if (Menuleiste._y+this.speed<=0) {
this._y += this.speed;
}
};
};
down.onRelease = function() {
delete Menuleiste.onEnterFrame;
};
up.onPress = function() {
Menuleiste.onEnterFrame = function() {
if (Menuleiste._y>=(tmpStageH-Menuleiste._height)) {
this._y -= this.speed;
}
};
};
up.onRelease = function() {
delete Menuleiste.onEnterFrame;
};
|
This post has been edited 5 times, last edit by "fantasydarter" (Mar 8th 2008, 9:50am)
Quoted
dann suche ich mal weiter.....
|
|
ActionScript-Quelltext |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
scrb=250; //fenstergrösse breite
scrh=100; //fenstergrösse höhe
scroolls=1.4 //multiplikator
abstand = 8;
menu = new XML();
menu.ignoreWhite = true;
menu.onLoad = function ()
{
_root.createEmptyMovieClip("navi", 0);
navi._x = Number(menu.childNodes[0].attributes.x);
navi._y = Number(menu.childNodes[0].attributes.y);
naviy=navi._y-25
_root.createEmptyMovieClip("maske", 801);maske.beginFill(0xFF0000);maske.moveTo(0, 0);maske.lineTo(scrb, 0);maske.lineTo(scrb, scrh);maske.lineTo(0, scrh);maske.endFill();
scr_mc=_root.attachMovie("scrollbar", "scrollbar",802);
maske._x=navi._x-30;maske._y=navi._y-30;
scr_mc._height=scrh
navi.setMask(maske);
for (i = 0; i < menu.childNodes[0].childNodes.length; i++)
{
t = navi.attachMovie("menItem2", "menItem2" + i, i);
t._y = i * (t._height + abstand);
t.id.text = menu.childNodes[0].childNodes[i].attributes.item2;
t.ziel = menu.childNodes[0].childNodes[i].attributes.ziel;
t.onRelease = function ()
{
_root.gotoAndStop(this.ziel);
};
} // end of for
scr_mc._x=t._width+navi._x;scr_mc._y=navi._y
};
menu.load("config.xml");
|
|
|
ActionScript-Quelltext |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
up_btn.onPress=function(){if(scroll_btn._y>=-20){scroll_btn._y-=20}if(scroll_btn._y<-20&&scroll_btn._y>-40){scroll_btn._y=-40};dragend()}
down_btn.onPress=function(){if(scroll_btn._y<=35){this._parent.scroll_btn._y+=20}if(scroll_btn._y>35&&scroll_btn._y<55){scroll_btn._y=55};dragend()}
scroll_btn.onPress=function(){startDrag(this,false,0,-40,0,55);this.onEnterFrame=function(){_root.navi._y=_root.naviy-(scroll_btn._y+40) * _root.scroolls}}
scrollhalt.onRelease=function(){if(this._ymouse<=(scroll_btn._y/2+40)){up_btn.onPress();up_btn.onPress()}else{down_btn.onPress();down_btn.onPress()}}
scroll_btn.onRelease=dragend
scroll_btn.onReleaseOutside=dragend
function dragend()
{
delete scroll_btn.onEnterFrame;
stopDrag();
_root.navi._y=_root.naviy-(scroll_btn._y+40)* _root.scroolls
}
dragend()
|
This post has been edited 1 times, last edit by "dregi" (Mar 10th 2008, 3:15am)
Quoted
danke dir nochmal blöde frage habe das Script jetzt bei mir übernommen und der ich sehe nur die Scrollleiste am Rande der galerie,bzw. webseite ganz links, Hab schon probiert mit den x,y werten der Maske zu verschieben, blieb aber gleich. Kannst du mir sagen wo du die Position deklariert hast
gruß stefan
Quoted
achso weil ich habe die Position in der XML datei angegben.
Quoted
hallo lebst du noch, grinssss
habs nicht hinbekommen, in deiner fla ist der scroll auch ganz links........
verschieben möchtest.
Quoted
<menue x="120" y="236">
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
scrb=250; //fenstergrösse breite
scrh=100;//fenstergrösse höhe
scroolls=1.4//multiplikator
abstand = 8;
menu = new XML();
menu.ignoreWhite = true;
menu.onLoad = function ()
{
_root.createEmptyMovieClip("navi", 0);
navi._x = Number(menu.childNodes[0].attributes.x);
navi._y = Number(menu.childNodes[0].attributes.y);
naviy=navi._y-25
_root.createEmptyMovieClip("maske", 801);maske.beginFill(0xFF0000);maske.moveTo(0, 0);maske.lineTo(scrb, 0);maske.lineTo(scrb, scrh);maske.lineTo(0, scrh);maske.endFill();
scr_mc=_root.attachMovie("scrollbar", "scrollbar",802);
maske._x=navi._x-30;maske._y=navi._y-30;
scr_mc._height=scrh
navi.setMask(maske);
for (i = 0; i < menu.childNodes[0].childNodes.length; i++)
{
t = navi.attachMovie("menItem2", "menItem2" + i, i);
t._y = i * (t._height + abstand);
t.id.text = menu.childNodes[0].childNodes[i].attributes.item2;
t.ziel = menu.childNodes[0].childNodes[i].attributes.ziel;
t.onRelease = function ()
{
_root.gotoAndStop(this.ziel);
};
} // end of for
scr_mc._x=t._width+navi._x;scr_mc._y=navi._y
};
menu.load("bilder/config.xml");
|
|
|
Source code |
1 |
<menue x="120" y="236"> |
This post has been edited 1 times, last edit by "fantasydarter" (Mar 16th 2008, 1:25pm)
|
|
ActionScript-Quelltext |
1 |
scr_mc._x=t._width+navi._x;
|
??????????????????
Quoted
ja aber wo ist x definiert
This post has been edited 2 times, last edit by "fantasydarter" (Mar 16th 2008, 8:24pm)